Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Compatibility with legacy annotation is provided by the #Legacy support module.

Change of Maven

...

groupId and artifactId

The Maven group ID has changed from org.uimafit to org.apache.uima.

The artifact ID of the main uimaFIT artifact has been changed from uimafit to uimafit-core.

Change of package names to org.apache.uima.fit

The base package has been renamed from org.uimafit to org.apache.uima.fit. A global search/replace on Java files with for lines starting with import org.uimafit and replacing that with import org.apache.uima.fit should work.

uimaj_core
Version requirements

Depends on UIMA Dependes on uimaj_core 2.4.1 version2.

@ConfigurationParameter

The default value for the mandatory attribute now is true.

...

Now the META-INF/org.uimafit was renamed to META-INF/org.apache.uima.fit.

JCasUtil

The deprecated method JCasUtil.iterate() has methods have been removed. JCasUtil.select() should be used instead.

...

CASDumpWriter has been renamed to CasDumpWriter.

CpePipeline

CpePipeline has been moved to a separate module with the artifact ID uimafit-cpe to reduce the dependencies incurred by the main uimaFIT artifact.

Legacy support module

The compatibility layer should allow you to migrate to uimaFIT 2.0.0 without breaking anything. You should then be able to gradually change the codebase to be compatible with uimaFIT 2.0.0. As far as my tests go, uimaFIT 1.x and 2.0.0 can coexist peacefully on the classpath (and indeed both need to be on the classpath in order to use the legacy support module).

To enable the legacy support, make sure that you have a dependency on uimaFIT 1.x and then just add a dependency on

No Format

<dependency>
  <groupId>org.uimafit</groupId>
  <artifactId>uimafit</artifactId>
  <version>1.4.0</version>
</dependency>
<dependency>
  <groupId>org.apache.uima</groupId>
  <artifactId>uimafit-legacy-support</artifactId>
  <version>2.0.0-SNAPSHOT</version>
</dependency>

uimaFIT 2.x automatically detects the presence of the legacy module and uses it - no additional configuration is necessary.

Migration support

The following script contributed by Renaud Richardet can help users of UNIX-like operating systems in the migration of their
uimaFIT 1.4.x code to uimaFIT 2.0.x.

No Format

#!/bin/sh

############################################
# MAKE SURE TO BACKUP YOUR FILES FIRST
############################################

# see http://uima.apache.org/d/uimafit-2.0.0/tools.uimafit.book.html#d5e617

#Change of package names:
find . -name '*.java' -print | xargs perl -p -i -e 's/org.uimafit/org.apache.uima.fit/g'
find . -name '*.java' -print | xargs perl -p -i -e 's/org.uimafit.component.xwriter.CASDumpWriter/org.apache.uima.fit.component.CasDumpWriter/g'

#AnalysisEngineFactory
find . -name '*.java' -print | xargs perl -p -i -e 's/createAggregate/createEngine/g'
find . -name '*.java' -print | xargs perl -p -i -e 's/createPrimitive/createEngine/g'
find . -name '*.java' -print | xargs perl -p -i -e 's/createAnalysisEngine/createEngine/g'
# Readers
find . -name '*.java' -print | xargs perl -p -i -e 's/createDescription/createReaderDescription/g'
find . -name '*.java' -print | xargs perl -p -i -e 's/createCollectionReader/createReader/g'