Adjusting Jersey archetypes (#4710)
* Adjust Jersey archetypes
* Platform independent space
* Java version for archetypes set to 1.8
Signed-off-by: Maxim Nesen <maxim.nesen@oracle.com>
diff --git a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
index 8b30af9..c06e210 100644
--- a/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-example-java8-webapp/src/main/resources/archetype-resources/pom.xml
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
- Copyright (c) 2015, 2019 Oracle and/or its affiliates. All rights reserved.
+ Copyright (c) 2015, 2021 Oracle and/or its affiliates. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License v. 2.0, which is available at
@@ -81,8 +81,6 @@
<plugin>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-maven-plugin</artifactId>
- <!-- TODO: Remove the version when JERSEY-2743 is resolved. -->
- <version>9.2.6.v20141205</version>
<configuration>
<scanIntervalSeconds>5</scanIntervalSeconds>
<stopPort>9999</stopPort>
diff --git a/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml
index e34d3ce..76219c4 100644
--- a/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/pom.xml
@@ -64,11 +64,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
+ <version>3.8.1</version>
<inherited>true</inherited>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
<plugin>
@@ -106,6 +106,6 @@
<properties>
<jersey.version>${project.version}</jersey.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <jetty.version>9.0.6.v20130930</jetty.version>
+ <jetty.version>9.4.28.v20200408</jetty.version>
</properties>
</project>
diff --git a/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/system.properties b/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/system.properties
index 4d46ac0..916c446 100644
--- a/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/system.properties
+++ b/archetypes/jersey-heroku-webapp/src/main/resources/archetype-resources/system.properties
@@ -1 +1 @@
-java.runtime.version=1.7
\ No newline at end of file
+java.runtime.version=1.8
\ No newline at end of file
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
index 053b38c..42416bb 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/pom.xml
@@ -50,11 +50,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
+ <version>3.8.1</version>
<inherited>true</inherited>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
<plugin>
diff --git a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java
index a97cf63..ac7875a 100644
--- a/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java
+++ b/archetypes/jersey-quickstart-grizzly2/src/main/resources/archetype-resources/src/main/java/Main.java
@@ -13,7 +13,7 @@
*/
public class Main {
// Base URI the Grizzly HTTP server will listen on
- public static final String BASE_URI = "http://localhost:8080/myapp/";
+ public static final String BASE_URI = "http://localhost:8080/";
/**
* Starts Grizzly HTTP server exposing JAX-RS resources defined in this application.
@@ -36,8 +36,8 @@
*/
public static void main(String[] args) throws IOException {
final HttpServer server = startServer();
- System.out.println(String.format("Jersey app started with WADL available at "
- + "%sapplication.wadl\nHit enter to stop it...", BASE_URI));
+ System.out.println(String.format("Jersey app started with endpoints available at "
+ + "%s%nHit Ctrl-C to stop it...", BASE_URI));
System.in.read();
server.stop();
}
diff --git a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
index 49c9e7d..bddb095 100644
--- a/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
+++ b/archetypes/jersey-quickstart-webapp/src/main/resources/archetype-resources/pom.xml
@@ -15,11 +15,11 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>2.5.1</version>
+ <version>3.8.1</version>
<inherited>true</inherited>
<configuration>
- <source>1.7</source>
- <target>1.7</target>
+ <source>1.8</source>
+ <target>1.8</target>
</configuration>
</plugin>
</plugins>