diff --git a/.github/workflows/validate.yml b/.github/workflows/validate.yml index 4fe653728ed..1a35822dc9d 100644 --- a/.github/workflows/validate.yml +++ b/.github/workflows/validate.yml @@ -7,8 +7,8 @@ name: "Validate" on: [pull_request, push] env: - JAVA_VERSION: '20' - JAVA_DISTRO: 'oracle' + JAVA_RELEASE: '21' + JAVA_DISTRO: 'jdk.java.net' HELIDON_PIPELINES: 'true' MAVEN_HTTP_ARGS: '-Dmaven.wagon.httpconnectionManager.ttlSeconds=60 -Dmaven.wagon.http.retryHandler.count=3' @@ -25,10 +25,10 @@ jobs: with: fetch-depth: 0 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Copyright run: etc/scripts/copyright.sh @@ -38,10 +38,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Checkstyle run: etc/scripts/checkstyle.sh @@ -51,10 +51,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Spotbugs run: etc/scripts/spotbugs.sh @@ -64,10 +64,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Docs run: etc/scripts/site.sh @@ -80,10 +80,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Maven build run: etc/scripts/github-build.sh @@ -96,10 +96,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Maven build run: | @@ -116,10 +116,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Maven build run: etc/scripts/mp-tck.sh @@ -132,10 +132,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Test archetypes run: etc/scripts/test-archetypes.sh @@ -148,10 +148,10 @@ jobs: steps: - uses: actions/checkout@v3 - name: Set up JDK ${{ env.JAVA_VERSION }} - uses: actions/setup-java@v3.11.0 + uses: oracle-actions/setup-java@v1.3.1 with: - distribution: ${{ env.JAVA_DISTRO }} - java-version: ${{ env.JAVA_VERSION }} + website: ${{ env.JAVA_DISTRO }} + release: ${{ env.JAVA_RELEASE }} cache: maven - name: Build Helidon run: etc/scripts/github-compile.sh diff --git a/.mvn/jvm.config b/.mvn/jvm.config new file mode 100644 index 00000000000..27456518807 --- /dev/null +++ b/.mvn/jvm.config @@ -0,0 +1 @@ +-Dnet.bytebuddy.experimental=true diff --git a/README.md b/README.md index 656698373c9..39e23427660 100644 --- a/README.md +++ b/README.md @@ -24,8 +24,7 @@ Helidon supports two programming models: In either case your application is just a Java SE program. ## Early access branch -This branch requires Java 20 early access release with Loom support. -Applications written using this version will require `--enable-preview` to be used when starting JVM. +This branch requires Java 21 early access release. Kindly use latest official release to work with Java 17, unless you are interested in the newest and greatest! ## License diff --git a/applications/parent/pom.xml b/applications/parent/pom.xml index 72d5d4a16be..42ded39273c 100644 --- a/applications/parent/pom.xml +++ b/applications/parent/pom.xml @@ -35,7 +35,7 @@ UTF-8 UTF-8 - 20 + 21 ${maven.compiler.source} ${maven.compiler.source} 3.8.1 @@ -77,7 +77,6 @@ ${project.build.outputDirectory}/logging.properties - --enable-preview @@ -87,7 +86,6 @@ false true - --enable-preview @@ -158,9 +156,6 @@ ${helidon.version} - - --enable-preview - io.helidon.build-tools @@ -205,7 +200,6 @@ --add-exports=org.graalvm.nativeimage.builder/com.oracle.svm.core.configure=ALL-UNNAMED - --enable-preview diff --git a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache index 26e49853284..08ada4f85aa 100644 --- a/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/Dockerfile.native.mustache @@ -1,6 +1,6 @@ # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java21-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/archetypes/helidon/src/main/archetype/common/files/README.md.mustache b/archetypes/helidon/src/main/archetype/common/files/README.md.mustache index f55feffaf1d..f26910edc3b 100644 --- a/archetypes/helidon/src/main/archetype/common/files/README.md.mustache +++ b/archetypes/helidon/src/main/archetype/common/files/README.md.mustache @@ -15,7 +15,7 @@ With JDK20 ```bash mvn package -java --enable-preview -jar target/{{artifactId}}.jar +java -jar target/{{artifactId}}.jar ``` {{/readme-run-commands}} diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 22c562aed16..2b90bf8d7ea 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -40,9 +40,9 @@ 1.18 1.3.5 1.0.0 - 1.0.4 1.2 9.1.6 + 19.3.0.0 4.1.2 4.0.1 4.0.2 @@ -58,7 +58,7 @@ 2.9.0 1.56.0 32.0.1-jre - 2.1.212 + 2.2.220 1.3 4.3.1 6.1.7.Final @@ -123,13 +123,12 @@ 4.9.1 8.4.1.jre8 8.0.28 - 5.12.0.Final + 5.13.1.Final 4.4.11 4.1.94.Final 0.0.8.Final 3.12.1 21.3.0.0 - 19.3.0.0 3.14.9 1.17.5 1.22.0-alpha @@ -143,6 +142,7 @@ 1.0.2 42.4.3 0.16.0 + 1.0.4 2.0.0 3.3.4 2.0 diff --git a/docs/includes/prerequisites.adoc b/docs/includes/prerequisites.adoc index d0c968c4bd2..e8a46201d46 100644 --- a/docs/includes/prerequisites.adoc +++ b/docs/includes/prerequisites.adoc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// - Copyright (c) 2022 Oracle and/or its affiliates. + Copyright (c) 2022, 2023 Oracle and/or its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -35,7 +35,7 @@ ifndef::h1-prefix[:h1-prefix: SE] |A Helidon {flavor-uc} Application | You can use your own application or use the xref:{rootdir}/{flavor-lc}/guides/quickstart.adoc[Helidon {flavor-uc} Quickstart] to create a sample application. // tag::prerequisites-table-details[] -|https://www.oracle.com/technetwork/java/javase/downloads[Java{nbsp}SE{nbsp}17] (http://jdk.java.net[Open{nbsp}JDK{nbsp}17]) |Helidon requires Java 17+. +|https://www.oracle.com/technetwork/java/javase/downloads[Java{nbsp}SE{nbsp}21] (http://jdk.java.net[Open{nbsp}JDK{nbsp}21]) |Helidon requires Java 21+. |https://maven.apache.org/download.cgi[Maven 3.6.1+]|Helidon requires Maven 3.6.1+. |https://docs.docker.com/install/[Docker 18.09+]|You need Docker if you want to build and deploy Docker containers. diff --git a/docs/mp/persistence.adoc b/docs/mp/persistence.adoc index 39d0cdb8de3..f0b4cac8f37 100644 --- a/docs/mp/persistence.adoc +++ b/docs/mp/persistence.adoc @@ -1,6 +1,6 @@ /////////////////////////////////////////////////////////////////////////////// - Copyright (c) 2022 Oracle and/or its affiliates. + Copyright (c) 2022, 2023 Oracle and/or its affiliates. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. @@ -251,7 +251,7 @@ managed] <2> The `ojdbc11` artifact https://www.oracle.com/database/technologies/maven-central-guide.html#:~:text=ojdbc11.jar,JDK14%20and%20JDK15[implements relevant parts of the JDBC 4.3 specification], which forms part of - Java 17, which is the Java version targeted by Helidon 3. + Java 21, which is the Java version targeted by Helidon 4. <3> The `scope` is `runtime`, indicating that the Oracle JDBC driver classes will be available on the runtime classpath. diff --git a/etc/copyright-exclude.txt b/etc/copyright-exclude.txt index 39643e9ff88..4aba77090ab 100644 --- a/etc/copyright-exclude.txt +++ b/etc/copyright-exclude.txt @@ -1,3 +1,4 @@ +jvm.config .iml .apt .args diff --git a/etc/scripts/test-packaging-jar.sh b/etc/scripts/test-packaging-jar.sh index b4d55d35701..4fcddfec327 100755 --- a/etc/scripts/test-packaging-jar.sh +++ b/etc/scripts/test-packaging-jar.sh @@ -37,10 +37,10 @@ mvn ${MAVEN_ARGS} -e clean install # cd ${WS_DIR}/tests/integration/native-image/mp-1 # Classpath -java --enable-preview -jar target/helidon-tests-native-image-mp-1.jar +java -jar target/helidon-tests-native-image-mp-1.jar # Module Path -java --enable-preview --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \ +java --module-path target/helidon-tests-native-image-mp-1.jar:target/libs \ --module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main # @@ -48,10 +48,10 @@ java --enable-preview --module-path target/helidon-tests-native-image-mp-1.jar:t # cd ${WS_DIR}/tests/integration/native-image/mp-3 # Classpath -java --enable-preview -Dexit.on.started=! -jar target/helidon-tests-native-image-mp-3.jar +java -Dexit.on.started=! -jar target/helidon-tests-native-image-mp-3.jar # Module Path -java --enable-preview -Dexit.on.started=! \ +java -Dexit.on.started=! \ --module-path target/helidon-tests-native-image-mp-3.jar:target/libs \ --add-modules helidon.tests.nimage.quickstartmp \ --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main diff --git a/etc/scripts/test-packaging-jlink.sh b/etc/scripts/test-packaging-jlink.sh index d4dc6b06339..94340476f2c 100755 --- a/etc/scripts/test-packaging-jlink.sh +++ b/etc/scripts/test-packaging-jlink.sh @@ -30,6 +30,9 @@ cd ${WS_DIR}/tests/integration/native-image # Prime build all native-image tests mvn ${MAVEN_ARGS} -e clean install +echo Skipping jlink tests, until we switch to Smallrye based Jandex in build tools - org.jboss fails with NPE on Java 21 +exit 0 + # Build jlink images # mp-2 fails because of https://github.com/oracle/helidon-build-tools/issues/478 readonly native_image_tests="mp-1 mp-3" @@ -45,11 +48,10 @@ cd ${WS_DIR}/tests/integration/native-image/mp-1 jri_dir=${WS_DIR}/tests/integration/native-image/mp-1/target/helidon-tests-native-image-mp-1-jri # Classpath -${jri_dir}/bin/start --jvm --enable-preview +${jri_dir}/bin/start # Module Path ${jri_dir}/bin/java \ - --enable-preview \ --module-path ${jri_dir}/app/helidon-tests-native-image-mp-1.jar:${jri_dir}/app/libs \ --module helidon.tests.nimage.mp/io.helidon.tests.integration.nativeimage.mp1.Mp1Main @@ -58,11 +60,10 @@ cd ${WS_DIR}/tests/integration/native-image/mp-3 jri_dir=${WS_DIR}/tests/integration/native-image/mp-3/target/helidon-tests-native-image-mp-3-jri # Classpath -${jri_dir}/bin/start --test --jvm --enable-preview +${jri_dir}/bin/start --test # Module Path ${jri_dir}/bin/java -Dexit.on.started=! \ - --enable-preview \ --module-path ${jri_dir}/app/helidon-tests-native-image-mp-3.jar:${jri_dir}/app/libs \ --add-modules helidon.tests.nimage.quickstartmp \ --module io.helidon.microprofile.cdi/io.helidon.microprofile.cdi.Main diff --git a/etc/scripts/test-packaging-native.sh b/etc/scripts/test-packaging-native.sh index d1ebfd720df..7b90b02862d 100755 --- a/etc/scripts/test-packaging-native.sh +++ b/etc/scripts/test-packaging-native.sh @@ -39,8 +39,7 @@ mvn ${MAVEN_ARGS} --version echo "GRAALVM_HOME=${GRAALVM_HOME}"; ${GRAALVM_HOME}/bin/native-image --version; -# TODO:java19 -echo Skipping native image tests, until we have a Java 19 build +echo Skipping native image tests, until we have a Java 21 build exit 0 # Temporary workaround until job stages will share maven repository diff --git a/examples/jbatch/pom.xml b/examples/jbatch/pom.xml index 56bdea51824..fcb6c909d0f 100644 --- a/examples/jbatch/pom.xml +++ b/examples/jbatch/pom.xml @@ -105,15 +105,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - org.apache.maven.plugins maven-dependency-plugin diff --git a/examples/messaging/README.md b/examples/messaging/README.md index 86cbfcf362f..327077816b7 100644 --- a/examples/messaging/README.md +++ b/examples/messaging/README.md @@ -2,7 +2,7 @@ ## Prerequisites * Docker -* Java 17+ +* Java 21+ ### Test Kafka server To make examples easily runnable, diff --git a/examples/messaging/jms-websocket-mp/README.md b/examples/messaging/jms-websocket-mp/README.md index 0cd4c974d0a..9c7de44e4b4 100644 --- a/examples/messaging/jms-websocket-mp/README.md +++ b/examples/messaging/jms-websocket-mp/README.md @@ -1,7 +1,7 @@ # Helidon Messaging with JMS Example ## Prerequisites -* Java 17+ +* Java 21+ * Docker * [ActiveMQ server](../README.md) running on `localhost:61616` diff --git a/examples/messaging/jms-websocket-se/README.md b/examples/messaging/jms-websocket-se/README.md index 7bc0880a588..5b8a223bac4 100644 --- a/examples/messaging/jms-websocket-se/README.md +++ b/examples/messaging/jms-websocket-se/README.md @@ -1,7 +1,7 @@ # Helidon Messaging with JMS Example ## Prerequisites -* Java 17+ +* Java 21+ * Docker * [ActiveMQ server](../README.md) running on `localhost:61616` diff --git a/examples/messaging/kafka-websocket-mp/README.md b/examples/messaging/kafka-websocket-mp/README.md index ad84deda0be..3a815337b34 100644 --- a/examples/messaging/kafka-websocket-mp/README.md +++ b/examples/messaging/kafka-websocket-mp/README.md @@ -2,7 +2,7 @@ ## Prerequisites * Docker -* Java 17+ +* Java 21+ * [Kafka bootstrap server](../README.md) running on `localhost:9092` ## Build & Run diff --git a/examples/messaging/kafka-websocket-se/README.md b/examples/messaging/kafka-websocket-se/README.md index 604aa5cf4b2..505e25afd3b 100644 --- a/examples/messaging/kafka-websocket-se/README.md +++ b/examples/messaging/kafka-websocket-se/README.md @@ -1,7 +1,7 @@ # Helidon Messaging with Kafka Examples ## Prerequisites -* Java 17+ +* Java 21+ * Docker * [Kafka bootstrap server](../README.md) running on `localhost:9092` diff --git a/examples/messaging/oracle-aq-websocket-mp/README.md b/examples/messaging/oracle-aq-websocket-mp/README.md index acf5e4f4dad..1d66e681e3d 100644 --- a/examples/messaging/oracle-aq-websocket-mp/README.md +++ b/examples/messaging/oracle-aq-websocket-mp/README.md @@ -1,7 +1,7 @@ # Helidon Messaging with Oracle AQ Example ## Prerequisites -* Java 17+ +* Java 21+ * Docker * [Oracle database](../README.md) running on `localhost:1521` diff --git a/examples/messaging/weblogic-jms-mp/README.md b/examples/messaging/weblogic-jms-mp/README.md index 56414c125ef..21023110bf4 100644 --- a/examples/messaging/weblogic-jms-mp/README.md +++ b/examples/messaging/weblogic-jms-mp/README.md @@ -19,6 +19,6 @@ To run Helidon with thin client, flag `--add-opens=java.base/java.io=ALL-UNNAMED` is needed to open java.base module to thin client internals. 1. `mvn clean package` -2. `java --add-opens=java.base/java.io=ALL-UNNAMED --enable-preview -jar ./target/weblogic-jms-mp.jar` +2. `java --add-opens=java.base/java.io=ALL-UNNAMED -jar ./target/weblogic-jms-mp.jar` 3. Visit http://localhost:8080 and try to send and receive messages over Weblogic JMS queue. diff --git a/examples/microprofile/static-content/pom.xml b/examples/microprofile/static-content/pom.xml index 27abb465b5a..bd3e2b9c4e0 100644 --- a/examples/microprofile/static-content/pom.xml +++ b/examples/microprofile/static-content/pom.xml @@ -90,15 +90,11 @@ **/*$* io/helidon/microprofile/example/staticc/StaticContentTest.java - --enable-preview org.apache.maven.plugins maven-failsafe-plugin - - --enable-preview - Run integration tests diff --git a/examples/nima/fault-tolerance/pom.xml b/examples/nima/fault-tolerance/pom.xml index f21d802f3f6..13c125ddb6f 100644 --- a/examples/nima/fault-tolerance/pom.xml +++ b/examples/nima/fault-tolerance/pom.xml @@ -109,7 +109,6 @@ -Aio.helidon.inject.autoAddNonContractInterfaces=true - --enable-preview diff --git a/examples/nima/imperative/pom.xml b/examples/nima/imperative/pom.xml index 3f392dc73b9..c963c54cc04 100644 --- a/examples/nima/imperative/pom.xml +++ b/examples/nima/imperative/pom.xml @@ -62,15 +62,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - org.apache.maven.plugins maven-dependency-plugin diff --git a/examples/nima/quickstart-standalone/pom.xml b/examples/nima/quickstart-standalone/pom.xml index eb1825526b4..ad466403058 100644 --- a/examples/nima/quickstart-standalone/pom.xml +++ b/examples/nima/quickstart-standalone/pom.xml @@ -29,7 +29,7 @@ UTF-8 UTF-8 - 20 + 21 ${maven.compiler.source} ${maven.compiler.source} @@ -127,23 +127,12 @@ - - org.apache.maven.plugins - maven-compiler-plugin - ${version.plugin.compiler} - - - --enable-preview - - - org.apache.maven.plugins maven-surefire-plugin ${version.plugin.surefire} false - --enable-preview false @@ -154,7 +143,6 @@ false true - --enable-preview diff --git a/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native b/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native index c1cc5e0f29c..48098ab7055 100644 --- a/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native +++ b/examples/quickstarts/helidon-quickstart-mp/Dockerfile.native @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java21-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-quickstart-se/Dockerfile b/examples/quickstarts/helidon-quickstart-se/Dockerfile index 367c1cbd684..899a8046a49 100644 --- a/examples/quickstarts/helidon-quickstart-se/Dockerfile +++ b/examples/quickstarts/helidon-quickstart-se/Dockerfile @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:20 as maven +FROM container-registry.oracle.com/java/openjdk:21 as maven # Install maven WORKDIR /usr/share @@ -42,7 +42,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM container-registry.oracle.com/java/openjdk:20 +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink b/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink index 92555c9abac..7906e826c2f 100644 --- a/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink +++ b/examples/quickstarts/helidon-quickstart-se/Dockerfile.jlink @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:20 as maven +FROM container-registry.oracle.com/java/openjdk:21 as maven # Install maven WORKDIR /usr/share diff --git a/examples/quickstarts/helidon-quickstart-se/Dockerfile.native b/examples/quickstarts/helidon-quickstart-se/Dockerfile.native index 8a66b49f15b..66e7b435bd3 100644 --- a/examples/quickstarts/helidon-quickstart-se/Dockerfile.native +++ b/examples/quickstarts/helidon-quickstart-se/Dockerfile.native @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java21-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native index 8db5ef1733c..4dcc4791a69 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/Dockerfile.native @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java21-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/README.md b/examples/quickstarts/helidon-standalone-quickstart-mp/README.md index 544e5b9a6e4..5a7d5c00cf2 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/README.md +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/README.md @@ -80,8 +80,7 @@ You can build a native executable in 2 different ways: ### Local build -Download Graal VM at https://www.graalvm.org/downloads. We recommend -version `20.1.0` or later. +Download Graal VM at https://www.graalvm.org/downloads. ``` # Setup the environment diff --git a/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml b/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml index 041b3b2d3b9..d9a566fef48 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml +++ b/examples/quickstarts/helidon-standalone-quickstart-mp/pom.xml @@ -29,7 +29,7 @@ 4.0.0-SNAPSHOT io.helidon.microprofile.cdi.Main - 20 + 21 ${maven.compiler.source} true UTF-8 @@ -109,7 +109,6 @@ ${project.build.outputDirectory}/logging.properties - --enable-preview diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile index defb8738944..14333cfde36 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile +++ b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:20 as maven +FROM container-registry.oracle.com/java/openjdk:21 as maven # Install maven WORKDIR /usr/share @@ -42,7 +42,7 @@ RUN mvn package -DskipTests RUN echo "done!" # 2nd stage, build the runtime image -FROM container-registry.oracle.com/java/openjdk:20 +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon # Copy the binary built in the 1st stage diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink index 92555c9abac..7906e826c2f 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink +++ b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.jlink @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM container-registry.oracle.com/java/openjdk:20 as maven +FROM container-registry.oracle.com/java/openjdk:21 as maven # Install maven WORKDIR /usr/share diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native index a680fae1546..3e575c0677d 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native +++ b/examples/quickstarts/helidon-standalone-quickstart-se/Dockerfile.native @@ -15,7 +15,7 @@ # # 1st stage, build the app -FROM ghcr.io/graalvm/graalvm-ce:ol9-java20-22.3.1 as build +FROM ghcr.io/graalvm/graalvm-ce:ol9-java21-22.3.1 as build # Install native-image RUN gu install native-image diff --git a/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml b/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml index 8261b9ddb1c..7ce2cff6c3f 100644 --- a/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml +++ b/examples/quickstarts/helidon-standalone-quickstart-se/pom.xml @@ -30,7 +30,7 @@ 4.0.0-SNAPSHOT io.helidon.examples.quickstart.se.Main - 20 + 21 ${maven.compiler.source} true UTF-8 @@ -135,7 +135,6 @@ ${project.build.outputDirectory}/logging.properties - --enable-preview diff --git a/examples/todo-app/backend/src/test/java/io/helidon/demo/todos/backend/BackendTests.java b/examples/todo-app/backend/src/test/java/io/helidon/demo/todos/backend/BackendTests.java index d29c499bea8..388e80c3461 100644 --- a/examples/todo-app/backend/src/test/java/io/helidon/demo/todos/backend/BackendTests.java +++ b/examples/todo-app/backend/src/test/java/io/helidon/demo/todos/backend/BackendTests.java @@ -47,7 +47,7 @@ @HelidonTest @Configuration(useExisting = true) -// Embedded cassandra does not start on Java 17 +// Embedded cassandra does not start on Java 17+ @Disabled("3.0.0-JAKARTA") class BackendTests { diff --git a/graphql/server/pom.xml b/graphql/server/pom.xml index d21dabf721d..b8b7daba0e9 100644 --- a/graphql/server/pom.xml +++ b/graphql/server/pom.xml @@ -55,18 +55,4 @@ test - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - - - diff --git a/inject/maven-plugin/pom.xml b/inject/maven-plugin/pom.xml index 6e506b221d4..2439465705e 100644 --- a/inject/maven-plugin/pom.xml +++ b/inject/maven-plugin/pom.xml @@ -36,7 +36,7 @@ 3.3.0 3.8.5 3.6.4 - 3.7.1 + 3.9.0 2.2.1 etc/spotbugs/exclude.xml diff --git a/integrations/common/rest/pom.xml b/integrations/common/rest/pom.xml index acf9bf593b4..6a3da3bc290 100644 --- a/integrations/common/rest/pom.xml +++ b/integrations/common/rest/pom.xml @@ -71,27 +71,4 @@ test - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - - - \ No newline at end of file diff --git a/integrations/vault/vault/pom.xml b/integrations/vault/vault/pom.xml index 8faba21c147..701237fc91e 100644 --- a/integrations/vault/vault/pom.xml +++ b/integrations/vault/vault/pom.xml @@ -64,9 +64,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features @@ -76,15 +73,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - diff --git a/jersey/connector/pom.xml b/jersey/connector/pom.xml index 2087380754b..26304b096a7 100644 --- a/jersey/connector/pom.xml +++ b/jersey/connector/pom.xml @@ -79,15 +79,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - org.apache.maven.plugins maven-surefire-plugin diff --git a/lra/coordinator/server/Dockerfile b/lra/coordinator/server/Dockerfile index b3f2325f9de..8c29170261e 100644 --- a/lra/coordinator/server/Dockerfile +++ b/lra/coordinator/server/Dockerfile @@ -14,7 +14,7 @@ # limitations under the License. # -FROM container-registry.oracle.com/java/openjdk:20 as build +FROM container-registry.oracle.com/java/openjdk:21 as build WORKDIR /usr/share @@ -41,12 +41,12 @@ RUN wget -q -O helidon_repo.zip https://github.com/${HELIDON_REPOSITORY}/archive RUN mvn install -pl :helidon-lra-coordinator-server -am -DskipTests && \ echo "Helidon LRA Coordinator build successfully finished" -FROM container-registry.oracle.com/java/openjdk:20 +FROM container-registry.oracle.com/java/openjdk:21 WORKDIR /helidon COPY --from=build /helidon/lra/coordinator/server/target/helidon-lra-coordinator-server.jar ./ COPY --from=build /helidon/lra/coordinator/server/target/libs ./libs -CMD ["java", "--enable-preview", "-jar", "helidon-lra-coordinator-server.jar"] +CMD ["java", "-jar", "helidon-lra-coordinator-server.jar"] EXPOSE 8070 diff --git a/messaging/connectors/aq/pom.xml b/messaging/connectors/aq/pom.xml index 00b64aae544..d68a1977079 100644 --- a/messaging/connectors/aq/pom.xml +++ b/messaging/connectors/aq/pom.xml @@ -94,9 +94,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features @@ -106,15 +103,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - diff --git a/messaging/connectors/jms/pom.xml b/messaging/connectors/jms/pom.xml index e2198d3f493..c7d6da89abf 100644 --- a/messaging/connectors/jms/pom.xml +++ b/messaging/connectors/jms/pom.xml @@ -103,9 +103,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features @@ -115,15 +112,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - diff --git a/messaging/messaging/pom.xml b/messaging/messaging/pom.xml index f937d11be54..46940813cc0 100644 --- a/messaging/messaging/pom.xml +++ b/messaging/messaging/pom.xml @@ -86,9 +86,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features @@ -98,15 +95,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - diff --git a/metrics/metrics/pom.xml b/metrics/metrics/pom.xml index 76d59e2fc26..b1b97d3c583 100644 --- a/metrics/metrics/pom.xml +++ b/metrics/metrics/pom.xml @@ -108,9 +108,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/microprofile/fault-tolerance/pom.xml b/microprofile/fault-tolerance/pom.xml index 77b24ca5c85..82b09ddc748 100644 --- a/microprofile/fault-tolerance/pom.xml +++ b/microprofile/fault-tolerance/pom.xml @@ -126,9 +126,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/microprofile/lra/jax-rs/pom.xml b/microprofile/lra/jax-rs/pom.xml index 9c1e1afb40b..26a7766445f 100644 --- a/microprofile/lra/jax-rs/pom.xml +++ b/microprofile/lra/jax-rs/pom.xml @@ -103,9 +103,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/microprofile/server/pom.xml b/microprofile/server/pom.xml index 2870745d52b..afdcfc5d1d1 100644 --- a/microprofile/server/pom.xml +++ b/microprofile/server/pom.xml @@ -170,9 +170,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/microprofile/telemetry/pom.xml b/microprofile/telemetry/pom.xml index fef4c9e663b..800c5236987 100644 --- a/microprofile/telemetry/pom.xml +++ b/microprofile/telemetry/pom.xml @@ -111,9 +111,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/microprofile/tests/tck/pom.xml b/microprofile/tests/tck/pom.xml index bdb602abedd..0bd6426f8bf 100644 --- a/microprofile/tests/tck/pom.xml +++ b/microprofile/tests/tck/pom.xml @@ -68,9 +68,6 @@ org.apache.maven.plugins maven-surefire-plugin - - --enable-preview - org.apache.maven.surefire diff --git a/microprofile/tests/tck/tck-config/pom.xml b/microprofile/tests/tck/tck-config/pom.xml index 1d8bf02d23a..0ee77da9954 100644 --- a/microprofile/tests/tck/tck-config/pom.xml +++ b/microprofile/tests/tck/tck-config/pom.xml @@ -81,7 +81,7 @@ src/test/tck-suite.xml - --add-opens=java.base/java.lang=ALL-UNNAMED --enable-preview + --add-opens=java.base/java.lang=ALL-UNNAMED src/test/resources/logging.properties 120 diff --git a/microprofile/tests/tck/tck-rest-client/pom.xml b/microprofile/tests/tck/tck-rest-client/pom.xml index 6eefae06dae..5d923b5204c 100644 --- a/microprofile/tests/tck/tck-rest-client/pom.xml +++ b/microprofile/tests/tck/tck-rest-client/pom.xml @@ -61,7 +61,6 @@ --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED - --enable-preview src/test/tck-suite.xml diff --git a/microprofile/tests/tck/tck-telemetry/pom.xml b/microprofile/tests/tck/tck-telemetry/pom.xml index 76fe30f5bdc..e685d3f8fa8 100644 --- a/microprofile/tests/tck/tck-telemetry/pom.xml +++ b/microprofile/tests/tck/tck-telemetry/pom.xml @@ -66,7 +66,6 @@ --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED - --enable-preview src/test/tck-suite.xml diff --git a/microprofile/tracing/pom.xml b/microprofile/tracing/pom.xml index 0840befa35f..f056fca09a1 100644 --- a/microprofile/tracing/pom.xml +++ b/microprofile/tracing/pom.xml @@ -108,9 +108,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/microprofile/websocket/pom.xml b/microprofile/websocket/pom.xml index fa2f991186e..88737252cbc 100644 --- a/microprofile/websocket/pom.xml +++ b/microprofile/websocket/pom.xml @@ -32,7 +32,7 @@ Helidon MP integration with Tyrus - -Dmp.initializer.allow=true --enable-preview + -Dmp.initializer.allow=true @@ -114,9 +114,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features diff --git a/nima/fault-tolerance/fault-tolerance/pom.xml b/nima/fault-tolerance/fault-tolerance/pom.xml index f6c569a8cae..2b63ea235c7 100644 --- a/nima/fault-tolerance/fault-tolerance/pom.xml +++ b/nima/fault-tolerance/fault-tolerance/pom.xml @@ -128,9 +128,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features @@ -177,15 +174,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - diff --git a/nima/pom.xml b/nima/pom.xml index 0288aee87d4..d5910f70e16 100644 --- a/nima/pom.xml +++ b/nima/pom.xml @@ -59,28 +59,4 @@ - - - - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - - - - diff --git a/nima/testing/junit5/webserver/src/main/java/io/helidon/nima/testing/junit5/webserver/HelidonServerJunitExtension.java b/nima/testing/junit5/webserver/src/main/java/io/helidon/nima/testing/junit5/webserver/HelidonServerJunitExtension.java index bfd0362c15f..0848d814a0c 100644 --- a/nima/testing/junit5/webserver/src/main/java/io/helidon/nima/testing/junit5/webserver/HelidonServerJunitExtension.java +++ b/nima/testing/junit5/webserver/src/main/java/io/helidon/nima/testing/junit5/webserver/HelidonServerJunitExtension.java @@ -83,8 +83,6 @@ public void beforeAll(ExtensionContext context) { WebServerConfig.Builder builder = WebServer.builder() .config(GlobalConfig.config().get("server")) - .port(0) - .shutdownHook(false) .host("localhost"); extensions.forEach(it -> it.beforeAll(context)); @@ -93,6 +91,10 @@ public void beforeAll(ExtensionContext context) { setupServer(builder); addRouting(builder); + // port will be random + builder.port(0) + .shutdownHook(false); + server = builder.build().start(); uris.put(DEFAULT_SOCKET_NAME, URI.create("http://localhost:" + server.port() + "/")); } diff --git a/nima/tests/integration/imperative/pom.xml b/nima/tests/integration/imperative/pom.xml index abf940524e4..d12b1d6b4bf 100644 --- a/nima/tests/integration/imperative/pom.xml +++ b/nima/tests/integration/imperative/pom.xml @@ -57,15 +57,6 @@ - - org.apache.maven.plugins - maven-compiler-plugin - - - --enable-preview - - - org.apache.maven.plugins maven-failsafe-plugin diff --git a/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/ServerListener.java b/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/ServerListener.java index 45e65e2bcfe..a4adb7f8afc 100644 --- a/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/ServerListener.java +++ b/nima/webserver/webserver/src/main/java/io/helidon/nima/webserver/ServerListener.java @@ -128,7 +128,6 @@ class ServerListener implements ListenerContext { .build()); this.serverThread = Thread.ofPlatform() - .allowSetThreadLocals(true) .inheritInheritableThreadLocals(true) .daemon(false) .name("server-" + socketName + "-listener") @@ -136,12 +135,10 @@ class ServerListener implements ListenerContext { // to read requests and execute tasks this.readerExecutor = ThreadPerTaskExecutor.create(Thread.ofVirtual() - .allowSetThreadLocals(true) .factory()); // to do anything else (writers etc.) this.sharedExecutor = Executors.newThreadPerTaskExecutor(Thread.ofVirtual() - .allowSetThreadLocals(true) .factory()); this.closeFuture = new CompletableFuture<>(); @@ -375,13 +372,13 @@ private void listen() { } } catch (SocketException e) { if (!e.getMessage().contains("Socket closed")) { - e.printStackTrace(); + LOGGER.log(ERROR, "Got a socket exception while listening, this server socket is terminating now", e); } if (running) { stop(); } } catch (Throwable e) { - e.printStackTrace(); + LOGGER.log(ERROR, "Got a throwable while listening, this server socket is terminating now", e); if (running) { stop(); } diff --git a/nima/webserver/webserver/src/test/java/io/helidon/nima/webserver/ThreadPerTaskExecutorTest.java b/nima/webserver/webserver/src/test/java/io/helidon/nima/webserver/ThreadPerTaskExecutorTest.java index 2a4ebcbb6d2..8f7d4bd4e5c 100644 --- a/nima/webserver/webserver/src/test/java/io/helidon/nima/webserver/ThreadPerTaskExecutorTest.java +++ b/nima/webserver/webserver/src/test/java/io/helidon/nima/webserver/ThreadPerTaskExecutorTest.java @@ -22,6 +22,7 @@ import io.helidon.common.task.HelidonTaskExecutor; import io.helidon.common.task.InterruptableTask; + import org.junit.jupiter.api.Test; import static io.helidon.common.testing.junit5.MatcherWithRetry.assertThatWithRetry; @@ -97,7 +98,6 @@ public void run() { private static HelidonTaskExecutor newExecutor() { return ThreadPerTaskExecutor.create(Thread.ofVirtual() - .allowSetThreadLocals(true) .inheritInheritableThreadLocals(false) .factory()); } diff --git a/pom.xml b/pom.xml index 19e9511c230..aeba87b44bf 100644 --- a/pom.xml +++ b/pom.xml @@ -35,14 +35,14 @@ Java libraries for writing microservices - 20 + 21 all UTF-8 UTF-8 - -Xmx1024m -Dfile.encoding=UTF-8 --enable-preview - -Xmx1024m -Dfile.encoding=UTF-8 --enable-preview + -Xmx1024m -Dfile.encoding=UTF-8 + -Xmx1024m -Dfile.encoding=UTF-8 @@ -119,7 +119,7 @@ 3.0.0 3.0.0 3.0.1 - 4.7.3.2 + 4.7.3.5 1.12.0 8.2.1 3.1.0 @@ -398,9 +398,6 @@ -J-Dhttp.agent=maven-javadoc-plugin - - --enable-preview - **/target/**/*.java **/*_.java diff --git a/security/security/pom.xml b/security/security/pom.xml index c2603d0872e..a1094d1faaf 100644 --- a/security/security/pom.xml +++ b/security/security/pom.xml @@ -104,9 +104,6 @@ org.apache.maven.plugins maven-compiler-plugin - - --enable-preview - io.helidon.common.features @@ -121,15 +118,6 @@ - - org.apache.maven.plugins - maven-javadoc-plugin - - - --enable-preview - - - diff --git a/tests/apps/bookstore/bookstore-mp/pom.xml b/tests/apps/bookstore/bookstore-mp/pom.xml index 6bd07e2cd4e..b72f004a379 100644 --- a/tests/apps/bookstore/bookstore-mp/pom.xml +++ b/tests/apps/bookstore/bookstore-mp/pom.xml @@ -102,13 +102,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - --enable-preview - - diff --git a/tests/apps/bookstore/bookstore-se/pom.xml b/tests/apps/bookstore/bookstore-se/pom.xml index 4222e744442..a8881e61b7d 100644 --- a/tests/apps/bookstore/bookstore-se/pom.xml +++ b/tests/apps/bookstore/bookstore-se/pom.xml @@ -123,11 +123,6 @@ org.apache.maven.plugins maven-compiler-plugin - - - --enable-preview - - default-testCompile @@ -136,7 +131,6 @@ We use HTTP client from tests, and we do not want it as a module dependency --> - --enable-preview --add-modules java.net.http diff --git a/tests/functional/bookstore/src/test/java/io/helidon/tests/bookstore/MainTest.java b/tests/functional/bookstore/src/test/java/io/helidon/tests/bookstore/MainTest.java index 86ea16de3b9..ec1dcfdb8c5 100644 --- a/tests/functional/bookstore/src/test/java/io/helidon/tests/bookstore/MainTest.java +++ b/tests/functional/bookstore/src/test/java/io/helidon/tests/bookstore/MainTest.java @@ -31,16 +31,17 @@ import java.util.Objects; import java.util.Queue; -import com.oracle.bedrock.runtime.Application; -import com.oracle.bedrock.runtime.LocalPlatform; -import com.oracle.bedrock.runtime.console.CapturingApplicationConsole; -import com.oracle.bedrock.runtime.options.Arguments; -import com.oracle.bedrock.runtime.options.Console; import io.helidon.common.http.Http; import io.helidon.common.media.type.MediaTypes; import io.helidon.nima.webclient.ClientResponse; import io.helidon.nima.webclient.WebClient; import io.helidon.nima.webclient.http1.Http1Client; + +import com.oracle.bedrock.runtime.Application; +import com.oracle.bedrock.runtime.LocalPlatform; +import com.oracle.bedrock.runtime.console.CapturingApplicationConsole; +import com.oracle.bedrock.runtime.options.Arguments; +import com.oracle.bedrock.runtime.options.Console; import jakarta.json.Json; import jakarta.json.JsonArray; import jakarta.json.JsonObject; @@ -197,7 +198,7 @@ void exitOnStartedMp() throws Exception { private void runExitOnStartedTest(String edition) throws Exception { int port = localPlatform.getAvailablePorts().next(); - Arguments args = toArguments(editionToJarPath(edition), List.of("-Dexit.on.started=!", "--enable-preview"), null, port); + Arguments args = toArguments(editionToJarPath(edition), List.of("-Dexit.on.started=!"), null, port); CapturingApplicationConsole console = new CapturingApplicationConsole(); Application application = localPlatform.launch("java", args, Console.of(console)); Queue stdOut = console.getCapturedOutputLines(); @@ -413,7 +414,6 @@ private JsonObject getBookAsJsonObject() throws IOException { private static Arguments toArguments(String appJarPath, List javaArgs, String moduleName, int port) { List startArgs = new ArrayList<>(javaArgs); startArgs.add("-Dserver.port=" + port); - startArgs.add("--enable-preview"); if (moduleName != null && !moduleName.isEmpty()) { File jarFile = new File(appJarPath); diff --git a/tests/integration/gh-5792/README.md b/tests/integration/gh-5792/README.md index 66f0618e73f..53774c7f8fc 100644 --- a/tests/integration/gh-5792/README.md +++ b/tests/integration/gh-5792/README.md @@ -11,7 +11,7 @@ It contains a much richer definition to exercise YAML parsing a bit more. With JDK19+ ```bash mvn package -java --enable-preview -jar target/helidon-tests-integration-yaml-parsing.jar +java -jar target/helidon-tests-integration-yaml-parsing.jar ``` ## Try OpenAPI diff --git a/tests/integration/harness/src/main/java/io/helidon/tests/integration/harness/HelidonProcessRunner.java b/tests/integration/harness/src/main/java/io/helidon/tests/integration/harness/HelidonProcessRunner.java index 18375cf4c5a..0e528df8668 100644 --- a/tests/integration/harness/src/main/java/io/helidon/tests/integration/harness/HelidonProcessRunner.java +++ b/tests/integration/harness/src/main/java/io/helidon/tests/integration/harness/HelidonProcessRunner.java @@ -24,7 +24,12 @@ import java.net.ServerSocket; import java.net.Socket; import java.net.SocketAddress; -import java.util.*; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Objects; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; import java.util.function.Function; @@ -265,7 +270,6 @@ private static void addModuleCommand(String java, List command = new ArrayList<>(6); command.add(java); - command.add("--enable-preview"); command.add("--module-path"); command.add(location + "/" + finalName + ".jar" + File.pathSeparator + "target/libs"); command.add("--module"); @@ -287,14 +291,13 @@ private static void addJlinkCommand(Builder builder, ProcessBuilder processBuild processBuilder.command( buildCommand(builder.args, jriDir + "/bin/java", - "--enable-preview", "-jar", jriDir + "/app/" + builder.finalName + ".jar")); } private static void addClasspathCommand(Builder builder, ProcessBuilder processBuilder) { processBuilder.command( - buildCommand(builder.args, "java", "--enable-preview", "-jar", "target/" + builder.finalName + ".jar")); + buildCommand(builder.args, "java", "-jar", "target/" + builder.finalName + ".jar")); } private static void addNativeCommand(Builder builder, ProcessBuilder processBuilder) { diff --git a/tests/integration/health/mp-disabled/pom.xml b/tests/integration/health/mp-disabled/pom.xml index c796fc172b0..e9ea3fbbd6c 100644 --- a/tests/integration/health/mp-disabled/pom.xml +++ b/tests/integration/health/mp-disabled/pom.xml @@ -50,16 +50,4 @@ test - - - - - org.apache.maven.plugins - maven-surefire-plugin - - --enable-preview - - - - diff --git a/tests/integration/jpa/appl/pom.xml b/tests/integration/jpa/appl/pom.xml index c475089c754..89aa18e0ae8 100644 --- a/tests/integration/jpa/appl/pom.xml +++ b/tests/integration/jpa/appl/pom.xml @@ -279,7 +279,6 @@ java - --enable-preview -classpath ${mainClass} diff --git a/tests/integration/jpa/simple/pom.xml b/tests/integration/jpa/simple/pom.xml index 32029773233..6bb973af537 100644 --- a/tests/integration/jpa/simple/pom.xml +++ b/tests/integration/jpa/simple/pom.xml @@ -27,7 +27,6 @@ ../pom.xml - io.helidon.tests.integration.jpa helidon-tests-integration-jpa-simple Integration Tests: JPA Simple Tests @@ -37,6 +36,10 @@ helidon-tests-integration-jpa-model ${project.version} + + io.helidon.microprofile.metrics + helidon-microprofile-metrics + io.helidon.integrations.cdi helidon-integrations-cdi-jta-weld @@ -113,7 +116,11 @@ jandex runtime - + + org.slf4j + slf4j-jdk14 + runtime + @@ -150,7 +157,6 @@ org.apache.maven.plugins maven-failsafe-plugin - ${version.plugin.surefire} methods 10 diff --git a/tests/integration/jpa/simple/src/test/resources/hibernate.properties b/tests/integration/jpa/simple/src/test/resources/hibernate.properties new file mode 100644 index 00000000000..8ce5268b0a5 --- /dev/null +++ b/tests/integration/jpa/simple/src/test/resources/hibernate.properties @@ -0,0 +1,19 @@ +# +# Copyright (c) 2023 Oracle and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Byte code for JPA must be generated at compile time. +# This is a limitation of native image +hibernate.bytecode.provider=none diff --git a/tests/integration/jpa/simple/src/test/resources/logging.properties b/tests/integration/jpa/simple/src/test/resources/logging.properties new file mode 100644 index 00000000000..e5f909036bd --- /dev/null +++ b/tests/integration/jpa/simple/src/test/resources/logging.properties @@ -0,0 +1,28 @@ +# +# Copyright (c) 2020, 2023 Oracle and/or its affiliates. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# Example Logging Configuration File +# For more information see $JAVA_HOME/jre/lib/logging.properties +# Send messages to the console + +handlers=io.helidon.logging.jul.HelidonConsoleHandler +java.util.logging.SimpleFormatter.format=%4$s %3$s: %5$s%6$s%n + +.level=WARNING + +io.helidon.level=INFO +org.hibernate.level=INFO +com.zaxxer.level=INFO diff --git a/tests/integration/mp-bean-validation/pom.xml b/tests/integration/mp-bean-validation/pom.xml index 5f85950222c..d53dab09f61 100644 --- a/tests/integration/mp-bean-validation/pom.xml +++ b/tests/integration/mp-bean-validation/pom.xml @@ -83,13 +83,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - --enable-preview - - diff --git a/tests/integration/mp-security-client/pom.xml b/tests/integration/mp-security-client/pom.xml index 926f253a3eb..aadd12be8b3 100644 --- a/tests/integration/mp-security-client/pom.xml +++ b/tests/integration/mp-security-client/pom.xml @@ -49,16 +49,4 @@ test - - - - - org.apache.maven.plugins - maven-surefire-plugin - - --enable-preview - - - - diff --git a/tests/integration/mp-ws-services/pom.xml b/tests/integration/mp-ws-services/pom.xml index 8f02ebbbbe3..a59389b2500 100644 --- a/tests/integration/mp-ws-services/pom.xml +++ b/tests/integration/mp-ws-services/pom.xml @@ -45,16 +45,4 @@ test - - - - - org.apache.maven.plugins - maven-surefire-plugin - - --enable-preview - - - - diff --git a/tests/integration/zipkin-mp-2.2/pom.xml b/tests/integration/zipkin-mp-2.2/pom.xml index 0811691a9f9..413a928a43f 100644 --- a/tests/integration/zipkin-mp-2.2/pom.xml +++ b/tests/integration/zipkin-mp-2.2/pom.xml @@ -80,13 +80,6 @@ - - org.apache.maven.plugins - maven-surefire-plugin - - --enable-preview - -