How to use a new Maven plugin with the old loading from a directory?
heitz@...
Hi,
We are trying to load the new plugins like before from directories and not the ~/.m2. And got the following error : ERROR:GateAnnotate:initController():Unable to load gapp file:com.thoughtworks.xstream.converters.ConversionException: No converter available ---- Debugging information ---- message : No converter available type : gate.creole.Plugin$Maven converter : com.thoughtworks.xstream.converters.reflection.SerializableConverter message[1] : org/apache/maven/model/building/ModelBuildingRequest class : java.util.ArrayList required-type : java.util.ArrayList converter-type : com.thoughtworks.xstream.converters.collections.CollectionConverter path : /urlList/localList/gate.creole.Plugin-Maven line number : 4 class[1] : gate.util.persistence.CollectionPersistence required-type[1] : gate.util.persistence.CollectionPersistence converter-type[1] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter version : not available ------------------------------- Is there a way to convert the new Maven plugin format to be used like before from a directory. This is because we don't want to use Maven and need to package the whole GATE rules, gazetteers and plugin to be used without access to internet. Thanks for any pointer, we already searched the doc, forum, github, etc. We also tried to use the zip from Export for GATE Cloud. Thomas Heitz |
|
Mark Greenwood
Hi Thomas, I don't think there is any way to load the Maven based plugins from a directory like you could with the old directory based plugins. If you just want a self contained package though that contains an app and all it's dependencies then you just need to use the Export for GATE Cloud option. That produces a maven-cache.gate folder next to the xgapp file. That folder contains cached copies of all the maven dependencies needed for the app to load; which contains all the pluigns. That means you can then load the xgapp into GATE without needing any internet access etc. You seem to suggest that option doesn't work for you. Can you explain why not, because if it doesn't fully work then that might in fact be a bug in the caching mechanism, Mark On 15/03/2023 15:25, heitz via
groups.io wrote:
Hi, |
|
Ian Roberts
Thomas,
That error message looks suspiciously
like the one I get when I try to load an 8.5+ xgapp into GATE
8.4.x or earlier. Are you definitely using the same version of
gate-core in the code where you're loading this xgapp as you did
in the GUI where you originally saved it and does your tool have
all the right versions of all the gate-core dependency JARs? And
what version of Java are you running on (both in GATE Developer
when you created the app and in the tool that is trying to load
it)?
As Mark explained, "export for GATE
Cloud" in 8.6+ should create an app that can be loaded
without going out to the internet for plugins - if there is a
maven-cache.gate folder adjacent to the xgapp file then GATE will
look there first for referenced plugins and only go out to the
internet if it needs a dependency that is not in the cache.
Ian
On 15/03/2023 15:25, heitz via
groups.io wrote:
Hi,
-- Ian Roberts | Department of Computer Science i.roberts@... | University of Sheffield, UK |
|
heitz@...
Thanks Mark and Ian for your answers.
We solved our problem with your hints. We are using the last version 9.1 and copied jar from gate developer lib in our software lib directory. Indeed you're right "Export for GATE Cloud" is the way to go. We didn't use the maven and plexus jar because we didn't want to have dependencies on maven. Unfortunately that gives us this error message. Our customers use GATE on their confidential documents and hosted offline on premises so Maven needing network connection is less suitable for our setup. Thanks again, Thomas |
|
Mark Greenwood
If you are using an export for GATE Cloud then Maven does not need a network connection. If you are specifically worried about it then there are things you can do in settings.xml to change how Maven works. There are lots of options you can use and I don't have a good example to share. One option might be a to set a proxy that doesn't chain back to the main repo. And of course there are probably machine level configurations you could make to limit Maven's ability to connect to the internet as well Mark On 16/03/2023 08:40, heitz via
groups.io wrote:
Thanks Mark and Ian for your answers. |
|
Ian Roberts
A good backstop for this is to put a
"mirror" configuration in ~/.m2/settings.xml pointing to your
app's maven-cache.gate:
<mirrors>
<mirror>
<id>force-local</id> <url>file:/path/to/maven-cache.gate/</url> <mirrorOf>external:*</mirrorOf> </mirror> </mirrors> This will intercept any
attempts to resolve from the internet and force Maven to look only
in the export-for-GATE-Cloud cache folder.
Ian
On 16/03/2023 09:13, Mark Greenwood via
groups.io wrote:
-- Ian Roberts | Department of Computer Science i.roberts@... | University of Sheffield, UK |
|