Richard Eckart de Castilho created UIMA-6226:
------------------------------------------------

             Summary: uimaFIT maven plugin "generate" fails to import type 
systems from dependencies
                 Key: UIMA-6226
                 URL: https://issues.apache.org/jira/browse/UIMA-6226
             Project: UIMA
          Issue Type: Bug
          Components: uimaFIT-Maven-Plugin
    Affects Versions: 2.4.0uimaFIT
            Reporter: Richard Eckart de Castilho
            Assignee: Richard Eckart de Castilho
             Fix For: 2.5.0uimaFIT


The uimaFIT Maven plugin goal "generate" is unable to resolve type system 
imports in analysis engine descriptors if the imported type system is located 
in a project dependency and not part of the current module.

{code}
Caused by: org.apache.uima.util.InvalidXMLException: An import could not be 
resolved.  No file with name "my/imported/typesystem.xml" was found in the 
class path or data path. (Descriptor: 
jar:file:/home/user/.m2/repository/some/dependency-1.0.0.jar!/my/typesystem-with-import.xml)
    at org.apache.uima.resource.metadata.impl.Import_impl.findAbsoluteUrl 
(Import_impl.java:149)
    at 
org.apache.uima.resource.metadata.impl.TypeSystemDescription_impl.resolveImports
 (TypeSystemDescription_impl.java:230)
    at 
org.apache.uima.resource.metadata.impl.TypeSystemDescription_impl.resolveImports
 (TypeSystemDescription_impl.java:210)
    at org.apache.uima.util.CasCreationUtils.mergeTypeSystems 
(CasCreationUtils.java:1082)
    at org.apache.uima.util.CasCreationUtils.mergeTypeSystems 
(CasCreationUtils.java:1029)
    at 
org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription
 (TypeSystemDescriptionFactory.java:119)
    at 
org.apache.uima.fit.factory.AnalysisEngineFactory.createEngineDescription 
(AnalysisEngineFactory.java:978)
    at org.apache.uima.fit.maven.GenerateDescriptorsMojo.execute 
(GenerateDescriptorsMojo.java:127)
{code}

A workaround to this bug is to include all dependencies containing imported 
type systems as dependencies of the uimafit-maven-plugin in the POM.

But this should not be necessary. The plugin should be able to resolve the 
imports even if the dependency is only declared as a regular project 
dependency, not a plugin dependency.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to