A common way to package java applications is to use maven and its
assembly plugin [1] to provide ready-to-use bundles to users.

The uimaFIT standard way to declare type system descriptions (TSD) is to
provide it with a file types.xml in the META-INF/org.apache.uima.fit
directory that contains patterns of TSD locations [2].

A problem arises when one tries to bundle several uimaFIT components
that use this mechanism, because the
/META-INF/org.apache.uima.fit/types.xml files will be overwritten by the
last component's types.xml file.

I'm aware of some workarounds to this problem, eg if you only have one
uimaFIT dependency and want to provide your own patterns additionnally
to the ones of the dependency, you can add them as system property with
-Dorg.apache.uima.fit.type.import_pattern=classpath*:my/pattern/*.xml.
However, I am not sure how I would proceed to include two or more
components that use this mechanism and my own uimaFIT project, since one
of the two components would have an overwritten types.xml file and the
system property trick would not work anymore.

I guess one way to fix this issue would be to give more freedom to
components regarding where to put the types.xml file, for example,
instead of the pattern META-INF/org.apache.uima.fit/types.txt, we could
use META-INF/org.apache.uima.fit/**/types.txt so that a separation by
package would be possible.

If there is already a standard and usable way to circumvent this
problem, please let me know :)

Cheers and thanks to the community for this great framework,
Hugo Mougard

[1] https://maven.apache.org/plugins/maven-assembly-plugin/

[2]
https://uima.apache.org/d/uimafit-current/tools.uimafit.book.html#ugr.tools.uimafit.typesystem

Reply via email to