From f2fc802f385d6a1773e651c87bb782d105112a37 Mon Sep 17 00:00:00 2001 From: Richard Eckart de Castilho Date: Fri, 4 Nov 2022 17:47:28 +0100 Subject: [PATCH] #448 - Update dependencies - JDom 2.0.2 -> 2.0.6.1 - Backported several POM adjustments from main - Backported ignoring crfsuite tests on unsupported platforms from main --- cleartk-corpus/pom.xml | 30 ++- cleartk-examples/pom.xml | 243 ++++++++++-------- .../ml/crfsuite/CrfSuiteClassifierTest.java | 6 + .../org/cleartk/util/PlatformDetection.java | 8 +- pom.xml | 119 +++++---- 5 files changed, 233 insertions(+), 173 deletions(-) diff --git a/cleartk-corpus/pom.xml b/cleartk-corpus/pom.xml index 179c3e702..2ac620db0 100644 --- a/cleartk-corpus/pom.xml +++ b/cleartk-corpus/pom.xml @@ -2,16 +2,19 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - cleartk-corpus - jar - ClearTK Corpus - ClearTK annotators and readers for various corpora + cleartk org.cleartk 2.1.0-SNAPSHOT .. + + cleartk-corpus + + ClearTK Corpus + ClearTK annotators and readers for various corpora + org.apache.uima @@ -27,12 +30,24 @@ org.jdom - jdom + jdom2 org.apache.commons commons-lang3 + + com.google.guava + guava + + + org.apache.uima + uimaj-core + + + org.apache.uima + uimafit-core + @@ -40,5 +55,10 @@ cleartk-test-util test + + commons-io + commons-io + test + diff --git a/cleartk-examples/pom.xml b/cleartk-examples/pom.xml index a08402448..f5cc96bb9 100644 --- a/cleartk-examples/pom.xml +++ b/cleartk-examples/pom.xml @@ -1,110 +1,135 @@ - - 4.0.0 - cleartk-examples - jar - ClearTK Examples - ClearTK example annotators - - cleartk - org.cleartk - 2.1.0-SNAPSHOT - .. - - - - org.apache.uima - uimaj-document-annotation - - - org.cleartk - cleartk-util - - - org.cleartk - cleartk-eval - - - org.cleartk - cleartk-ml - - - org.cleartk - cleartk-ml-libsvm - - - org.cleartk - cleartk-ml-opennlp-maxent - - - org.cleartk - cleartk-ml-svmlight - - - org.cleartk - cleartk-ml-mallet - - - org.cleartk - cleartk-type-system - - - org.cleartk - cleartk-corpus - - - org.cleartk - cleartk-token - - - org.cleartk - cleartk-snowball - - - org.cleartk - cleartk-opennlp-tools - - - org.jdom - jdom - - - com.lexicalscope.jewelcli - jewelcli - - - - org.cleartk - cleartk-test-util - test - - - - - true - - - - - - org.apache.uima - jcasgen-maven-plugin - - - src/main/resources/org/cleartk/examples/TypeSystem.xml - - - - - - org.apache.maven.plugins - maven-deploy-plugin - - true - - - - + + 4.0.0 + + + cleartk + org.cleartk + 2.1.0-SNAPSHOT + .. + + + cleartk-examples + + ClearTK Examples + ClearTK example annotators + + + + true + + + + + commons-io + commons-io + + + com.google.guava + guava + + + org.apache.uima + uimaj-core + + + org.apache.uima + uimafit-core + + + org.apache.uima + uimaj-document-annotation + + + org.cleartk + cleartk-util + + + org.cleartk + cleartk-eval + + + org.cleartk + cleartk-ml + + + org.cleartk + cleartk-ml-libsvm + + + org.cleartk + cleartk-ml-opennlp-maxent + + + org.cleartk + cleartk-ml-svmlight + runtime + + + org.cleartk + cleartk-ml-mallet + + + org.cleartk + cleartk-type-system + + + org.cleartk + cleartk-corpus + + + org.cleartk + cleartk-token + + + org.cleartk + cleartk-snowball + + + org.cleartk + cleartk-opennlp-tools + + + org.jdom + jdom2 + + + com.lexicalscope.jewelcli + jewelcli + + + + + org.cleartk + cleartk-test-util + test + + + + + + + + org.apache.uima + jcasgen-maven-plugin + + + src/main/resources/org/cleartk/examples/TypeSystem.xml + + + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + diff --git a/cleartk-ml-crfsuite/src/test/java/org/cleartk/ml/crfsuite/CrfSuiteClassifierTest.java b/cleartk-ml-crfsuite/src/test/java/org/cleartk/ml/crfsuite/CrfSuiteClassifierTest.java index 00e5116c7..a8867187b 100644 --- a/cleartk-ml-crfsuite/src/test/java/org/cleartk/ml/crfsuite/CrfSuiteClassifierTest.java +++ b/cleartk-ml-crfsuite/src/test/java/org/cleartk/ml/crfsuite/CrfSuiteClassifierTest.java @@ -32,7 +32,9 @@ */ package org.cleartk.ml.crfsuite; +import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; +import static org.junit.Assume.assumeTrue; import java.io.BufferedReader; import java.io.File; @@ -61,6 +63,7 @@ import org.cleartk.ml.jar.JarClassifierBuilder; import org.cleartk.ml.jar.Train; import org.cleartk.test.util.DefaultTestBase; +import org.cleartk.util.PlatformDetection; import org.junit.Assert; import org.junit.Test; import org.apache.uima.fit.factory.AnalysisEngineFactory; @@ -99,6 +102,7 @@ public void initialize(UimaContext context) throws ResourceInitializationExcepti super.initialize(context); } + @Override public void process(JCas cas) throws AnalysisEngineProcessException { if (this.isTraining()) { List> instances = createInstances(); @@ -119,6 +123,7 @@ public void process(JCas cas) throws AnalysisEngineProcessException { @Test public void runTest1() throws Exception { + assumeTrue(asList("x86_32", "x86_64").contains(new PlatformDetection().getArch())); this.assumeTestsEnabled(COMMON_TESTS_PROPERTY_VALUE, CRF_SUITE_TESTS_PROPERTY_VALUE); this.logger.info(CRF_SUITE_TESTS_ENABLED_MESSAGE); @@ -174,6 +179,7 @@ public void runTest1() throws Exception { @Test public void testClassifier() throws IOException { + assumeTrue(asList("x86_32", "x86_64").contains(new PlatformDetection().getArch())); this.assumeTestsEnabled(COMMON_TESTS_PROPERTY_VALUE, CRF_SUITE_TESTS_PROPERTY_VALUE); this.logger.info(CRF_SUITE_TESTS_ENABLED_MESSAGE); diff --git a/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java b/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java index 2eebc5693..a96fdd09e 100644 --- a/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java +++ b/cleartk-util/src/main/java/org/cleartk/util/PlatformDetection.java @@ -66,6 +66,8 @@ public class PlatformDetection { public static String ARCH_X86_64 = "x86_64"; + public static String ARCH_ARM_64 = "aarch64"; + public PlatformDetection() { // resolve OS if (SystemUtils.IS_OS_WINDOWS) { @@ -90,6 +92,7 @@ public PlatformDetection() { archMap.put("x86_64", ARCH_X86_64); archMap.put("amd64", ARCH_X86_64); archMap.put("powerpc", ARCH_PPC); + archMap.put("aarch64", ARCH_ARM_64); this.arch = archMap.get(SystemUtils.OS_ARCH); if (this.arch == null) { throw new IllegalArgumentException("Unknown architecture " + SystemUtils.OS_ARCH); @@ -119,8 +122,9 @@ public String toString() { } public String getExecutableSuffix() { - if (getOs().equals(OS_WINDOWS)) - return ".exe"; + if (getOs().equals(OS_WINDOWS)) { + return ".exe"; + } return ""; } } diff --git a/pom.xml b/pom.xml index fe9201c22..891503194 100644 --- a/pom.xml +++ b/pom.xml @@ -63,13 +63,18 @@ lee.becker@gmail.com Lee Becker + + martin.riedl + riedl.ma@gmail.com + Martin Riedl + - + cleartk-test-util cleartk-util - + cleartk-ml cleartk-ml-opennlp-maxent cleartk-ml-svmlight @@ -80,20 +85,20 @@ cleartk-ml-mallet cleartk-ml-crfsuite cleartk-ml-weka - + cleartk-eval - + cleartk-type-system cleartk-corpus cleartk-feature - + cleartk-snowball cleartk-opennlp-tools cleartk-berkeleyparser cleartk-clearnlp cleartk-maltparser cleartk-stanford-corenlp - + cleartk-token cleartk-summarization cleartk-timeml @@ -125,11 +130,11 @@ - + org.jdom - jdom - 2.0.2 + jdom2 + 2.0.6.1 org.jdom @@ -192,7 +197,7 @@ xmlunit-assertj3 ${xmlunit-version} - + org.cleartk cleartk-test-util @@ -404,8 +409,8 @@ - + org.eclipse.m2e lifecycle-mapping @@ -471,18 +476,18 @@ org.apache.maven.plugins maven-javadoc-plugin - + true - + org.cleartk:* - + true - + generated @@ -501,101 +506,101 @@ - + true - + true - + - - - + + + http://commons.apache.org/io/apidocs/ - + http://commons.apache.org/lang/apidocs/ - + http://commons.apache.org/logging/apidocs/ - + http://docs.guava-libraries.googlecode.com/git-history/v10.0/javadoc/ - + http://uima.apache.org/d/uimaj-2.3.1/api/ - + http://www.jdom.org/docs/apidocs/ - + http://joda-time.sourceforge.net/apidocs - - + + - + http://findbugs.sourceforge.net/api/ - + http://junit.org/apidocs/ - - + + - - + + - - + + - + http://logging.apache.org/log4j/1.2/apidocs/ - + http://lucene.apache.org/java/3_0_3/api/all/ - + http://mallet.cs.umass.edu/api/ - + http://maltparser.org/api/ - + http://incubator.apache.org/opennlp/documentation/apidocs/opennlp-maxent/ - + http://incubator.apache.org/opennlp/documentation/apidocs/opennlp-tools/ - + http://static.springsource.org/spring/docs/3.0.3.RELEASE/javadoc-api/ - + http://nlp.stanford.edu/nlp/javadoc/javanlp/ - - + + - - + + - + http://trove4j.sourceforge.net/javadocs/ - + http://uimafit.googlecode.com/svn/tags/uimafit-parent-1.2.0/apidocs/ - + http://xml.apache.org/xalan-j/apidocs/ - + https://xerces.apache.org/xerces2-j/javadocs/api/ - - + + - + http://xom.nu/apidocs/