From 4e9a977c1b792a30fd042a365313b8d6e893ac64 Mon Sep 17 00:00:00 2001 From: smarthi Date: Mon, 19 Dec 2016 23:25:10 -0500 Subject: [PATCH] OPENNLP-894: Switch from Java 7 to Java 8 and enforce Maven 3.3.9 --- opennlp-brat-annotator/pom.xml | 3 - opennlp-distr/README | 6 +- opennlp-distr/pom.xml | 4 +- opennlp-distr/src/main/assembly/bin.xml | 3 - opennlp-distr/src/main/assembly/src.xml | 1 - opennlp-morfologik-addon/pom.xml | 19 ++--- opennlp-tools/pom.xml | 11 +-- opennlp-uima/pom.xml | 17 +---- .../uima/AnnotatorsInitializationTest.java | 10 +-- .../dictionary/DictionaryResourceTest.java | 2 +- .../resources/test-descriptors/Chunker.xml | 1 - .../test-descriptors/DateNameFinder.xml | 1 - .../test-descriptors/DictionaryNameFinder.xml | 3 +- .../test-descriptors/LocationNameFinder.xml | 1 - .../test-descriptors/MoneyNameFinder.xml | 1 - .../OrganizationNameFinder.xml | 1 - .../test-descriptors/PercentageNameFinder.xml | 1 - .../test-descriptors/PersonNameFinder.xml | 1 - .../resources/test-descriptors/PosTagger.xml | 1 - .../test-descriptors/SentenceDetector.xml | 1 - .../test-descriptors/TimeNameFinder.xml | 1 - .../resources/test-descriptors/Tokenizer.xml | 1 - pom.xml | 73 ++++++++++++++++--- 23 files changed, 83 insertions(+), 80 deletions(-) diff --git a/opennlp-brat-annotator/pom.xml b/opennlp-brat-annotator/pom.xml index b7e7301c8..5f77bb7e6 100644 --- a/opennlp-brat-annotator/pom.xml +++ b/opennlp-brat-annotator/pom.xml @@ -23,7 +23,6 @@ opennlp-brat-annotator - 1.0-SNAPSHOT jar Apache OpenNLP Brat Annotator @@ -60,13 +59,11 @@ org.apache.opennlp opennlp-tools - 1.6.0 junit junit - 3.8.1 test diff --git a/opennlp-distr/README b/opennlp-distr/README index a0ad5e463..0ecfaec27 100644 --- a/opennlp-distr/README +++ b/opennlp-distr/README @@ -18,7 +18,7 @@ What is new in Apache OpenNLP ${pom.version} This release introduces many new features, improvements and bug fixes. The API has been improved for a better consistency and 1.4 deprecated methods were -removed. Now Java 1.7 is required. +removed. Now Java 1.8 is required. Additionally the release contains the following noteworthy changes: @@ -39,6 +39,6 @@ notes. Requirements ------------ -Java 1.7 is required to run OpenNLP -Maven 3.0.0 is required for building it +Java 1.8 is required to run OpenNLP +Maven 3.3.9 is required for building it diff --git a/opennlp-distr/pom.xml b/opennlp-distr/pom.xml index 01f200661..e5243cf2b 100644 --- a/opennlp-distr/pom.xml +++ b/opennlp-distr/pom.xml @@ -37,12 +37,10 @@ org.apache.opennlp opennlp-tools - 1.6.1-SNAPSHOT org.apache.opennlp opennlp-uima - 1.6.1-SNAPSHOT @@ -114,7 +112,7 @@ org.apache.maven.plugins maven-changes-plugin - 2.9 + 2.12.1 default-cli diff --git a/opennlp-distr/src/main/assembly/bin.xml b/opennlp-distr/src/main/assembly/bin.xml index 2fd5d7f3a..926a9eb97 100644 --- a/opennlp-distr/src/main/assembly/bin.xml +++ b/opennlp-distr/src/main/assembly/bin.xml @@ -46,14 +46,12 @@ src/main/readme - 644 755 . - true 644 755 @@ -65,7 +63,6 @@ target - 644 755 diff --git a/opennlp-distr/src/main/assembly/src.xml b/opennlp-distr/src/main/assembly/src.xml index cdcc9d32b..1dea96bd6 100644 --- a/opennlp-distr/src/main/assembly/src.xml +++ b/opennlp-distr/src/main/assembly/src.xml @@ -27,7 +27,6 @@ ../ - **/target/** **/.*/** diff --git a/opennlp-morfologik-addon/pom.xml b/opennlp-morfologik-addon/pom.xml index 71d2c53e0..da9b72839 100644 --- a/opennlp-morfologik-addon/pom.xml +++ b/opennlp-morfologik-addon/pom.xml @@ -2,24 +2,20 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - org.apache.opennlp + + org.apache.opennlp + opennlp + 1.6.1-SNAPSHOT + ../pom.xml + + opennlp-morfologik-addon - 1.0-SNAPSHOT jar Apache OpenNLP Morfologik Addon http://maven.apache.org - - org.apache.maven.plugins - maven-compiler-plugin - 2.3.2 - - 1.7 - 1.7 - - maven-assembly-plugin @@ -101,7 +97,6 @@ junit junit - 4.8.1 test diff --git a/opennlp-tools/pom.xml b/opennlp-tools/pom.xml index db0d15155..9afaff4ba 100644 --- a/opennlp-tools/pom.xml +++ b/opennlp-tools/pom.xml @@ -55,6 +55,7 @@ junit test + commons-io commons-io @@ -116,7 +117,7 @@ opennlp.tools.util.ext.OSGiExtensionLoader - JavaSE-1.7 + JavaSE-1.8 !opennlp.tools.cmdline.*, opennlp.tools.* @@ -177,14 +178,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - 1.7 - 1.7 - - diff --git a/opennlp-uima/pom.xml b/opennlp-uima/pom.xml index 2347053b1..11bd95f78 100644 --- a/opennlp-uima/pom.xml +++ b/opennlp-uima/pom.xml @@ -83,22 +83,7 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - true - -Xmx512m - - - - org.apache.maven.plugins - maven-compiler-plugin - - 1.7 - 1.7 - - + diff --git a/opennlp-uima/src/test/java/opennlp/uima/AnnotatorsInitializationTest.java b/opennlp-uima/src/test/java/opennlp/uima/AnnotatorsInitializationTest.java index ced03c845..7e77a6dd6 100644 --- a/opennlp-uima/src/test/java/opennlp/uima/AnnotatorsInitializationTest.java +++ b/opennlp-uima/src/test/java/opennlp/uima/AnnotatorsInitializationTest.java @@ -16,6 +16,8 @@ */ package opennlp.uima; +import java.io.File; +import java.io.IOException; import org.apache.uima.UIMAFramework; import org.apache.uima.analysis_engine.AnalysisEngine; import org.apache.uima.cas.CAS; @@ -24,10 +26,6 @@ import org.apache.uima.resource.ResourceSpecifier; import org.apache.uima.util.InvalidXMLException; import org.apache.uima.util.XMLInputSource; -import org.junit.Test; - -import java.io.File; -import java.io.IOException; import static org.junit.Assert.fail; @@ -38,7 +36,9 @@ public class AnnotatorsInitializationTest { private static final String PATHNAME = "src/test/resources/test-descriptors/"; - @Test + // TODO: This test requires the SourceForge models, or other models to run, + // but they are missing due to license issues since the project was migrated to Apache + //@Test public void testInitializationExecutionAndReconfigure() { File f = new File(PATHNAME); for (String descName : f.list(new FileUtil.ExtFilenameFilter("xml"))) { diff --git a/opennlp-uima/src/test/java/opennlp/uima/dictionary/DictionaryResourceTest.java b/opennlp-uima/src/test/java/opennlp/uima/dictionary/DictionaryResourceTest.java index 40d24c7d4..2afb97ae9 100644 --- a/opennlp-uima/src/test/java/opennlp/uima/dictionary/DictionaryResourceTest.java +++ b/opennlp-uima/src/test/java/opennlp/uima/dictionary/DictionaryResourceTest.java @@ -43,7 +43,7 @@ public class DictionaryResourceTest { - private static final String PATHNAME = "opennlp-uima/src/test/resources/test-descriptors/"; + private static final String PATHNAME = "src/test/resources/test-descriptors/"; private static AnalysisEngine AE; diff --git a/opennlp-uima/src/test/resources/test-descriptors/Chunker.xml b/opennlp-uima/src/test/resources/test-descriptors/Chunker.xml index dd48498f3..ecca12e4f 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/Chunker.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/Chunker.xml @@ -25,7 +25,6 @@ opennlp.uima.chunker.Chunker Chunker - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/DateNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/DateNameFinder.xml index 8f58e3bf0..d61916080 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/DateNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/DateNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Date Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/DictionaryNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/DictionaryNameFinder.xml index e0637548a..97e19b240 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/DictionaryNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/DictionaryNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.DictionaryNameFinder Dictionary Name Finder - 1.5.2-incubating Apache Software Foundation @@ -109,7 +108,7 @@ NameFinderDictionary - file:opennlp-uima/src/test/resources/dictionary.dic + file:src/test/resources/dictionary.dic opennlp.uima.dictionary.DictionaryResourceImpl diff --git a/opennlp-uima/src/test/resources/test-descriptors/LocationNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/LocationNameFinder.xml index f6fdaeb81..51f5079d0 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/LocationNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/LocationNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Location Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/MoneyNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/MoneyNameFinder.xml index c5b9207fe..8df918dc3 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/MoneyNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/MoneyNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Money Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml index c72ff0c18..0afe1fc76 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/OrganizationNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Organization Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/PercentageNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/PercentageNameFinder.xml index 8235d64c8..695d58e21 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/PercentageNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/PercentageNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Percentage Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml index 19e916d43..659a3f4a6 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/PersonNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Person Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/PosTagger.xml b/opennlp-uima/src/test/resources/test-descriptors/PosTagger.xml index 5fe00b6bf..e3eba91f3 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/PosTagger.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/PosTagger.xml @@ -25,7 +25,6 @@ opennlp.uima.postag.POSTagger POS Tagger - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/SentenceDetector.xml b/opennlp-uima/src/test/resources/test-descriptors/SentenceDetector.xml index 2025fa4b7..2a020341c 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/SentenceDetector.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/SentenceDetector.xml @@ -26,7 +26,6 @@ opennlp.uima.sentdetect.SentenceDetector Sentence Detector - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/TimeNameFinder.xml b/opennlp-uima/src/test/resources/test-descriptors/TimeNameFinder.xml index 3f7ed0be0..846b5a855 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/TimeNameFinder.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/TimeNameFinder.xml @@ -25,7 +25,6 @@ opennlp.uima.namefind.NameFinder Time Name Finder - 1.5.2-incubating Apache Software Foundation diff --git a/opennlp-uima/src/test/resources/test-descriptors/Tokenizer.xml b/opennlp-uima/src/test/resources/test-descriptors/Tokenizer.xml index cee2a941a..27f848042 100644 --- a/opennlp-uima/src/test/resources/test-descriptors/Tokenizer.xml +++ b/opennlp-uima/src/test/resources/test-descriptors/Tokenizer.xml @@ -25,7 +25,6 @@ opennlp.uima.tokenize.Tokenizer Tokenizer - ${pom.version} Apache Software Foundation diff --git a/pom.xml b/pom.xml index 91e5043bb..89d020698 100644 --- a/pom.xml +++ b/pom.xml @@ -25,7 +25,7 @@ org.apache apache - 16 + 18 @@ -36,10 +36,6 @@ Apache OpenNLP Reactor - - 3.0 - - scm:git:https://git-wip-us.apache.org/repos/asf/opennlp.git https://git-wip-us.apache.org/repos/asf?p=opennlp.git @@ -87,12 +83,33 @@ junit junit - 4.8.1 + ${junit.version} test + + + opennlp-tools + ${project.groupId} + ${project.version} + + + + opennlp-uima + ${project.groupId} + ${project.version} + + + + + 1.8 + 3.3.9 + 1.4.1 + 4.12 + + @@ -110,9 +127,7 @@ org.apache.felix maven-bundle-plugin - - 2.3.4 + 3.2.0 @@ -120,9 +135,10 @@ org.apache.maven.plugins maven-compiler-plugin + 3.3 - 1.7 - 1.7 + ${java.version} + ${java.version} -Xlint @@ -189,6 +205,41 @@ + + org.apache.maven.plugins + maven-enforcer-plugin + ${enforcer.plugin.version} + + + enforce-java + + enforce + + + + + Java 8 or higher is required to compile this module + [${java.version},) + + + Maven 3.3.9 or higher is required to compile this module + [${maven.version},) + + + + + + + + + org.apache.maven.plugins + maven-surefire-plugin + + false + -Xmx512m + + +