diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 3ba0a6b3add6b..97e79352865f7 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -74,7 +74,7 @@ 3.5.2 1.7.1 - 19.2.1 + 19.3.0 1.0.0.Final 2.9.10.20191020 1.0.0.Final @@ -791,7 +791,7 @@ ${jboss-logmanager.version} - com.oracle.substratevm + org.graalvm.nativeimage svm @@ -1541,7 +1541,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm ${graal-sdk.version} provided diff --git a/build-parent/pom.xml b/build-parent/pom.xml index ea0cc715df9d4..ba936578ddd10 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -32,7 +32,7 @@ - 19.2.1 + 19.3.0 4.1.1 0.0.9 3.8.4 diff --git a/ci-templates/stages.yml b/ci-templates/stages.yml index 00535cd13e19b..b46b308befa7b 100644 --- a/ci-templates/stages.yml +++ b/ci-templates/stages.yml @@ -345,7 +345,7 @@ stages: parameters: poolSettings: ${{parameters.poolSettings}} expectUseVMs: ${{parameters.expectUseVMs}} - timeoutInMinutes: 25 + timeoutInMinutes: 35 modules: - kogito - kubernetes-client diff --git a/core/deployment/src/main/java/io/quarkus/deployment/ThreadLocalRandomProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/ThreadLocalRandomProcessor.java deleted file mode 100644 index 6bbd0c0f55cee..0000000000000 --- a/core/deployment/src/main/java/io/quarkus/deployment/ThreadLocalRandomProcessor.java +++ /dev/null @@ -1,15 +0,0 @@ -package io.quarkus.deployment; - -import java.util.concurrent.ThreadLocalRandom; - -import io.quarkus.deployment.annotations.BuildStep; -import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; - -public class ThreadLocalRandomProcessor { - @BuildStep - RuntimeReinitializedClassBuildItem registerThreadLocalRandomReinitialize() { - // ThreadLocalRandom is bugged currently and doesn't reset the seeder - // See https://github.com/oracle/graal/issues/1614 for more details - return new RuntimeReinitializedClassBuildItem(ThreadLocalRandom.class.getName()); - } -} diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java index df72dd3f5401a..3ede83fb7f76e 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/NativeConfig.java @@ -38,7 +38,7 @@ public class NativeConfig { /** * If JNI should be enabled */ - @ConfigItem(defaultValue = "false") + @ConfigItem(defaultValue = "true") public boolean enableJni; /** @@ -132,7 +132,7 @@ public class NativeConfig { /** * The docker image to use to do the image build */ - @ConfigItem(defaultValue = "quay.io/quarkus/ubi-quarkus-native-image:19.2.1") + @ConfigItem(defaultValue = "quay.io/quarkus/ubi-quarkus-native-image:19.3.0-java8") public String builderImage; /** diff --git a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java index ad5d4be80a4e9..2e09f768080b8 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/pkg/steps/NativeImageBuildStep.java @@ -73,7 +73,7 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa final String runnerJarName = runnerJar.getFileName().toString(); - boolean vmVersionOutOfDate = isThisGraalVMVersionObsolete(); + isThisGraalVMVersionObsolete(); HashMap env = new HashMap<>(System.getenv()); List nativeImage; @@ -178,8 +178,6 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa command.add("-H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime"); //the default collection policy results in full GC's 50% of the time command.add("-jar"); command.add(runnerJarName); - //https://github.com/oracle/graal/issues/660 - command.add("-J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1"); if (nativeConfig.enableFallbackImages) { command.add("-H:FallbackThreshold=5"); } else { @@ -296,16 +294,14 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa } //FIXME remove after transition period - private boolean isThisGraalVMVersionObsolete() { + private void isThisGraalVMVersionObsolete() { final String vmName = System.getProperty("java.vm.name"); log.info("Running Quarkus native-image plugin on " + vmName); - final List obsoleteGraalVmVersions = Arrays.asList("1.0.0", "19.0.", "19.1.", "19.2.0"); + final List obsoleteGraalVmVersions = Arrays.asList("1.0.0", "19.0.", "19.1.", "19.2."); final boolean vmVersionIsObsolete = obsoleteGraalVmVersions.stream().anyMatch(vmName::contains); if (vmVersionIsObsolete) { - log.error("Out of date build of GraalVM detected! Please upgrade to GraalVM 19.2.1."); - return true; + log.error("Out of date build of GraalVM detected! Please upgrade to GraalVM 19.3.0."); } - return false; } private static File getNativeImageExecutable(Optional graalVmHome, File javaHome, Map env) { diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageAutoFeatureStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageAutoFeatureStep.java index e7706d74122ae..776aeb77a2860 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageAutoFeatureStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageAutoFeatureStep.java @@ -65,7 +65,7 @@ public class NativeImageAutoFeatureStep { static final String RUNTIME_REFLECTION = RuntimeReflection.class.getName(); static final String BEFORE_ANALYSIS_ACCESS = Feature.BeforeAnalysisAccess.class.getName(); static final String DYNAMIC_PROXY_REGISTRY = "com.oracle.svm.core.jdk.proxy.DynamicProxyRegistry"; - static final String LOCALIZATION_SUPPORT = "com.oracle.svm.core.jdk.LocalizationSupport"; + static final String LOCALIZATION_FEATURE = "com.oracle.svm.core.jdk.LocalizationFeature"; @BuildStep List registerPackageResources( @@ -205,7 +205,7 @@ public void write(String s, byte[] bytes) { } if (!resourceBundles.isEmpty()) { - ResultHandle locClass = overallCatch.loadClass(LOCALIZATION_SUPPORT); + ResultHandle locClass = overallCatch.loadClass(LOCALIZATION_FEATURE); ResultHandle params = overallCatch.marshalAsArray(Class.class, overallCatch.loadClass(String.class)); ResultHandle registerMethod = overallCatch.invokeVirtualMethod( diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml index 5dd0cff829c7f..9621dd3d2e2e3 100644 --- a/core/runtime/pom.xml +++ b/core/runtime/pom.xml @@ -70,7 +70,7 @@ graal-sdk - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/core/test-extension/runtime/pom.xml b/core/test-extension/runtime/pom.xml index 208261cf59b6e..195aa6ed065e5 100644 --- a/core/test-extension/runtime/pom.xml +++ b/core/test-extension/runtime/pom.xml @@ -31,7 +31,7 @@ quarkus-arc - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java b/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java index b1b95b4727f17..068ace098c274 100644 --- a/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java +++ b/devtools/gradle/src/main/java/io/quarkus/gradle/tasks/QuarkusNative.java @@ -49,7 +49,7 @@ public class QuarkusNative extends QuarkusTask { private boolean enableServer = false; - private boolean enableJni = false; + private boolean enableJni = true; private boolean autoServiceLoaderRegistration = false; diff --git a/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java b/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java index f69dab9920482..910da7031d796 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java @@ -100,7 +100,7 @@ public class NativeImageMojo extends AbstractMojo { @Parameter(defaultValue = "false") private Boolean enableServer; - @Parameter(defaultValue = "false") + @Parameter(defaultValue = "true") private Boolean enableJni; @Parameter(defaultValue = "false") diff --git a/devtools/maven/src/main/resources/create-extension-templates/integration-test-pom.xml b/devtools/maven/src/main/resources/create-extension-templates/integration-test-pom.xml index 25505bd88e682..3e81c40e855ec 100644 --- a/devtools/maven/src/main/resources/create-extension-templates/integration-test-pom.xml +++ b/devtools/maven/src/main/resources/create-extension-templates/integration-test-pom.xml @@ -105,7 +105,6 @@ false false ${graalvmHome} - true true false diff --git a/docs/src/main/asciidoc/native-and-ssl.adoc b/docs/src/main/asciidoc/native-and-ssl.adoc index a379b60e310b1..3baa641d49ec8 100644 --- a/docs/src/main/asciidoc/native-and-ssl.adoc +++ b/docs/src/main/asciidoc/native-and-ssl.adoc @@ -125,7 +125,7 @@ And build again: If you check carefully the native executable build options, you can see that the SSL related options are gone: ``` -[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] /opt/graalvm/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dcom.sun.xml.internal.bind.v2.bytecode.ClassTailor.noOptimize=true -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rest-client-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:+PrintAnalysisCallTree -H:EnableURLProtocols=http -H:-SpawnIsolates -H:-JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace +[INFO] [io.quarkus.creator.phase.nativeimage.NativeImagePhase] /opt/graalvm/bin/native-image -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dcom.sun.xml.internal.bind.v2.bytecode.ClassTailor.noOptimize=true -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rest-client-1.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:+PrintAnalysisCallTree -H:EnableURLProtocols=http -H:-SpawnIsolates -H:+JNI --no-server -H:-UseServiceLoaderFeature -H:+StackTrace ``` And we end up with: diff --git a/extensions/agroal/runtime/pom.xml b/extensions/agroal/runtime/pom.xml index 3600282874ecd..4c191c9b6a3ea 100644 --- a/extensions/agroal/runtime/pom.xml +++ b/extensions/agroal/runtime/pom.xml @@ -27,7 +27,7 @@ quarkus-narayana-jta - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/amazon-lambda-http/deployment/pom.xml b/extensions/amazon-lambda-http/deployment/pom.xml index 511d6393b3c67..94476ebeb81b6 100644 --- a/extensions/amazon-lambda-http/deployment/pom.xml +++ b/extensions/amazon-lambda-http/deployment/pom.xml @@ -32,7 +32,7 @@ quarkus-amazon-lambda-http - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/amazon-lambda-http/runtime/pom.xml b/extensions/amazon-lambda-http/runtime/pom.xml index 42509a4a966ae..800c30c47bc1d 100644 --- a/extensions/amazon-lambda-http/runtime/pom.xml +++ b/extensions/amazon-lambda-http/runtime/pom.xml @@ -29,7 +29,7 @@ quarkus-core - com.oracle.substratevm + org.graalvm.nativeimage svm @@ -54,4 +54,4 @@ - \ No newline at end of file + diff --git a/extensions/artemis-core/runtime/pom.xml b/extensions/artemis-core/runtime/pom.xml index 2ce771b64827b..c08161d8bcaa6 100644 --- a/extensions/artemis-core/runtime/pom.xml +++ b/extensions/artemis-core/runtime/pom.xml @@ -65,7 +65,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/azure-functions-http/deployment/pom.xml b/extensions/azure-functions-http/deployment/pom.xml index bf6846299c1ce..b80d6dc35f14c 100644 --- a/extensions/azure-functions-http/deployment/pom.xml +++ b/extensions/azure-functions-http/deployment/pom.xml @@ -23,7 +23,7 @@ quarkus-vertx-http-deployment - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/azure-functions-http/runtime/pom.xml b/extensions/azure-functions-http/runtime/pom.xml index da4ad843166eb..353b363fdeae2 100644 --- a/extensions/azure-functions-http/runtime/pom.xml +++ b/extensions/azure-functions-http/runtime/pom.xml @@ -24,7 +24,7 @@ quarkus-core - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/caffeine/runtime/pom.xml b/extensions/caffeine/runtime/pom.xml index 2246644b68522..aa917db6e66a0 100644 --- a/extensions/caffeine/runtime/pom.xml +++ b/extensions/caffeine/runtime/pom.xml @@ -18,7 +18,7 @@ caffeine - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/elasticsearch-rest-client/runtime/pom.xml b/extensions/elasticsearch-rest-client/runtime/pom.xml index 3f269656070bf..c12933c484ba6 100644 --- a/extensions/elasticsearch-rest-client/runtime/pom.xml +++ b/extensions/elasticsearch-rest-client/runtime/pom.xml @@ -43,7 +43,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/elytron-security-properties-file/runtime/pom.xml b/extensions/elytron-security-properties-file/runtime/pom.xml index 0cbc3141c4543..6017955d47d95 100644 --- a/extensions/elytron-security-properties-file/runtime/pom.xml +++ b/extensions/elytron-security-properties-file/runtime/pom.xml @@ -27,7 +27,7 @@ quarkus-elytron-security - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/elytron-security/deployment/src/main/java/io/quarkus/elytron/security/deployment/ElytronDeploymentProcessor.java b/extensions/elytron-security/deployment/src/main/java/io/quarkus/elytron/security/deployment/ElytronDeploymentProcessor.java index ad4e4475d89ed..5ae4dfb1eb313 100644 --- a/extensions/elytron-security/deployment/src/main/java/io/quarkus/elytron/security/deployment/ElytronDeploymentProcessor.java +++ b/extensions/elytron-security/deployment/src/main/java/io/quarkus/elytron/security/deployment/ElytronDeploymentProcessor.java @@ -98,6 +98,12 @@ SecurityDomainBuildItem build(ElytronRecorder recorder, Listquarkus-vertx-http - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/elytron-security/runtime/src/main/java/io/quarkus/elytron/security/runtime/ElytronRecorder.java b/extensions/elytron-security/runtime/src/main/java/io/quarkus/elytron/security/runtime/ElytronRecorder.java index 5400570480958..7c5f38b523215 100644 --- a/extensions/elytron-security/runtime/src/main/java/io/quarkus/elytron/security/runtime/ElytronRecorder.java +++ b/extensions/elytron-security/runtime/src/main/java/io/quarkus/elytron/security/runtime/ElytronRecorder.java @@ -93,7 +93,15 @@ public void addRealm(RuntimeValue builder, String realmN * @return the security domain runtime value */ public RuntimeValue buildDomain(RuntimeValue builder) { - Security.addProvider(new WildFlyElytronPasswordProvider()); return new RuntimeValue<>(builder.getValue().build()); } + + /** + * As of Graal 19.3.0 this has to be registered at runtime, due to a bug. + * + * 19.3.1 should fix this, see https://github.com/oracle/graal/issues/1883 + */ + public void registerPasswordProvider() { + Security.addProvider(new WildFlyElytronPasswordProvider()); + } } diff --git a/extensions/flyway/runtime/pom.xml b/extensions/flyway/runtime/pom.xml index f1804ae019a7f..c3e8a93eef5ee 100644 --- a/extensions/flyway/runtime/pom.xml +++ b/extensions/flyway/runtime/pom.xml @@ -30,7 +30,7 @@ quarkus-narayana-jta - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/hibernate-orm/runtime/pom.xml b/extensions/hibernate-orm/runtime/pom.xml index 491c0406cd599..68d973162fc06 100644 --- a/extensions/hibernate-orm/runtime/pom.xml +++ b/extensions/hibernate-orm/runtime/pom.xml @@ -76,7 +76,7 @@ jakarta.transaction-api - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/hibernate-search-elasticsearch/runtime/pom.xml b/extensions/hibernate-search-elasticsearch/runtime/pom.xml index 56449247de528..9118d971db2d7 100644 --- a/extensions/hibernate-search-elasticsearch/runtime/pom.xml +++ b/extensions/hibernate-search-elasticsearch/runtime/pom.xml @@ -35,7 +35,7 @@ hibernate-search-mapper-orm - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/hibernate-validator/runtime/pom.xml b/extensions/hibernate-validator/runtime/pom.xml index 7183ba22ea317..d19c75c3ef356 100644 --- a/extensions/hibernate-validator/runtime/pom.xml +++ b/extensions/hibernate-validator/runtime/pom.xml @@ -58,7 +58,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/infinispan-client/runtime/pom.xml b/extensions/infinispan-client/runtime/pom.xml index a1f9138c2e6b9..c1cebdb832fca 100644 --- a/extensions/infinispan-client/runtime/pom.xml +++ b/extensions/infinispan-client/runtime/pom.xml @@ -85,7 +85,7 @@ protostream-processor - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/infinispan-embedded/runtime/pom.xml b/extensions/infinispan-embedded/runtime/pom.xml index 3b10ece87523f..db14ebc7fb6e9 100644 --- a/extensions/infinispan-embedded/runtime/pom.xml +++ b/extensions/infinispan-embedded/runtime/pom.xml @@ -53,7 +53,7 @@ true - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jaeger/runtime/pom.xml b/extensions/jaeger/runtime/pom.xml index 552f9fc3751f7..5925e55b73e00 100644 --- a/extensions/jaeger/runtime/pom.xml +++ b/extensions/jaeger/runtime/pom.xml @@ -27,7 +27,7 @@ jaeger-thrift - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jaxb/runtime/pom.xml b/extensions/jaxb/runtime/pom.xml index 3d91533a1042d..7e4aa5bab9d3e 100644 --- a/extensions/jaxb/runtime/pom.xml +++ b/extensions/jaxb/runtime/pom.xml @@ -15,7 +15,7 @@ XML serialization support - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jdbc/jdbc-derby/runtime/pom.xml b/extensions/jdbc/jdbc-derby/runtime/pom.xml index bab7a00fb7012..29909c78e29f6 100644 --- a/extensions/jdbc/jdbc-derby/runtime/pom.xml +++ b/extensions/jdbc/jdbc-derby/runtime/pom.xml @@ -22,7 +22,7 @@ derbyclient - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jdbc/jdbc-h2/runtime/pom.xml b/extensions/jdbc/jdbc-h2/runtime/pom.xml index ef7f584445901..d15aeb177e264 100644 --- a/extensions/jdbc/jdbc-h2/runtime/pom.xml +++ b/extensions/jdbc/jdbc-h2/runtime/pom.xml @@ -28,7 +28,7 @@ --> - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jdbc/jdbc-mariadb/runtime/pom.xml b/extensions/jdbc/jdbc-mariadb/runtime/pom.xml index 9e37c30953be4..550d0382e5d55 100644 --- a/extensions/jdbc/jdbc-mariadb/runtime/pom.xml +++ b/extensions/jdbc/jdbc-mariadb/runtime/pom.xml @@ -18,7 +18,7 @@ mariadb-java-client - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jdbc/jdbc-mssql/runtime/pom.xml b/extensions/jdbc/jdbc-mssql/runtime/pom.xml index 59239e66d20ba..1bdebd9b64dea 100644 --- a/extensions/jdbc/jdbc-mssql/runtime/pom.xml +++ b/extensions/jdbc/jdbc-mssql/runtime/pom.xml @@ -66,7 +66,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jdbc/jdbc-mysql/runtime/pom.xml b/extensions/jdbc/jdbc-mysql/runtime/pom.xml index 6f01b9ed12158..019f1e3be1161 100644 --- a/extensions/jdbc/jdbc-mysql/runtime/pom.xml +++ b/extensions/jdbc/jdbc-mysql/runtime/pom.xml @@ -22,7 +22,7 @@ mysql-connector-java - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jdbc/jdbc-postgresql/runtime/pom.xml b/extensions/jdbc/jdbc-postgresql/runtime/pom.xml index 30660ebf35a2a..208186fd9646b 100644 --- a/extensions/jdbc/jdbc-postgresql/runtime/pom.xml +++ b/extensions/jdbc/jdbc-postgresql/runtime/pom.xml @@ -18,7 +18,7 @@ postgresql - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jgit/deployment/src/main/java/io/quarkus/jgit/runtime/deployment/JGitProcessor.java b/extensions/jgit/deployment/src/main/java/io/quarkus/jgit/runtime/deployment/JGitProcessor.java index b050ad6a1b1da..4211b7a9c38c3 100644 --- a/extensions/jgit/deployment/src/main/java/io/quarkus/jgit/runtime/deployment/JGitProcessor.java +++ b/extensions/jgit/deployment/src/main/java/io/quarkus/jgit/runtime/deployment/JGitProcessor.java @@ -1,11 +1,15 @@ package io.quarkus.jgit.runtime.deployment; +import java.util.Arrays; +import java.util.List; + import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBundleBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; +import io.quarkus.jgit.runtime.PortWatcherRunTime; class JGitProcessor { @@ -84,8 +88,11 @@ ReflectiveClassBuildItem reflection() { } @BuildStep - RuntimeInitializedClassBuildItem lazyDigest() { - return new RuntimeInitializedClassBuildItem("org.eclipse.jgit.transport.HttpAuthMethod$Digest"); + List runtimeInitializedClasses() { + return Arrays.asList( + new RuntimeInitializedClassBuildItem("org.eclipse.jgit.transport.HttpAuthMethod$Digest"), + new RuntimeInitializedClassBuildItem("org.eclipse.jgit.lib.GpgSigner"), + new RuntimeInitializedClassBuildItem(PortWatcherRunTime.class.getName())); } @BuildStep diff --git a/extensions/jgit/runtime/pom.xml b/extensions/jgit/runtime/pom.xml index 620dff6e6e1f5..86662c78b0c7e 100644 --- a/extensions/jgit/runtime/pom.xml +++ b/extensions/jgit/runtime/pom.xml @@ -15,7 +15,7 @@ Access your Git repositories - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherRunTime.java b/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherRunTime.java new file mode 100644 index 0000000000000..16e0c2d15cd43 --- /dev/null +++ b/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherRunTime.java @@ -0,0 +1,16 @@ +package io.quarkus.jgit.runtime; + +import java.net.InetAddress; +import java.net.UnknownHostException; + +public class PortWatcherRunTime { + + public static InetAddress anyLocalAddress; + + static { + try { + anyLocalAddress = InetAddress.getByName("0.0.0.0"); + } catch (UnknownHostException e) { + } + } +} diff --git a/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherSubstitutions.java b/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherSubstitutions.java new file mode 100644 index 0000000000000..f4123fcf39142 --- /dev/null +++ b/extensions/jgit/runtime/src/main/java/io/quarkus/jgit/runtime/PortWatcherSubstitutions.java @@ -0,0 +1,27 @@ +package io.quarkus.jgit.runtime; + +import java.net.InetAddress; + +import com.oracle.svm.core.annotate.Alias; +import com.oracle.svm.core.annotate.InjectAccessors; +import com.oracle.svm.core.annotate.TargetClass; + +/* + * The following substitution is required because of a new restriction in GraalVM 19.3.0 that prohibits the presence of + * java.net.Inet4Address in the image heap. Each field annotated with @InjectAccessors is lazily recomputed at runtime on first + * access while PortWatcher.class can still be initialized during the native image build. + */ +@TargetClass(className = "com.jcraft.jsch.PortWatcher") +final class Target_com_jcraft_jsch_PortWatcher { + + @Alias + @InjectAccessors(AnyLocalAddressAccessor.class) + private static InetAddress anyLocalAddress; +} + +final class AnyLocalAddressAccessor { + + static InetAddress get() { + return PortWatcherRunTime.anyLocalAddress; + } +} diff --git a/extensions/kafka-client/runtime/pom.xml b/extensions/kafka-client/runtime/pom.xml index 08e2a0fa2e26b..e6b5e61a7837b 100644 --- a/extensions/kafka-client/runtime/pom.xml +++ b/extensions/kafka-client/runtime/pom.xml @@ -35,7 +35,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/kafka-streams/runtime/pom.xml b/extensions/kafka-streams/runtime/pom.xml index df683d160a149..798b2c3e44040 100644 --- a/extensions/kafka-streams/runtime/pom.xml +++ b/extensions/kafka-streams/runtime/pom.xml @@ -31,7 +31,7 @@ kafka-streams - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java b/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java index 9bc5340dc1786..3ba30defee42a 100644 --- a/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java +++ b/extensions/keycloak-authorization/deployment/src/main/java/io/quarkus/keycloak/pep/deployment/KeycloakReflectionBuildStep.java @@ -31,6 +31,7 @@ import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; +import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; public class KeycloakReflectionBuildStep { @@ -74,4 +75,14 @@ public void registerServiceProviders(BuildProducer ser ClaimsInformationPointProviderFactory.class.getName())); } + + @BuildStep + public void runtimeInit(BuildProducer runtimeInit) { + runtimeInit.produce(new RuntimeInitializedClassBuildItem("org.keycloak.common.util.BouncyIntegration")); + runtimeInit.produce(new RuntimeInitializedClassBuildItem("org.keycloak.common.util.PemUtils")); + runtimeInit.produce(new RuntimeInitializedClassBuildItem("org.keycloak.common.util.DerUtils")); + runtimeInit.produce(new RuntimeInitializedClassBuildItem("org.keycloak.common.util.KeystoreUtil")); + runtimeInit.produce(new RuntimeInitializedClassBuildItem("org.keycloak.common.util.CertificateUtils")); + runtimeInit.produce(new RuntimeInitializedClassBuildItem("org.keycloak.common.util.OCSPUtils")); + } } diff --git a/extensions/kubernetes-client/runtime/pom.xml b/extensions/kubernetes-client/runtime/pom.xml index bc22cb63ae6e7..78b66d499d4ea 100644 --- a/extensions/kubernetes-client/runtime/pom.xml +++ b/extensions/kubernetes-client/runtime/pom.xml @@ -23,7 +23,7 @@ quarkus-jackson - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/mongodb-client/runtime/pom.xml b/extensions/mongodb-client/runtime/pom.xml index 43e6567abf057..99ff8c86f87c5 100644 --- a/extensions/mongodb-client/runtime/pom.xml +++ b/extensions/mongodb-client/runtime/pom.xml @@ -37,7 +37,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/narayana-jta/runtime/pom.xml b/extensions/narayana-jta/runtime/pom.xml index cfe45f6a03c73..78b06a9212007 100644 --- a/extensions/narayana-jta/runtime/pom.xml +++ b/extensions/narayana-jta/runtime/pom.xml @@ -45,7 +45,7 @@ smallrye-reactive-converter-api - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/neo4j/runtime/pom.xml b/extensions/neo4j/runtime/pom.xml index a9fde15ef64ef..3aea33dd25baf 100644 --- a/extensions/neo4j/runtime/pom.xml +++ b/extensions/neo4j/runtime/pom.xml @@ -22,7 +22,7 @@ quarkus-arc - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/netty/runtime/pom.xml b/extensions/netty/runtime/pom.xml index e84ebb0050580..034b97477a8bc 100644 --- a/extensions/netty/runtime/pom.xml +++ b/extensions/netty/runtime/pom.xml @@ -36,7 +36,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/quartz/runtime/pom.xml b/extensions/quartz/runtime/pom.xml index af327d6c85612..9ad81a1c8642f 100644 --- a/extensions/quartz/runtime/pom.xml +++ b/extensions/quartz/runtime/pom.xml @@ -23,7 +23,7 @@ quarkus-scheduler - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/rest-client/runtime/pom.xml b/extensions/rest-client/runtime/pom.xml index e7cd65dde329e..2686ff5db481f 100644 --- a/extensions/rest-client/runtime/pom.xml +++ b/extensions/rest-client/runtime/pom.xml @@ -58,7 +58,7 @@ commons-logging-jboss-logging - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/resteasy-common/deployment/pom.xml b/extensions/resteasy-common/deployment/pom.xml index 7f04f1644cfac..fc9ea9c2961eb 100644 --- a/extensions/resteasy-common/deployment/pom.xml +++ b/extensions/resteasy-common/deployment/pom.xml @@ -31,7 +31,7 @@ quarkus-arc-deployment - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/resteasy-common/runtime/pom.xml b/extensions/resteasy-common/runtime/pom.xml index 12fdcd0bda0ce..6d553d8f62029 100644 --- a/extensions/resteasy-common/runtime/pom.xml +++ b/extensions/resteasy-common/runtime/pom.xml @@ -15,7 +15,7 @@ REST framework implementing JAX-RS and more - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/resteasy/deployment/pom.xml b/extensions/resteasy/deployment/pom.xml index 0c1f1e66a00da..ccb5aa8354c4f 100644 --- a/extensions/resteasy/deployment/pom.xml +++ b/extensions/resteasy/deployment/pom.xml @@ -39,7 +39,7 @@ quarkus-security-spi - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/security/runtime/pom.xml b/extensions/security/runtime/pom.xml index 40136711a0b3e..2b2a2dee44ce1 100644 --- a/extensions/security/runtime/pom.xml +++ b/extensions/security/runtime/pom.xml @@ -23,7 +23,7 @@ jakarta.interceptor-api - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/smallrye-fault-tolerance/deployment/pom.xml b/extensions/smallrye-fault-tolerance/deployment/pom.xml index c96bd88afac5c..4927005c5d9f6 100644 --- a/extensions/smallrye-fault-tolerance/deployment/pom.xml +++ b/extensions/smallrye-fault-tolerance/deployment/pom.xml @@ -31,7 +31,7 @@ quarkus-smallrye-fault-tolerance - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/smallrye-fault-tolerance/runtime/pom.xml b/extensions/smallrye-fault-tolerance/runtime/pom.xml index 8284aa06e61a6..53da9a7c4edd1 100644 --- a/extensions/smallrye-fault-tolerance/runtime/pom.xml +++ b/extensions/smallrye-fault-tolerance/runtime/pom.xml @@ -50,7 +50,7 @@ commons-logging-jboss-logging - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/smallrye-opentracing/runtime/pom.xml b/extensions/smallrye-opentracing/runtime/pom.xml index 3b4b099c8491b..e3b9f8f823e94 100644 --- a/extensions/smallrye-opentracing/runtime/pom.xml +++ b/extensions/smallrye-opentracing/runtime/pom.xml @@ -57,7 +57,7 @@ jakarta.servlet-api - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml b/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml index 5ce1596f590f0..6ff8897875253 100644 --- a/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml @@ -54,7 +54,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml index 4144091a790e7..2499bff2d963f 100644 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml @@ -66,7 +66,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml b/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml index fc6ca58cc3dc4..f47ec2dc9b344 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml @@ -50,7 +50,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/undertow-websockets/runtime/pom.xml b/extensions/undertow-websockets/runtime/pom.xml index e4e727a4a4330..67e66d5deb9e6 100644 --- a/extensions/undertow-websockets/runtime/pom.xml +++ b/extensions/undertow-websockets/runtime/pom.xml @@ -16,7 +16,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/undertow/runtime/pom.xml b/extensions/undertow/runtime/pom.xml index 6465349bedb6c..b4bf23076f96b 100644 --- a/extensions/undertow/runtime/pom.xml +++ b/extensions/undertow/runtime/pom.xml @@ -37,7 +37,7 @@ jakarta.enterprise.cdi-api - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/vertx-core/runtime/pom.xml b/extensions/vertx-core/runtime/pom.xml index ceaf0211ebc63..ea903f40e0974 100644 --- a/extensions/vertx-core/runtime/pom.xml +++ b/extensions/vertx-core/runtime/pom.xml @@ -42,7 +42,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/vertx/runtime/pom.xml b/extensions/vertx/runtime/pom.xml index b86c2cb88766d..0b7164bb5495a 100644 --- a/extensions/vertx/runtime/pom.xml +++ b/extensions/vertx/runtime/pom.xml @@ -57,7 +57,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/integration-tests/amazon-lambda-http-resteasy/pom.xml b/integration-tests/amazon-lambda-http-resteasy/pom.xml index ab618e48d1ff6..b51e592e0ea16 100644 --- a/integration-tests/amazon-lambda-http-resteasy/pom.xml +++ b/integration-tests/amazon-lambda-http-resteasy/pom.xml @@ -101,7 +101,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/amazon-lambda-http/pom.xml b/integration-tests/amazon-lambda-http/pom.xml index 640f7b8dff641..7cb5aca960cbb 100644 --- a/integration-tests/amazon-lambda-http/pom.xml +++ b/integration-tests/amazon-lambda-http/pom.xml @@ -109,7 +109,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/amazon-lambda/pom.xml b/integration-tests/amazon-lambda/pom.xml index 9282acbe209aa..6ff4481343577 100644 --- a/integration-tests/amazon-lambda/pom.xml +++ b/integration-tests/amazon-lambda/pom.xml @@ -98,7 +98,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/elytron-security-jdbc/pom.xml b/integration-tests/elytron-security-jdbc/pom.xml index 7b8a78e0aa3fa..62026c71fdbe6 100644 --- a/integration-tests/elytron-security-jdbc/pom.xml +++ b/integration-tests/elytron-security-jdbc/pom.xml @@ -105,7 +105,6 @@ false false ${graalvmHome} - true true false diff --git a/integration-tests/flyway/pom.xml b/integration-tests/flyway/pom.xml index c2a3ddaddab1b..6a075b6817098 100644 --- a/integration-tests/flyway/pom.xml +++ b/integration-tests/flyway/pom.xml @@ -116,7 +116,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/hibernate-orm-panache/pom.xml b/integration-tests/hibernate-orm-panache/pom.xml index 572f19c9d6447..59a7b99a44149 100644 --- a/integration-tests/hibernate-orm-panache/pom.xml +++ b/integration-tests/hibernate-orm-panache/pom.xml @@ -137,7 +137,6 @@ false false ${graalvmHome} - false diff --git a/integration-tests/hibernate-search-elasticsearch/pom.xml b/integration-tests/hibernate-search-elasticsearch/pom.xml index c607395b7cd09..bf3e55f93a6f7 100644 --- a/integration-tests/hibernate-search-elasticsearch/pom.xml +++ b/integration-tests/hibernate-search-elasticsearch/pom.xml @@ -185,7 +185,6 @@ false false ${graalvmHome} - false false diff --git a/integration-tests/hibernate-validator/pom.xml b/integration-tests/hibernate-validator/pom.xml index 780f306fd868e..be2e6674ed488 100644 --- a/integration-tests/hibernate-validator/pom.xml +++ b/integration-tests/hibernate-validator/pom.xml @@ -122,7 +122,6 @@ false false ${graalvmHome} - false diff --git a/integration-tests/infinispan-cache-jpa/pom.xml b/integration-tests/infinispan-cache-jpa/pom.xml index 1b4cd3ab0f320..f6098d8fb0e50 100644 --- a/integration-tests/infinispan-cache-jpa/pom.xml +++ b/integration-tests/infinispan-cache-jpa/pom.xml @@ -121,7 +121,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/infinispan-embedded/pom.xml b/integration-tests/infinispan-embedded/pom.xml index 4a6826aab74ff..61d1046f266e5 100644 --- a/integration-tests/infinispan-embedded/pom.xml +++ b/integration-tests/infinispan-embedded/pom.xml @@ -144,7 +144,6 @@ -H:ResourceConfigurationFiles=${project.basedir}/src/main/resources/resources-config.json ${graalvmHome} - true diff --git a/integration-tests/jpa-derby/pom.xml b/integration-tests/jpa-derby/pom.xml index 10f426d0137f8..08776dd2d570d 100644 --- a/integration-tests/jpa-derby/pom.xml +++ b/integration-tests/jpa-derby/pom.xml @@ -112,7 +112,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/jpa-h2/pom.xml b/integration-tests/jpa-h2/pom.xml index 23eaf40c1d472..df11bc035b75d 100644 --- a/integration-tests/jpa-h2/pom.xml +++ b/integration-tests/jpa-h2/pom.xml @@ -112,7 +112,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/jpa-mariadb/pom.xml b/integration-tests/jpa-mariadb/pom.xml index 8c3eb78e8778f..bff44413ef8d3 100644 --- a/integration-tests/jpa-mariadb/pom.xml +++ b/integration-tests/jpa-mariadb/pom.xml @@ -148,7 +148,6 @@ false false ${graalvmHome} - false false diff --git a/integration-tests/jpa-mssql/pom.xml b/integration-tests/jpa-mssql/pom.xml index 6c9e42aeb732c..32c2a8870138d 100644 --- a/integration-tests/jpa-mssql/pom.xml +++ b/integration-tests/jpa-mssql/pom.xml @@ -156,7 +156,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/jpa-mysql/pom.xml b/integration-tests/jpa-mysql/pom.xml index 8d9fe860e614f..5494541abb1f5 100644 --- a/integration-tests/jpa-mysql/pom.xml +++ b/integration-tests/jpa-mysql/pom.xml @@ -148,7 +148,6 @@ false false ${graalvmHome} - false false diff --git a/integration-tests/jpa-postgresql/pom.xml b/integration-tests/jpa-postgresql/pom.xml index f9a9a9ab2d07e..5ce6c7a13db6d 100644 --- a/integration-tests/jpa-postgresql/pom.xml +++ b/integration-tests/jpa-postgresql/pom.xml @@ -143,7 +143,6 @@ false false ${graalvmHome} - false diff --git a/integration-tests/jpa-without-entity/pom.xml b/integration-tests/jpa-without-entity/pom.xml index daaaacf861b4c..3e40b635a3e51 100644 --- a/integration-tests/jpa-without-entity/pom.xml +++ b/integration-tests/jpa-without-entity/pom.xml @@ -105,7 +105,6 @@ true true ${graalvmHome} - false false diff --git a/integration-tests/maven/src/test/resources/expected/create-extension-pom-itest/integration-tests/itest/pom.xml b/integration-tests/maven/src/test/resources/expected/create-extension-pom-itest/integration-tests/itest/pom.xml index 1ccd2892cbcb3..e5fb5b277fb17 100644 --- a/integration-tests/maven/src/test/resources/expected/create-extension-pom-itest/integration-tests/itest/pom.xml +++ b/integration-tests/maven/src/test/resources/expected/create-extension-pom-itest/integration-tests/itest/pom.xml @@ -99,7 +99,6 @@ false false ${graalvmHome} - true true false diff --git a/integration-tests/neo4j/README.md b/integration-tests/neo4j/README.md index 88824027335ca..a4f57b1ed4ac9 100644 --- a/integration-tests/neo4j/README.md +++ b/integration-tests/neo4j/README.md @@ -54,7 +54,6 @@ The Quarkus maven plugin must be configured like this: true true true - true diff --git a/integration-tests/vault-app/pom.xml b/integration-tests/vault-app/pom.xml index 1882ce4c3713d..95d6b6503c56e 100644 --- a/integration-tests/vault-app/pom.xml +++ b/integration-tests/vault-app/pom.xml @@ -172,7 +172,6 @@ false false ${graalvmHome} - false diff --git a/integration-tests/vertx-graphql/pom.xml b/integration-tests/vertx-graphql/pom.xml index e0394569c31cb..3e0e554a507f5 100644 --- a/integration-tests/vertx-graphql/pom.xml +++ b/integration-tests/vertx-graphql/pom.xml @@ -91,7 +91,6 @@ false false ${graalvmHome} - true true false diff --git a/integration-tests/vertx-http/pom.xml b/integration-tests/vertx-http/pom.xml index eef1a2e2f7c98..151c17b42100a 100644 --- a/integration-tests/vertx-http/pom.xml +++ b/integration-tests/vertx-http/pom.xml @@ -103,7 +103,6 @@ -H:EnableURLProtocols=http,https ${graalvmHome} - true true