From d0f3f7e6e89059f8dcc834ee4d0f3735eb976ab0 Mon Sep 17 00:00:00 2001 From: marmoure Date: Mon, 3 Jul 2023 19:54:58 +0200 Subject: [PATCH 1/6] [bugfix] Update the JAXB dependency --- pom.xml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/pom.xml b/pom.xml index f2c9d10..7a826f9 100755 --- a/pom.xml +++ b/pom.xml @@ -85,21 +85,22 @@ 1.0 - javax.xml.bind - jaxb-api - 2.3.1 - - - com.sun.xml.bind - jaxb-core - 2.3.0.1 - runtime + jakarta.xml.bind + jakarta.xml.bind-api + 2.3.3 + provided + + + + + + com.sun.xml.bind jaxb-impl - 2.3.1 - runtime + 2.3.3 + provided org.eclipse.persistence @@ -258,9 +259,9 @@ - org.jvnet.jaxb2.maven2 - maven-jaxb22-plugin - 0.14.0 + com.evolvedbinary.maven.jvnet + jaxb23-maven-plugin + 0.15.0 true @@ -302,7 +303,6 @@ org.glassfish.jersey.media:jersey-media-jaxb org.glassfish.jersey.inject:jersey-hk2 org.glassfish:javax.json - com.sun.xml.bind:jaxb-core com.sun.xml.bind:jaxb-impl From 2584807867845767920014a834111a792ff5c8dd Mon Sep 17 00:00:00 2001 From: marmoure Date: Thu, 6 Jul 2023 08:11:54 +0200 Subject: [PATCH 2/6] [feature] Update oXygen SDK to 25 --- pom.xml | 30 ++++++++---------------------- 1 file changed, 8 insertions(+), 22 deletions(-) diff --git a/pom.xml b/pom.xml index 7a826f9..8e78401 100755 --- a/pom.xml +++ b/pom.xml @@ -44,8 +44,8 @@ - 20.1.0.2 - 2.27 + 25.1.0.2 + 2.40 1.7.25 0.12.0 2.7.3 @@ -70,14 +70,13 @@ org.mozilla rhino - 1.7.7.1 - provided + 1.7.14 + provided net.sf.saxon Saxon-HE - 9.8.0-12 - provided + 11.4 com.evolvedbinary.xpath @@ -196,31 +195,18 @@ ${jersey.version} test - - + org.glassfish.jersey.core jersey-server ${jersey.version} test - - + commons-codec commons-codec - 1.11 + 1.14 test From ebef83b84715be34d732fd875e90d8abc8041e50 Mon Sep 17 00:00:00 2001 From: marmoure Date: Thu, 6 Jul 2023 12:28:22 +0200 Subject: [PATCH 3/6] [bugfix] Resolve undeclared dependencies --- pom.xml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pom.xml b/pom.xml index 8e78401..9a7f4e7 100755 --- a/pom.xml +++ b/pom.xml @@ -125,9 +125,9 @@ - javax.annotation - javax.annotation-api - 1.3.2 + jakarta.annotation + jakarta.annotation-api + 1.3.5 compile @@ -154,9 +154,9 @@ runtime - javax.ws.rs - javax.ws.rs-api - 2.1.1 + jakarta.ws.rs + jakarta.ws.rs-api + 2.1.6 org.slf4j @@ -291,6 +291,9 @@ org.glassfish:javax.json com.sun.xml.bind:jaxb-impl + + jakarta.annotation:jakarta.annotation-api + From 63bc27e02dd8d5fe92e9ff9ee71bb9f5cd4aced8 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Thu, 6 Jul 2023 17:13:19 +0200 Subject: [PATCH 4/6] [feature] Update dependencies --- pom.xml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pom.xml b/pom.xml index 9a7f4e7..1c1fe65 100755 --- a/pom.xml +++ b/pom.xml @@ -46,9 +46,9 @@ 25.1.0.2 2.40 - 1.7.25 - 0.12.0 - 2.7.3 + 2.0.7 + 0.13.1 + 2.7.10 1.8 1.8 UTF-8 @@ -89,12 +89,6 @@ 2.3.3 provided - - - - - - com.sun.xml.bind jaxb-impl @@ -170,6 +164,13 @@ ${jaxb2-basics.version} + + xml-apis + xml-apis + 1.4.01 + provided + + org.slf4j slf4j-log4j12 @@ -180,7 +181,7 @@ junit junit - 4.12 + 4.13.2 test From dff3e0a16c2e86f3858bc9382dc1a1122c634827 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Thu, 6 Jul 2023 17:14:58 +0200 Subject: [PATCH 5/6] [feature] Update Maven Plugin versions --- pom.xml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/pom.xml b/pom.xml index 1c1fe65..a7c1195 100755 --- a/pom.xml +++ b/pom.xml @@ -273,7 +273,7 @@ org.apache.maven.plugins maven-dependency-plugin - 3.1.1 + 3.6.0 analyze @@ -315,7 +315,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.10.1 + 3.11.0 ${project.build.source} ${project.build.target} @@ -353,7 +353,7 @@ org.apache.maven.plugins maven-shade-plugin - 3.4.1 + 3.5.0 package @@ -409,7 +409,7 @@ org.apache.maven.plugins maven-source-plugin - 3.2.1 + 3.3.0 @@ -442,7 +442,7 @@ org.apache.maven.plugins maven-enforcer-plugin - 3.1.0 + 3.3.0 enforce-java @@ -463,12 +463,12 @@ org.apache.maven.plugins maven-gpg-plugin - 3.0.1 + 3.1.0 org.apache.maven.plugins maven-release-plugin - 2.5.3 + 3.0.1 forked-path true From 354df7e37f1087bc4a7060afefc64a6bd2982414 Mon Sep 17 00:00:00 2001 From: Adam Retter Date: Mon, 10 Jul 2023 10:46:42 +0100 Subject: [PATCH 6/6] [feature] Update tests from JUnit 4 to JUnit 5 --- pom.xml | 26 ++++++++++++++++--- .../oxygen/tei/completer/XPathUtilTest.java | 19 +++++++++----- .../remote/impl/JerseyClientTest.java | 18 ++++++------- 3 files changed, 44 insertions(+), 19 deletions(-) diff --git a/pom.xml b/pom.xml index a7c1195..3a9c4d7 100755 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,7 @@ 2.0.7 0.13.1 2.7.10 + 5.9.3 1.8 1.8 UTF-8 @@ -179,9 +180,15 @@ - junit - junit - 4.13.2 + org.junit.jupiter + junit-jupiter-api + ${junit.jupiter.version} + test + + + org.junit.jupiter + junit-jupiter-engine + ${junit.jupiter.version} test @@ -291,6 +298,7 @@ org.glassfish.jersey.inject:jersey-hk2 org.glassfish:javax.json com.sun.xml.bind:jaxb-impl + org.junit.jupiter:junit-jupiter-engine jakarta.annotation:jakarta.annotation-api @@ -326,6 +334,18 @@ + + org.apache.maven.plugins + maven-surefire-plugin + 3.1.2 + + + org.junit.jupiter + junit-jupiter-engine + ${junit.jupiter.version} + + + org.apache.maven.plugins maven-jar-plugin diff --git a/src/test/java/org/humanistika/oxygen/tei/completer/XPathUtilTest.java b/src/test/java/org/humanistika/oxygen/tei/completer/XPathUtilTest.java index b6479b6..deb3be7 100644 --- a/src/test/java/org/humanistika/oxygen/tei/completer/XPathUtilTest.java +++ b/src/test/java/org/humanistika/oxygen/tei/completer/XPathUtilTest.java @@ -23,10 +23,11 @@ import static com.evolvedbinary.xpath.parser.ast.QNameW.WILDCARD; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; /** * @author Adam Retter, Evolved Binary Ltd @@ -66,14 +67,18 @@ public void isSubset() { // assertTrue(XPathUtil.isSubset("/TEI/text[1]/body[1]/p[2]/w[7]/@lemma", "//w")); } - @Test(expected = IllegalArgumentException.class) + @Test public void isSubset_illegalSubset() { - XPathUtil.isSubset("a/b", "//a"); + assertThrows(IllegalArgumentException.class, () -> + XPathUtil.isSubset("a/b", "//a") + ); } - @Test(expected = IllegalArgumentException.class) + @Test public void isSubset_illegalSuperset() { - XPathUtil.isSubset("//a", "a/b"); + assertThrows(IllegalArgumentException.class, () -> + XPathUtil.isSubset("//a", "a/b") + ); } @Test diff --git a/src/test/java/org/humanistika/oxygen/tei/completer/remote/impl/JerseyClientTest.java b/src/test/java/org/humanistika/oxygen/tei/completer/remote/impl/JerseyClientTest.java index 67b9ed4..7e54180 100644 --- a/src/test/java/org/humanistika/oxygen/tei/completer/remote/impl/JerseyClientTest.java +++ b/src/test/java/org/humanistika/oxygen/tei/completer/remote/impl/JerseyClientTest.java @@ -30,8 +30,8 @@ import org.humanistika.oxygen.tei.completer.configuration.beans.ResponseAction; import org.humanistika.oxygen.tei.completer.remote.ClientFactory.AuthenticationType; import javax.annotation.Nullable; -import org.junit.Ignore; -import org.junit.Test; +import org.junit.jupiter.api.Disabled; +import org.junit.jupiter.api.Test; import javax.annotation.security.PermitAll; import javax.annotation.security.RolesAllowed; @@ -53,7 +53,7 @@ import java.security.Principal; import java.util.zip.GZIPOutputStream; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; /** * Integration tests for {@link org.humanistika.oxygen.tei.completer.remote.impl.JerseyClient} @@ -492,7 +492,7 @@ public void secure_preemptiveBasic_GetLemmaSelectionDependent_Xml() { assertEquals(expectedSuggestions.getSuggestion(), suggestions.getSuggestion()); } - @Ignore("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") + @Disabled("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") @Test public void secure_nonPreemptiveBasic_GetLemmaSelection_Xml() { final String selection = "some-selection"; @@ -507,7 +507,7 @@ public void secure_nonPreemptiveBasic_GetLemmaSelection_Xml() { assertEquals(expectedSuggestions.getSuggestion(), suggestions.getSuggestion()); } - @Ignore("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") + @Disabled("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") @Test public void secure_nonPreemptiveBasic_GetLemmaSelectionDependent_Xml() { final String selection = "some-selection"; @@ -522,7 +522,7 @@ public void secure_nonPreemptiveBasic_GetLemmaSelectionDependent_Xml() { assertEquals(expectedSuggestions.getSuggestion(), suggestions.getSuggestion()); } - @Ignore("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") + @Disabled("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") @Test public void secure_Digest_GetLemmaSelection_Xml() { final String selection = "some-selection"; @@ -537,7 +537,7 @@ public void secure_Digest_GetLemmaSelection_Xml() { assertEquals(expectedSuggestions.getSuggestion(), suggestions.getSuggestion()); } - @Ignore("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") + @Disabled("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") @Test public void secure_Digest_GetLemmaSelectionDependent_Xml() { final String selection = "some-selection"; @@ -552,7 +552,7 @@ public void secure_Digest_GetLemmaSelectionDependent_Xml() { assertEquals(expectedSuggestions.getSuggestion(), suggestions.getSuggestion()); } - @Ignore("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") + @Disabled("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") @Test public void secure_nonPreemptiveBasicDigest_GetLemmaSelection_Xml() { final String selection = "some-selection"; @@ -567,7 +567,7 @@ public void secure_nonPreemptiveBasicDigest_GetLemmaSelection_Xml() { assertEquals(expectedSuggestions.getSuggestion(), suggestions.getSuggestion()); } - @Ignore("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") + @Disabled("Requires non-preemptive support in Jersey Server. See https://java.net/jira/browse/JERSEY-2908") @Test public void secure_nonPreemptiveBasicDigest_GetLemmaSelectionDependent_Xml() { final String selection = "some-selection";