Hi, use an import-by-name that looks up the resource in the classpath, e.g.
<imports> <import name="desc.type.POS"/> <import name="desc.type.Morpheme"/> </imports> Looks for the "desc/type/POS.xml" and "desc/type/Morpheme.xml" in the classpath (i.e. within your Maven dependencies). See also https://uima.apache.org/d/uimaj-current/references.html#ugr.ref.xml.component_descriptor.imports Cheers, -- Richard > On 04.02.2016, at 21:25, José Tomás Atria <jtat...@gmail.com> wrote: > > 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.