uima-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From José Tomás Atria <jtat...@gmail.com>
Subject JCasGen: Import typesystem from Maven dependency jar
Date Thu, 04 Feb 2016 20:25:10 GMT
Hello All,

I'm using JCasGen to generate the type system for a specific research
project. This type system is an extension of a generic type system that we
use internally in our lab.

Until now, I have been doing this by copying the XML descriptor for the
generic type system to a file in my development machine, and then including
a hard coded reference to its path in the specified type system, but I
would like to remove that hard-coded reference and reference instead the
copy of the type system description that is included in the resources of
our lab's API library, distributed over maven.

e.g. right now, my type system descriptor includes the line:

<import location="file://path/to/a/local/folder/LabTypeSystem.xml"/>

I want to remove that reference and instead pull "LabTypeSystem.xml" from
the resources contained in the jar of a maven dependency.

I tried doing this instead:

<import location="
jar:file:/path/to/maven/repo/lab/group/id/lab-api-artifact/version/
lab-api-artifact-version.jar!/desc/type/LabTypeSystem.xml"/>

(i.e. the URL I got from
doing getClass().getResource("desc/type/LabTypeSystem.xml").toString() )

but this resulted in a NullPointerException (which is surely a bug in
JCasGen...), but in any case, that would just replace one hardcoded
reference by another (i.e. to the local maven repo).

Is there any way to make JCasGen resolve resources in mavenized jars?

Hope I made myself clear...

Thanks!
jta.

-- 
entia non sunt multiplicanda praeter necessitatem

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message