You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by re...@apache.org on 2018/08/02 18:55:42 UTC
[uima-uimafit] 01/01: [No Jira] Preparing release of uimaFIT
3.0.0-beta-1
This is an automated email from the ASF dual-hosted git repository.
rec pushed a commit to branch release/3.0.0-beta-1
in repository https://gitbox.apache.org/repos/asf/uima-uimafit.git
commit 6d7709342475f9c409f1bc07e7fffc987d627de4
Author: Richard Eckart de Castilho <re...@apache.org>
AuthorDate: Thu Aug 2 20:55:36 2018 +0200
[No Jira] Preparing release of uimaFIT 3.0.0-beta-1
- Set JIRA version ID for changelog
- Update version in README
- Updated migration guide
- Depend on UIMA Core 3.0.0 (release version)
- Ignore some tests in the JCasUtilv3Test which rely on bug fixes present only in UIMA Core 3.0.1 or higher
---
.gitignore | 1 +
README | 4 +-
pom.xml | 21 +++++-
uimafit-benchmark/pom.xml | 6 +-
.../uima/fit/benchmark/RunnableWithExceptions.java | 22 +++++-
.../org/apache/uima/fit/util/JCasUtilv3Test.java | 10 ++-
.../src/docbook/tools.uimafit.migration.xml | 79 +++++-----------------
uimafit-parent/pom.xml | 2 +-
8 files changed, 70 insertions(+), 75 deletions(-)
diff --git a/.gitignore b/.gitignore
index 19c577d..d4318d8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.settings/
target/
api-change-report/
+issuesFixed
diff --git a/README b/README
index c3d149e..a65ecca 100644
--- a/README
+++ b/README
@@ -1,6 +1,6 @@
- Apache uimaFIT (TM) v2.3.0
- --------------------------
+ Apache uimaFIT (TM) v3.0.0-beta-1
+ ---------------------------------
What is uimaFIT?
diff --git a/pom.xml b/pom.xml
index faf6b22..5665367 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,7 +32,7 @@
<relativePath>uimafit-parent</relativePath>
</parent>
<properties>
- <jiraVersion>12332459</jiraVersion>
+ <jiraVersion>12332458</jiraVersion>
</properties>
<scm>
<connection>scm:svn:http://svn.apache.org/repos/asf/uima/uimafit/trunk/</connection>
@@ -100,6 +100,25 @@
</plugin>
</plugins>
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.rat</groupId>
+ <artifactId>apache-rat-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-cli</id>
+ <configuration>
+ <excludes combine.children="append">
+ <!-- These configuration files cannot bear a license header -->
+ <exclude>.github/*</exclude>
+ </excludes>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
<modules>
diff --git a/uimafit-benchmark/pom.xml b/uimafit-benchmark/pom.xml
index e708ba8..94d9eb5 100644
--- a/uimafit-benchmark/pom.xml
+++ b/uimafit-benchmark/pom.xml
@@ -111,12 +111,8 @@
<id>default-cli</id>
<configuration>
<excludes combine.children="append">
- <!-- These test files are unreasonable to bear a license header -->
- <exclude>src/test/resources/log4j.properties</exclude>
<!-- These configuration files cannot bear a license header -->
- <exclude>src/test/resources/META-INF/org.apache.uima.fit/fsindexes.txt</exclude>
- <exclude>src/test/resources/META-INF/org.apache.uima.fit/typepriorities.txt</exclude>
- <exclude>src/test/resources/META-INF/org.apache.uima.fit/types.txt</exclude>
+ <exclude>src/main/resources/META-INF/org.apache.uima.fit/types.txt</exclude>
</excludes>
</configuration>
</execution>
diff --git a/uimafit-benchmark/src/main/java/org/apache/uima/fit/benchmark/RunnableWithExceptions.java b/uimafit-benchmark/src/main/java/org/apache/uima/fit/benchmark/RunnableWithExceptions.java
index 262c454..2cd5669 100644
--- a/uimafit-benchmark/src/main/java/org/apache/uima/fit/benchmark/RunnableWithExceptions.java
+++ b/uimafit-benchmark/src/main/java/org/apache/uima/fit/benchmark/RunnableWithExceptions.java
@@ -1,5 +1,23 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
package org.apache.uima.fit.benchmark;
public interface RunnableWithExceptions {
- void run() throws Exception;
- }
\ No newline at end of file
+ void run() throws Exception;
+}
\ No newline at end of file
diff --git a/uimafit-core/src/test/java/org/apache/uima/fit/util/JCasUtilv3Test.java b/uimafit-core/src/test/java/org/apache/uima/fit/util/JCasUtilv3Test.java
index a7352b6..9ad871d 100644
--- a/uimafit-core/src/test/java/org/apache/uima/fit/util/JCasUtilv3Test.java
+++ b/uimafit-core/src/test/java/org/apache/uima/fit/util/JCasUtilv3Test.java
@@ -23,12 +23,13 @@ package org.apache.uima.fit.util;
import static java.util.Arrays.asList;
import static org.apache.uima.fit.factory.TypeSystemDescriptionFactory.createTypeSystemDescription;
+import static org.apache.uima.fit.util.JCasUtil.getAnnotationType;
import static org.apache.uima.fit.util.JCasUtil.getView;
import static org.apache.uima.fit.util.JCasUtil.indexCovered;
import static org.apache.uima.fit.util.JCasUtil.indexCovering;
import static org.apache.uima.fit.util.JCasUtil.select;
import static org.apache.uima.fit.util.JCasUtil.selectAt;
-import static org.apache.uima.fit.util.JCasUtil.*;
+import static org.apache.uima.fit.util.JCasUtil.selectCovered;
import static org.apache.uima.fit.util.JCasUtil.selectSingleAt;
import static org.apache.uima.fit.util.JCasUtil.toText;
import static org.assertj.core.api.Assertions.assertThat;
@@ -66,6 +67,7 @@ import org.apache.uima.jcas.cas.NonEmptyFSList;
import org.apache.uima.jcas.cas.TOP;
import org.apache.uima.jcas.tcas.Annotation;
import org.apache.uima.util.CasCreationUtils;
+import org.junit.Ignore;
import org.junit.Test;
/**
@@ -184,6 +186,7 @@ public class JCasUtilv3Test extends ComponentTestBase {
/**
* Test what happens if there is actually nothing overlapping with the Token.
*/
+ @Ignore("Requires UIMA v3 3.0.1 to work")
@Test
public void testSelectBetweenInclusion() {
Token t1 = new Token(jCas, 45, 57);
@@ -198,6 +201,7 @@ public class JCasUtilv3Test extends ComponentTestBase {
assertTrue(stem1.isEmpty());
}
+ @Ignore("Requires UIMA v3 3.0.1 to work")
@Test
public void testSelectBetweenRandom() throws Exception {
final int ITERATIONS = 10;
@@ -334,6 +338,7 @@ public class JCasUtilv3Test extends ComponentTestBase {
jCas.select(Token.class).map(AnnotationFS::getCoveredText).collect(Collectors.toList()));
}
+ @Ignore("Requires UIMA v3 3.0.1 to work")
@Test
public void testSelectByIndex() {
String text = "Rot wood cheeses dew?";
@@ -547,6 +552,7 @@ public class JCasUtilv3Test extends ComponentTestBase {
.get().getCoveredText());
}
+ @Ignore("Requires UIMA v3 3.0.1 to work")
@Test
public void testSelectPrecedingWithOverlaps() {
String text = "a b c d e";
@@ -563,6 +569,7 @@ public class JCasUtilv3Test extends ComponentTestBase {
assertEquals("a", preceedingTokens.get(0).getCoveredText());
}
+ @Ignore("Requires UIMA v3 3.0.1 to work")
@Test
public void testSelectPrecedingWithOverlaps2() {
jCas.setDocumentText("abcde");
@@ -621,6 +628,7 @@ public class JCasUtilv3Test extends ComponentTestBase {
assertEquals(secondToken.getEnd(), a.getEnd());
}
+ @Ignore("Requires UIMA v3 3.0.1 to work")
@Test
public void testSelectFollowingPrecedingBuiltinTypes() {
this.jCas.setDocumentText("A B C");
diff --git a/uimafit-docbook/src/docbook/tools.uimafit.migration.xml b/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
index 2f76442..fd0e486 100644
--- a/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
+++ b/uimafit-docbook/src/docbook/tools.uimafit.migration.xml
@@ -28,8 +28,23 @@
compatible with UIMA 2.x anyway, the legacy module was removed now.</para>
</formalpara>
<formalpara>
+ <title>Using List instead of Collection</title>
+ <para>The <literal>CasUtil</literal>, <literal>JCasUtil</literal> and
+ <literal>FSCollectionFactory</literal> classes were adjusted to return results
+ using <literal>List</literal> instead of the more general <literal>Collection</literal>.
+ Often, lists are already used internally and then again wrapped into new lists in client
+ code. This API change avoids this in the future.</para>
+ </formalpara>
+ <formalpara>
+ <title>Throwing specific exceptions instead of UIMAException</title>
+ <para>Several uimaFIT methods were throwing the generic <literal>UIMAException</literal>.
+ These have been adjusted to declare throwing several of the sub-types of
+ <literal>UIMAException</literal> to be better able to handle
+ specific causes of errors in client code.</para>
+ </formalpara>
+ <formalpara>
<title>Version requirements</title>
- <para>Depends on UIMA 3.0.0, Spring Framework 3.2.16 and Java 7.</para>
+ <para>Depends on UIMA 3.0.0, Spring Framework 3.2.16 and Java 8.</para>
</formalpara>
</section>
<section>
@@ -163,66 +178,4 @@
The new methods in <literal>CasIOUtil</literal> can be used instead.</para>
</formalpara>
</section>
- <section>
- <title>Legacy support module</title>
- <para>The compatibility layer should allow you to migrate to uimaFIT <?eval ${project.version}?> without breaking
- anything. You should then be able to gradually change the codebase to be compatible with
- uimaFIT <?eval ${project.version}?>. As far as my tests go, uimaFIT 1.x and <?eval ${project.version}?> can coexist peacefully on the
- classpath (and indeed both need to be on the classpath in order to use the legacy support
- module).</para>
- <para>To enable the legacy support, make sure that you have a dependency on uimaFIT 1.x and then
- just add a dependency on the legacy module:</para>
- <programlisting><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><?eval ${project.version}?></version>
-</dependency></programlisting>
- <para>uimaFIT <?eval ${project.version}?> automatically detects the presence of the legacy module and uses it - no
- additional configuration is necessary.</para>
- <para>The following bash script may help to partially automatize the source code migration process.
- Please observe that it does not cover all of the necessary changes!</para>
- <note>
- <para>The script recursively changes all files under the current working directory! Make
- sure you are in the right directory before running it! <emphasis>Use the script at your own
- risk!</emphasis></para>
- </note>
- <programlisting>#!/bin/sh
-
-############################################
-# MAKE SURE TO BACKUP YOUR FILES FIRST!
-# SCRIPT RECURSIVELY CHANGES ALL JAVA FILES!
-# USE AT YOUR OWN RISK!
-############################################
-
-# 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'
-</programlisting>
- </section>
</chapter>
diff --git a/uimafit-parent/pom.xml b/uimafit-parent/pom.xml
index 542c3b0..55754be 100644
--- a/uimafit-parent/pom.xml
+++ b/uimafit-parent/pom.xml
@@ -15,7 +15,7 @@
<inceptionYear>2012</inceptionYear>
<properties>
<spring.version>3.2.16.RELEASE</spring.version>
- <uima.version>3.0.1-SNAPSHOT</uima.version>
+ <uima.version>3.0.0</uima.version>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<compat.previous.version>2.1.0</compat.previous.version>