Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.0.0uimaFIT, 2.4.0uimaFIT, 2.5.0uimaFIT
-
None
Description
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.
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)
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.