diff --git a/mvn.sh b/mvn.sh index a3a0c082e602b6fa6a69c4d3360e321ede2ff02e..5d5927ed39eb9bad56fff346d19ef9c5981e11d2 100755 --- a/mvn.sh +++ b/mvn.sh @@ -13,5 +13,5 @@ docker run \ --rm \ --env PUID="$(id -u)" -e PGID="$(id -g)" \ --env MAVEN_CONFIG=/var/maven/.m2 \ - brunoe/maven:3.6.3-jdk-15 \ + brunoe/maven:3.8.1-jdk-16 \ runuser --user user --group user -- mvn -B -e -T 1C -Duser.home=/var/maven --settings /usr/src/mymaven/.github/ci-settings.xml "$@" \ No newline at end of file diff --git a/pom.xml b/pom.xml index 7665a36666ba2bb0bbbecec7bcb6c040bdbb407f..832730b986b2961eca0c9609c8833ed7c7c1edd5 100644 --- a/pom.xml +++ b/pom.xml @@ -31,6 +31,21 @@ <type>pom</type> <scope>import</scope> </dependency> + <dependency> + <groupId>com.sun.activation</groupId> + <artifactId>jakarta.activation</artifactId> + <version>2.0.1</version> + </dependency> + <dependency> + <groupId>com.sun.istack</groupId> + <artifactId>istack-commons-runtime</artifactId> + <version>4.0.1</version> + </dependency> + <dependency> + <groupId>jakarta.activation</groupId> + <artifactId>jakarta.activation-api</artifactId> + <version>2.0.1</version> + </dependency> </dependencies> </dependencyManagement> <dependencies> @@ -61,6 +76,7 @@ <version>3.0.0</version> <scope>runtime</scope> </dependency> + <!--dependency> <groupId>org.eclipse.persistence</groupId> <artifactId>org.eclipse.persistence.moxy</artifactId> @@ -139,14 +155,14 @@ <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> - <version>4.13.1</version> + <version>4.13.2</version> <scope>test</scope> </dependency> <!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 --> <dependency> <groupId>org.apache.commons</groupId> <artifactId>commons-lang3</artifactId> - <version>3.11</version> + <version>3.12.0</version> <scope>test</scope> </dependency> @@ -340,7 +356,7 @@ <version>3.5.4</version> </requireMavenVersion> <requireJavaVersion> - <version>15</version> + <version>16</version> </requireJavaVersion> <DependencyConvergence /> </rules> diff --git a/queries/sample-requests.rest b/queries/sample-requests.rest index 2c2e2235bb00c6f37a348c34450f3bcb30fb2262..37e8f6a5b14c5f6ed701b0c716041936a8db7629 100644 --- a/queries/sample-requests.rest +++ b/queries/sample-requests.rest @@ -1,4 +1,8 @@ ### Get a Hello message +GET http://localhost:9998/mylibrary/library/hello +Accept: text/plain + +### Get the whole library GET http://localhost:9998/mylibrary/library ### Init the database with two authors diff --git a/src/main/java/fr/univtln/bruno/samples/jaxrs/resources/LibraryResource.java b/src/main/java/fr/univtln/bruno/samples/jaxrs/resources/LibraryResource.java index 9da6dbd2fa182b1cb02343f997faeec4059697b5..a6eaaf058e387b3a4e9040abbf5367c5546ba63a 100644 --- a/src/main/java/fr/univtln/bruno/samples/jaxrs/resources/LibraryResource.java +++ b/src/main/java/fr/univtln/bruno/samples/jaxrs/resources/LibraryResource.java @@ -30,6 +30,7 @@ public class LibraryResource { */ @SuppressWarnings("SameReturnValue") @GET + @Path("hello") @Produces(MediaType.TEXT_PLAIN) public String sayHello() { return "hello"; diff --git a/src/test/java/fr/univtln/bruno/samples/jaxrs/ServerIT.java b/src/test/java/fr/univtln/bruno/samples/jaxrs/ServerIT.java index 093b4cf08347a95cb587ca83db00f5f47c54bbaf..56244e5734138beb943408e7e1ad5d4a7baf2a5b 100644 --- a/src/test/java/fr/univtln/bruno/samples/jaxrs/ServerIT.java +++ b/src/test/java/fr/univtln/bruno/samples/jaxrs/ServerIT.java @@ -75,7 +75,7 @@ public class ServerIT { @Test public void testHello() { - String hello = webTarget.path("library").request(MediaType.TEXT_PLAIN).get(String.class); + String hello = webTarget.path("library/hello").request(MediaType.TEXT_PLAIN).get(String.class); assertEquals("hello", hello); }