diff --git a/src/it/java/org/eclipse/microprofile/starter/utils/Whitelist.java b/src/it/java/org/eclipse/microprofile/starter/utils/Whitelist.java index 794d70ef..fb384455 100755 --- a/src/it/java/org/eclipse/microprofile/starter/utils/Whitelist.java +++ b/src/it/java/org/eclipse/microprofile/starter/utils/Whitelist.java @@ -37,6 +37,7 @@ public enum Whitelist { Pattern.compile(".*com.hazelcast.internal.server.tcp.TcpServerConnectionErrorHandler.*"), Pattern.compile(".*error_prone_annotations.*"), Pattern.compile(".*error_prone_parent.*"), + Pattern.compile(".*com.hazelcast:name=payara.micro.*"), }), LIBERTY("liberty", new Pattern[]{ Pattern.compile(".*FrameworkEvent ERROR.*"), diff --git a/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/server/PayaraMicroServer.java b/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/server/PayaraMicroServer.java index a7440799..f7c06b2f 100644 --- a/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/server/PayaraMicroServer.java +++ b/src/main/java/org/eclipse/microprofile/starter/addon/microprofile/servers/server/PayaraMicroServer.java @@ -69,17 +69,22 @@ public void createFiles(JessieModel model) { @Override public void adaptMavenModel(Model pomFile, JessieModel model, boolean mainProject) { String payaraVersion = definePayaraVersion(model); + String payaraMavenPluginVersion = definePayaraMavenPluginVersion(payaraVersion); pomFile.addProperty("payaraVersion", payaraVersion); + pomFile.addProperty("payaraMavenPluginVersion", payaraMavenPluginVersion); + } + + private String definePayaraMavenPluginVersion(String payaraVersion) { + return payaraVersion.startsWith("5") ? "1.4.0" : "2.1"; } private String definePayaraVersion(JessieModel model) { String payaraVersion = ""; switch (model.getSpecification().getMicroProfileVersion()) { - case NONE: break; case MP50: - payaraVersion = "6.2024.1"; + payaraVersion = "6.2023.2"; break; case MP40: payaraVersion = "5.2021.1"; diff --git a/src/main/resources/files/gradle/gradlew.bat.tpl b/src/main/resources/files/gradle/gradlew.bat.tpl index 6689b85b..ff5d9ced 100644 --- a/src/main/resources/files/gradle/gradlew.bat.tpl +++ b/src/main/resources/files/gradle/gradlew.bat.tpl @@ -14,6 +14,9 @@ @rem limitations under the License. @rem +@rem Add -Djdk.util.zip.disableZip64ExtraFieldValidation=true into ENV: JAVA_TOOL_OPTIONS +set "JAVA_TOOL_OPTIONS=-Djdk.util.zip.disableZip64ExtraFieldValidation=true %JAVA_TOOL_OPTIONS%" + @if "%DEBUG%"=="" @echo off @rem ########################################################################## @rem diff --git a/src/main/resources/files/gradle/gradlew.tpl b/src/main/resources/files/gradle/gradlew.tpl index 65dcd68d..1d7872a5 100755 --- a/src/main/resources/files/gradle/gradlew.tpl +++ b/src/main/resources/files/gradle/gradlew.tpl @@ -85,6 +85,9 @@ done APP_BASE_NAME=${0##*/} APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit +# Add -Djdk.util.zip.disableZip64ExtraFieldValidation=true into ENV: JAVA_TOOL_OPTIONS +export JAVA_TOOL_OPTIONS="-Djdk.util.zip.disableZip64ExtraFieldValidation=true $JAVA_TOOL_OPTIONS" + # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"' diff --git a/src/main/resources/files/readme.md.secondary.tpl b/src/main/resources/files/readme.md.secondary.tpl index 12e5bdf3..8d414f83 100755 --- a/src/main/resources/files/readme.md.secondary.tpl +++ b/src/main/resources/files/readme.md.secondary.tpl @@ -9,8 +9,13 @@ The generation of the executable jar file can be performed by issuing the follow mvn clean package This will create an executable jar file **[# th:text="${jar_file}"/]** within the _target_ maven folder. This can be started by executing the following command +[# th:if="${mp_servername} == 'payara-micro'"] + java -Djdk.util.zip.disableZip64ExtraFieldValidation=true -jar target/[# th:text="${jar_file}"/] [# th:text="${jar_parameters}"/] +[/] +[# th:unless="${mp_servername} == 'payara-micro'"] java -jar target/[# th:text="${jar_file}"/] [# th:text="${jar_parameters}"/] [/] +[/] [# th:if="${build_tool} == 'GRADLE'"] [# th:if="${mp_servername} == 'payara-micro'"] ./gradlew microBundle diff --git a/src/main/resources/files/readme.md.tpl b/src/main/resources/files/readme.md.tpl index d95613ab..1c4f1acc 100755 --- a/src/main/resources/files/readme.md.tpl +++ b/src/main/resources/files/readme.md.tpl @@ -11,7 +11,12 @@ The generation of the executable jar file can be performed by issuing the follow This will create an executable jar file **[# th:text="${jar_file}"/]** within the _target_ maven folder. This can be started by executing the following command +[# th:if="${mp_servername} == 'payara-micro'"] + java -Djdk.util.zip.disableZip64ExtraFieldValidation=true -jar target/[# th:text="${jar_file}"/] +[/] +[# th:unless="${mp_servername} == 'payara-micro'"] java -jar target/[# th:text="${jar_file}"/] +[/] [/][# th:if="${build_tool} == 'GRADLE'"] [# th:if="${mp_servername} == 'payara-micro'"] diff --git a/src/main/resources/pom-servers.xml b/src/main/resources/pom-servers.xml index 6aebf992..6274e3e2 100755 --- a/src/main/resources/pom-servers.xml +++ b/src/main/resources/pom-servers.xml @@ -330,7 +330,7 @@ fish.payara.maven.plugins payara-micro-maven-plugin - 2.1 + ${payaraMavenPluginVersion} package diff --git a/src/test/resources/readme_examples/py-service-a-readme.md b/src/test/resources/readme_examples/py-service-a-readme.md index c2ba9016..1c14b628 100644 --- a/src/test/resources/readme_examples/py-service-a-readme.md +++ b/src/test/resources/readme_examples/py-service-a-readme.md @@ -10,7 +10,7 @@ The generation of the executable jar file can be performed by issuing the follow This will create an executable jar file **payara-microbundle.jar** within the _target_ maven folder. This can be started by executing the following command - java -jar target/payara-microbundle.jar + java -Djdk.util.zip.disableZip64ExtraFieldValidation=true -jar target/payara-microbundle.jar diff --git a/src/test/resources/readme_examples/py-service-b-readme.md b/src/test/resources/readme_examples/py-service-b-readme.md index dfcda094..2d15f426 100644 --- a/src/test/resources/readme_examples/py-service-b-readme.md +++ b/src/test/resources/readme_examples/py-service-b-readme.md @@ -10,7 +10,7 @@ The generation of the executable jar file can be performed by issuing the follow This will create an executable jar file **payara-microbundle.jar** within the _target_ maven folder. This can be started by executing the following command - java -jar target/payara-microbundle.jar --port 8180 + java -Djdk.util.zip.disableZip64ExtraFieldValidation=true -jar target/payara-microbundle.jar --port 8180