From 4c193ae8d3cb0d4537c0e70862dd9d6433a4acfe Mon Sep 17 00:00:00 2001 From: Gwenneg Lepage Date: Sun, 26 Jan 2020 00:26:13 +0100 Subject: [PATCH] Drop GraalVM 19.2.1 support and deprecate enableJni option --- bom/runtime/pom.xml | 6 +- build-parent/pom.xml | 2 +- .../io/quarkus/deployment/JniProcessor.java | 21 +++++-- .../deployment/builditem/JniBuildItem.java | 5 ++ .../quarkus/deployment/pkg/NativeConfig.java | 7 ++- .../pkg/steps/NativeImageBuildStep.java | 23 +++---- .../steps/NativeImageAutoFeatureStep.java | 24 +------ .../steps/NativeImageConfigBuildStep.java | 14 ++--- core/runtime/pom.xml | 2 +- .../runtime/graal/FieldReplacement.java | 63 ------------------- core/test-extension/runtime/pom.xml | 2 +- .../quarkus/gradle/tasks/QuarkusNative.java | 14 ++++- .../io/quarkus/maven/NativeImageMojo.java | 12 +++- .../integration-test-pom.xml | 1 - extensions/agroal/runtime/pom.xml | 2 +- .../deployment/DynamodbProcessor.java | 6 -- .../amazon-lambda-http/deployment/pom.xml | 2 +- extensions/amazon-lambda-http/runtime/pom.xml | 2 +- extensions/artemis-core/runtime/pom.xml | 2 +- .../azure-functions-http/deployment/pom.xml | 2 +- .../azure-functions-http/runtime/pom.xml | 2 +- extensions/caffeine/runtime/pom.xml | 2 +- .../elasticsearch-rest-client/runtime/pom.xml | 2 +- .../elytron-security-common/runtime/pom.xml | 2 +- .../runtime/pom.xml | 2 +- extensions/elytron-security/runtime/pom.xml | 2 +- extensions/flyway/runtime/pom.xml | 2 +- extensions/hibernate-orm/runtime/pom.xml | 2 +- .../runtime/pom.xml | 2 +- .../hibernate-validator/runtime/pom.xml | 2 +- extensions/infinispan-client/README.MD | 7 +-- extensions/infinispan-client/runtime/pom.xml | 2 +- .../infinispan-embedded/runtime/pom.xml | 2 +- extensions/jaeger/runtime/pom.xml | 2 +- extensions/jaxb/runtime/pom.xml | 2 +- extensions/jdbc/jdbc-derby/runtime/pom.xml | 2 +- extensions/jdbc/jdbc-h2/runtime/pom.xml | 2 +- extensions/jdbc/jdbc-mariadb/runtime/pom.xml | 2 +- extensions/jdbc/jdbc-mssql/runtime/pom.xml | 2 +- extensions/jdbc/jdbc-mysql/runtime/pom.xml | 2 +- .../jdbc/jdbc-postgresql/runtime/pom.xml | 2 +- extensions/jgit/runtime/pom.xml | 2 +- extensions/jsch/runtime/pom.xml | 2 +- .../client/deployment/KafkaProcessor.java | 6 +- extensions/kafka-client/runtime/pom.xml | 2 +- .../deployment/KafkaStreamsProcessor.java | 7 --- extensions/kafka-streams/runtime/pom.xml | 2 +- extensions/kubernetes-client/runtime/pom.xml | 2 +- .../deployment/GelfLogHandlerProcessor.java | 6 -- extensions/logging-gelf/runtime/pom.xml | 2 +- extensions/mongodb-client/runtime/pom.xml | 2 +- extensions/narayana-jta/runtime/pom.xml | 2 +- extensions/narayana-stm/runtime/pom.xml | 2 +- extensions/neo4j/runtime/pom.xml | 2 +- .../netty/deployment/NettyProcessor.java | 11 +--- extensions/netty/runtime/pom.xml | 2 +- extensions/quartz/runtime/pom.xml | 2 +- extensions/rest-client/runtime/pom.xml | 2 +- extensions/resteasy-common/deployment/pom.xml | 2 +- extensions/resteasy-common/runtime/pom.xml | 2 +- extensions/resteasy/deployment/pom.xml | 2 +- extensions/security/runtime/pom.xml | 2 +- .../deployment/pom.xml | 2 +- .../smallrye-fault-tolerance/runtime/pom.xml | 2 +- .../smallrye-opentracing/runtime/pom.xml | 2 +- .../runtime/pom.xml | 2 +- .../runtime/pom.xml | 2 +- .../runtime/pom.xml | 2 +- .../tika/deployment/TikaProcessor.java | 6 -- .../undertow-websockets/runtime/pom.xml | 2 +- extensions/undertow/runtime/pom.xml | 2 +- extensions/vertx-core/runtime/pom.xml | 2 +- extensions/vertx/runtime/pom.xml | 2 +- .../amazon-lambda-http-resteasy/pom.xml | 1 - integration-tests/amazon-lambda-http/pom.xml | 1 - integration-tests/amazon-lambda/pom.xml | 1 - .../elytron-security-jdbc/pom.xml | 1 - integration-tests/flyway/pom.xml | 1 - .../hibernate-orm-panache/pom.xml | 1 - .../hibernate-search-elasticsearch/pom.xml | 1 - integration-tests/hibernate-validator/pom.xml | 1 - .../infinispan-cache-jpa/pom.xml | 1 - integration-tests/infinispan-embedded/pom.xml | 1 - integration-tests/jpa-derby/pom.xml | 1 - integration-tests/jpa-h2/pom.xml | 1 - integration-tests/jpa-mariadb/pom.xml | 1 - integration-tests/jpa-mssql/pom.xml | 1 - integration-tests/jpa-mysql/pom.xml | 1 - integration-tests/jpa-postgresql/pom.xml | 1 - integration-tests/jpa-without-entity/pom.xml | 1 - .../java/io/quarkus/it/jsch/JSchTest.java | 2 - integration-tests/logging-gelf/pom.xml | 1 - .../integration-tests/itest/pom.xml | 1 - integration-tests/vault-app/pom.xml | 1 - integration-tests/vertx-graphql/pom.xml | 1 - integration-tests/vertx-http/pom.xml | 1 - 96 files changed, 122 insertions(+), 251 deletions(-) delete mode 100644 core/runtime/src/main/java/io/quarkus/runtime/graal/FieldReplacement.java diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 3f74246ef..180cee25e 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.1 1.0.1.Final 2.10.2 1.0.0.Final @@ -848,7 +848,7 @@ ${jboss-logmanager.version} - com.oracle.substratevm + org.graalvm.nativeimage svm @@ -1670,7 +1670,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 801ef47a2..c2834f0d3 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -32,7 +32,7 @@ - 19.2.1 + 19.3.1 4.1.1 0.0.9 3.8.4 diff --git a/core/deployment/src/main/java/io/quarkus/deployment/JniProcessor.java b/core/deployment/src/main/java/io/quarkus/deployment/JniProcessor.java index 1b667e961..70cd34ba7 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/JniProcessor.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/JniProcessor.java @@ -1,9 +1,10 @@ package io.quarkus.deployment; -import java.util.Collections; import java.util.List; import java.util.Optional; +import org.jboss.logging.Logger; + import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.JniBuildItem; @@ -13,6 +14,8 @@ import io.quarkus.runtime.annotations.ConfigRoot; public class JniProcessor { + private static final Logger LOGGER = Logger.getLogger(JniProcessor.class); + JniConfig jni; @ConfigRoot(phase = ConfigPhase.BUILD_TIME) @@ -24,16 +27,22 @@ public class JniProcessor { Optional> libraryPaths; /** - * Enable JNI support. + * @deprecated JNI is always enabled starting from GraalVM 19.3.1. */ - @ConfigItem(defaultValue = "false") - boolean enable = false; + @Deprecated + @ConfigItem(defaultValue = "true") + boolean enable = true; } @BuildStep void setupJni(BuildProducer jniProducer) { - if ((jni.enable) || jni.libraryPaths.isPresent()) { - jniProducer.produce(new JniBuildItem(jni.libraryPaths.orElse(Collections.emptyList()))); + if (!jni.enable) { + LOGGER.warn("Your application is setting the deprecated 'quarkus.jni.enable' configuration key to false. Please" + + " consider removing this configuration key as it is ignored (JNI is always enabled) and it will be" + + " removed in a future Quarkus version."); + } + if (jni.libraryPaths.isPresent()) { + jniProducer.produce(new JniBuildItem(jni.libraryPaths.get())); } } } diff --git a/core/deployment/src/main/java/io/quarkus/deployment/builditem/JniBuildItem.java b/core/deployment/src/main/java/io/quarkus/deployment/builditem/JniBuildItem.java index 0989f82fa..c0f7583ee 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/builditem/JniBuildItem.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/builditem/JniBuildItem.java @@ -9,6 +9,11 @@ public final class JniBuildItem extends MultiBuildItem { private final List libraryPaths; + /** + * @deprecated This method was previously used to enable JNI from Quarkus extensions, but JNI is always enabled starting + * from GraalVM 19.3.1. + */ + @Deprecated public JniBuildItem() { this(Collections.emptyList()); } 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 df72dd3f5..88a84d727 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 @@ -36,9 +36,10 @@ public class NativeConfig { public boolean enableAllSecurityServices; /** - * If JNI should be enabled + * @deprecated JNI is always enabled starting from GraalVM 19.3.1. */ - @ConfigItem(defaultValue = "false") + @Deprecated + @ConfigItem(defaultValue = "true") public boolean enableJni; /** @@ -132,7 +133,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.1-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 5bc783d7f..2b5aa01dc 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 @@ -176,8 +176,10 @@ public class NativeImageBuildStep { //todo: this should be specific build items if (prop.getKey().equals("quarkus.ssl.native") && prop.getValue() != null) { enableSslNative = Boolean.parseBoolean(prop.getValue()); - } else if (prop.getKey().equals("quarkus.jni.enable") && prop.getValue() != null) { - nativeConfig.enableJni |= Boolean.parseBoolean(prop.getValue()); + } else if (prop.getKey().equals("quarkus.jni.enable") && prop.getValue().equals("false")) { + log.warn("Your application is setting the deprecated 'quarkus.jni.enable' configuration key to false." + + " Please consider removing this configuration key as it is ignored (JNI is always enabled) and it" + + " will be removed in a future Quarkus version."); } else if (prop.getKey().equals("quarkus.native.enable-all-security-services") && prop.getValue() != null) { nativeConfig.enableAllSecurityServices |= Boolean.parseBoolean(prop.getValue()); } else if (prop.getKey().equals("quarkus.native.enable-all-charsets") && prop.getValue() != null) { @@ -195,13 +197,13 @@ public class NativeImageBuildStep { } if (enableSslNative) { nativeConfig.enableHttpsUrlHandler = true; - nativeConfig.enableJni = true; nativeConfig.enableAllSecurityServices = true; } nativeConfig.additionalBuildArgs.ifPresent(l -> l.stream().map(String::trim).forEach(command::add)); command.add("--initialize-at-build-time="); 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("-H:+JNI"); command.add("-jar"); command.add(runnerJarName); @@ -266,10 +268,10 @@ public class NativeImageBuildStep { if (!nativeConfig.enableIsolates) { command.add("-H:-SpawnIsolates"); } - if (nativeConfig.enableJni || (graalVMVersion.isPresent() && !graalVMVersion.get().contains(" 19.2."))) { - command.add("-H:+JNI"); - } else { - command.add("-H:-JNI"); + if (!nativeConfig.enableJni) { + log.warn("Your application is setting the deprecated 'quarkus.native.enable-jni' configuration key to false." + + " Please consider removing this configuration key as it is ignored (JNI is always enabled) and it" + + " will be removed in a future Quarkus version."); } if (!nativeConfig.enableServer && !IS_WINDOWS) { command.add("--no-server"); @@ -322,12 +324,11 @@ public class NativeImageBuildStep { private void checkGraalVMVersion(String version) { log.info("Running Quarkus native-image plugin on " + version); - final List obsoleteGraalVmVersions = Arrays.asList("1.0.0", "19.0.", "19.1.", "19.2.0", "19.3.0"); + final List obsoleteGraalVmVersions = Arrays.asList("1.0.0", "19.0.", "19.1.", "19.2.", "19.3.0"); final boolean vmVersionIsObsolete = obsoleteGraalVmVersions.stream().anyMatch(v -> version.contains(" " + v)); if (vmVersionIsObsolete) { - throw new IllegalStateException("Unsupported version of GraalVM detected: " + version + "." - + " Quarkus currently offers a stable support of GraalVM 19.2.1 and a preview support of GraalVM 19.3.1." - + " Please upgrade GraalVM to one of these versions."); + throw new IllegalStateException( + "Out of date version of GraalVM detected: " + version + ". Please upgrade to GraalVM 19.3.1."); } } 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 004f70ef2..776aeb77a 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 @@ -43,7 +43,6 @@ import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildI import io.quarkus.deployment.builditem.nativeimage.RuntimeReinitializedClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; import io.quarkus.deployment.builditem.nativeimage.UnsafeAccessedFieldBuildItem; -import io.quarkus.gizmo.AssignableResultHandle; import io.quarkus.gizmo.CatchBlockCreator; import io.quarkus.gizmo.ClassCreator; import io.quarkus.gizmo.ClassOutput; @@ -67,8 +66,6 @@ public class NativeImageAutoFeatureStep { 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_FEATURE = "com.oracle.svm.core.jdk.LocalizationFeature"; - // TODO: Delete the following line when Quarkus no longer supports GraalVM 19.2.1. - static final String LOCALIZATION_SUPPORT = "com.oracle.svm.core.jdk.LocalizationSupport"; @BuildStep List registerPackageResources( @@ -208,26 +205,7 @@ public class NativeImageAutoFeatureStep { } if (!resourceBundles.isEmpty()) { - /* - * Start of a temporary workaround to support both GraalVM 19.2.1 and 19.3.1 at the same time. - * TODO: Delete this workaround when Quarkus no longer supports GraalVM 19.2.1. - */ - AssignableResultHandle locClass = overallCatch.createVariable(Class.class); - TryBlock workaroundTryBlock = overallCatch.tryBlock(); - workaroundTryBlock.assign(locClass, workaroundTryBlock.loadClass(LOCALIZATION_FEATURE)); - // The following line is required to throw an exception and make sure we load the 19.2.1 class when needed. - workaroundTryBlock.invokeVirtualMethod( - ofMethod(Class.class, "getDeclaredMethod", Method.class, String.class, Class[].class), locClass, - workaroundTryBlock.load("addBundleToCache"), - workaroundTryBlock.marshalAsArray(Class.class, workaroundTryBlock.loadClass(String.class))); - CatchBlockCreator workaroundCatchBlock = workaroundTryBlock.addCatch(Throwable.class); - workaroundCatchBlock.assign(locClass, workaroundCatchBlock.loadClass(LOCALIZATION_SUPPORT)); - /* - * End of the temporary workaround. - */ - - // TODO: Uncomment the following line when the temporary workaround above is deleted. - //ResultHandle locClass = overallCatch.loadClass(LOCALIZATION_FEATURE); + ResultHandle locClass = overallCatch.loadClass(LOCALIZATION_FEATURE); ResultHandle params = overallCatch.marshalAsArray(Class.class, overallCatch.loadClass(String.class)); ResultHandle registerMethod = overallCatch.invokeVirtualMethod( diff --git a/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageConfigBuildStep.java b/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageConfigBuildStep.java index 130df595a..8475760e5 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageConfigBuildStep.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/steps/NativeImageConfigBuildStep.java @@ -122,22 +122,16 @@ class NativeImageConfigBuildStep { } nativeImage.produce(new NativeImageSystemPropertyBuildItem("quarkus.ssl.native", sslNativeEnabled.toString())); - boolean requireJni = false; if (!enableAllSecurityServicesBuildItems.isEmpty()) { - requireJni = true; nativeImage.produce(new NativeImageSystemPropertyBuildItem("quarkus.native.enable-all-security-services", "true")); } - if (!jniBuildItems.isEmpty() || requireJni) { - for (JniBuildItem jniBuildItem : jniBuildItems) { - if (jniBuildItem.getLibraryPaths() != null && !jniBuildItem.getLibraryPaths().isEmpty()) { - for (String path : jniBuildItem.getLibraryPaths()) { - javaLibraryPathAdditionalPath - .produce(new JavaLibraryPathAdditionalPathBuildItem(path)); - } + for (JniBuildItem jniBuildItem : jniBuildItems) { + if (jniBuildItem.getLibraryPaths() != null && !jniBuildItem.getLibraryPaths().isEmpty()) { + for (String path : jniBuildItem.getLibraryPaths()) { + javaLibraryPathAdditionalPath.produce(new JavaLibraryPathAdditionalPathBuildItem(path)); } } - nativeImage.produce(new NativeImageSystemPropertyBuildItem("quarkus.jni.enable", "true")); } if (!nativeImageEnableAllCharsetsBuildItems.isEmpty()) { diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml index 80b7d7d5c..5843f2079 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/runtime/src/main/java/io/quarkus/runtime/graal/FieldReplacement.java b/core/runtime/src/main/java/io/quarkus/runtime/graal/FieldReplacement.java deleted file mode 100644 index 43eeec7e7..000000000 --- a/core/runtime/src/main/java/io/quarkus/runtime/graal/FieldReplacement.java +++ /dev/null @@ -1,63 +0,0 @@ -package io.quarkus.runtime.graal; - -import java.lang.annotation.Annotation; -import java.lang.reflect.AnnotatedType; -import java.lang.reflect.Field; -import java.lang.reflect.Type; -import java.util.function.BooleanSupplier; - -import com.oracle.svm.core.annotate.Alias; -import com.oracle.svm.core.annotate.Substitute; -import com.oracle.svm.core.annotate.TargetClass; - -@TargetClass(value = Field.class, onlyWith = GraalVersion19_2.class) -final class FieldReplacement { - - @Alias - public Type getGenericType() { - return null; - } - - @Alias - public T getAnnotation(Class annotationClass) { - return null; - } - - @Alias - public Annotation[] getDeclaredAnnotations() { - return null; - } - - @Substitute - public AnnotatedType getAnnotatedType() { - return new AnnotatedType() { - @Override - public Type getType() { - return getGenericType(); - } - - @Override - public T getAnnotation(Class annotationClass) { - return FieldReplacement.class.getAnnotation(annotationClass); - } - - @Override - public Annotation[] getAnnotations() { - return FieldReplacement.class.getDeclaredAnnotations(); - } - - @Override - public Annotation[] getDeclaredAnnotations() { - return FieldReplacement.class.getDeclaredAnnotations(); - } - }; - } - -} - -final class GraalVersion19_2 implements BooleanSupplier { - public boolean getAsBoolean() { - final String version = System.getProperty("org.graalvm.version"); - return version.startsWith("19.2."); - } -} diff --git a/core/test-extension/runtime/pom.xml b/core/test-extension/runtime/pom.xml index 208261cf5..195aa6ed0 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 613b66257..e68b9d6b1 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 @@ -44,7 +44,11 @@ public class QuarkusNative extends QuarkusTask { private boolean enableServer = false; - private boolean enableJni = false; + /** + * @deprecated JNI is always enabled starting from GraalVM 19.3.1. + */ + @Deprecated + private boolean enableJni = true; private boolean autoServiceLoaderRegistration = false; @@ -200,11 +204,16 @@ public class QuarkusNative extends QuarkusTask { } @Input + @Deprecated public boolean isEnableJni() { return enableJni; } - @Option(description = "Enable jni", option = "enable-jni") + /** + * @deprecated JNI is always enabled starting from GraalVM 19.3.1. + */ + @Option(description = "Enable jni (deprecated)", option = "enable-jni") + @Deprecated public void setEnableJni(boolean enableJni) { this.enableJni = enableJni; } @@ -416,7 +425,6 @@ public class QuarkusNative extends QuarkusTask { configs.put("quarkus.native.enable-http-url-handler", Boolean.toString(enableHttpUrlHandler)); configs.put("quarkus.native.enable-isolates", Boolean.toString(enableIsolates)); - configs.put("quarkus.native.enable-jni", Boolean.toString(enableJni)); configs.put("quarkus.native.enable-server", Boolean.toString(enableServer)); 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 f10c06977..f832053dc 100644 --- a/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java +++ b/devtools/maven/src/main/java/io/quarkus/maven/NativeImageMojo.java @@ -93,7 +93,11 @@ public class NativeImageMojo extends AbstractMojo { @Parameter(defaultValue = "false") private Boolean enableServer; - @Parameter(defaultValue = "false") + /** + * @deprecated JNI is always enabled starting from GraalVM 19.3.1. + */ + @Deprecated + @Parameter(defaultValue = "true") private Boolean enableJni; @Parameter(defaultValue = "false") @@ -369,8 +373,10 @@ public class NativeImageMojo extends AbstractMojo { if (enableIsolates != null) { configs.put("quarkus.native.enable-isolates", enableIsolates.toString()); } - if (enableJni != null) { - configs.put("quarkus.native.enable-jni", enableJni.toString()); + if (Boolean.FALSE.equals(enableJni)) { + getLog().warn("Your application is setting the deprecated 'enableJni' Maven option to false. Please" + + " consider removing this option as it is ignored (JNI is always enabled) and it will be removed" + + " in a future Quarkus version."); } if (enableServer != null) { 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 25505bd88..3e81c40e8 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/extensions/agroal/runtime/pom.xml b/extensions/agroal/runtime/pom.xml index 8ac3373d6..1f464a463 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-dynamodb/deployment/src/main/java/io/quarkus/dynamodb/deployment/DynamodbProcessor.java b/extensions/amazon-dynamodb/deployment/src/main/java/io/quarkus/dynamodb/deployment/DynamodbProcessor.java index a91c8481c..329ec196a 100644 --- a/extensions/amazon-dynamodb/deployment/src/main/java/io/quarkus/dynamodb/deployment/DynamodbProcessor.java +++ b/extensions/amazon-dynamodb/deployment/src/main/java/io/quarkus/dynamodb/deployment/DynamodbProcessor.java @@ -24,7 +24,6 @@ import io.quarkus.deployment.builditem.AdditionalApplicationArchiveMarkerBuildIt import io.quarkus.deployment.builditem.CombinedIndexBuildItem; import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.builditem.JniBuildItem; import io.quarkus.deployment.builditem.ShutdownContextBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; @@ -59,11 +58,6 @@ public class DynamodbProcessor { DynamodbBuildTimeConfig buildTimeConfig; - @BuildStep - JniBuildItem jni() { - return new JniBuildItem(); - } - @BuildStep AdditionalApplicationArchiveMarkerBuildItem marker() { return new AdditionalApplicationArchiveMarkerBuildItem(AWS_SDK_APPLICATION_ARCHIVE_MARKERS); diff --git a/extensions/amazon-lambda-http/deployment/pom.xml b/extensions/amazon-lambda-http/deployment/pom.xml index 511d6393b..94476ebeb 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 9dc609d58..6cc3acf55 100644 --- a/extensions/amazon-lambda-http/runtime/pom.xml +++ b/extensions/amazon-lambda-http/runtime/pom.xml @@ -33,7 +33,7 @@ aws-serverless-java-container-core - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/artemis-core/runtime/pom.xml b/extensions/artemis-core/runtime/pom.xml index 2ce771b64..c08161d8b 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 bf6846299..b80d6dc35 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 da4ad8431..353b363fd 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 2246644b6..aa917db6e 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 3f2696560..c12933c48 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-common/runtime/pom.xml b/extensions/elytron-security-common/runtime/pom.xml index dff337ab6..6337720a6 100644 --- a/extensions/elytron-security-common/runtime/pom.xml +++ b/extensions/elytron-security-common/runtime/pom.xml @@ -18,7 +18,7 @@ quarkus-core - 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 0cbc3141c..6017955d4 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/runtime/pom.xml b/extensions/elytron-security/runtime/pom.xml index c367ba5b0..6981d8f4c 100644 --- a/extensions/elytron-security/runtime/pom.xml +++ b/extensions/elytron-security/runtime/pom.xml @@ -27,7 +27,7 @@ quarkus-vertx-http - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/flyway/runtime/pom.xml b/extensions/flyway/runtime/pom.xml index 4ce1b1c88..651367e3d 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 a54d4fba3..50b104ff3 100644 --- a/extensions/hibernate-orm/runtime/pom.xml +++ b/extensions/hibernate-orm/runtime/pom.xml @@ -96,7 +96,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 56449247d..9118d971d 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 9334a7fec..01ff0c8d0 100644 --- a/extensions/hibernate-validator/runtime/pom.xml +++ b/extensions/hibernate-validator/runtime/pom.xml @@ -63,7 +63,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/infinispan-client/README.MD b/extensions/infinispan-client/README.MD index 819db641b..003bcee55 100644 --- a/extensions/infinispan-client/README.MD +++ b/extensions/infinispan-client/README.MD @@ -78,17 +78,12 @@ This is configured via hotrod-client.properties file located in META-INF. Everyt you have to add the certificate from the server to the configured truststore if it already trusted in the default java cacerts file. -#### Configure your project to allow security services (enable JNI optional) +#### Configure your project to allow security services You (currently) need to enable all security services in Substrate (https://github.com/oracle/graal/blob/master/substratevm/JCA-SECURITY-SERVICES.md). This can be done by adding `true` to the quarkus-maven-plugin configuration values. -You may have to also enable JNI, depending on the security provider by also adding `true` to the -same configuration values. If you have to enable JNI you will then also have to add the appropriate shared library to -be contained in a directory defined by `java.library.path`. In many times this shared library will be `sunec`, which -can be located at `/jre/lib//libsunec.so`. - ### Authentication DIGEST_MD5, PLAIN, EXTERNAL were all tested to work. diff --git a/extensions/infinispan-client/runtime/pom.xml b/extensions/infinispan-client/runtime/pom.xml index 0cc55e17b..231597bd6 100644 --- a/extensions/infinispan-client/runtime/pom.xml +++ b/extensions/infinispan-client/runtime/pom.xml @@ -93,7 +93,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 ea450674d..c923679a6 100644 --- a/extensions/infinispan-embedded/runtime/pom.xml +++ b/extensions/infinispan-embedded/runtime/pom.xml @@ -57,7 +57,7 @@ jakarta.transaction-api - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/jaeger/runtime/pom.xml b/extensions/jaeger/runtime/pom.xml index 552f9fc37..5925e55b7 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 91deaf67a..019fae2d7 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 bab7a00fb..29909c78e 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 ef7f58444..d15aeb177 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 9e37c3095..550d0382e 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 59239e66d..1bdebd9b6 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 6f01b9ed1..019f1e3be 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 30660ebf3..208186fd9 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/runtime/pom.xml b/extensions/jgit/runtime/pom.xml index 9ae1132e7..aa16e954a 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/jsch/runtime/pom.xml b/extensions/jsch/runtime/pom.xml index 2b6bf18b4..a25f26e47 100644 --- a/extensions/jsch/runtime/pom.xml +++ b/extensions/jsch/runtime/pom.xml @@ -16,7 +16,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java index a81334c90..2f0ed44ce 100644 --- a/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java +++ b/extensions/kafka-client/deployment/src/main/java/io/quarkus/kafka/client/deployment/KafkaProcessor.java @@ -36,7 +36,6 @@ import io.quarkus.deployment.Capabilities; import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.CombinedIndexBuildItem; -import io.quarkus.deployment.builditem.JniBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.kafka.client.serialization.JsonbDeserializer; import io.quarkus.kafka.client.serialization.JsonbSerializer; @@ -72,7 +71,7 @@ public class KafkaProcessor { @BuildStep public void build(CombinedIndexBuildItem indexBuildItem, BuildProducer reflectiveClass, - BuildProducer jni, Capabilities capabilities) { + Capabilities capabilities) { Set toRegister = new HashSet<>(); toRegister.addAll(indexBuildItem.getIndex() @@ -114,9 +113,6 @@ public class KafkaProcessor { reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, RangeAssignor.class.getName())); reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, RoundRobinAssignor.class.getName())); reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, StickyAssignor.class.getName())); - - // enable JNI - jni.produce(new JniBuildItem()); } @BuildStep diff --git a/extensions/kafka-client/runtime/pom.xml b/extensions/kafka-client/runtime/pom.xml index 382b3ecc0..ed5db7fab 100644 --- a/extensions/kafka-client/runtime/pom.xml +++ b/extensions/kafka-client/runtime/pom.xml @@ -40,7 +40,7 @@ - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/kafka-streams/deployment/src/main/java/io/quarkus/kafka/streams/deployment/KafkaStreamsProcessor.java b/extensions/kafka-streams/deployment/src/main/java/io/quarkus/kafka/streams/deployment/KafkaStreamsProcessor.java index 6a7c2f204..00a6ae10f 100644 --- a/extensions/kafka-streams/deployment/src/main/java/io/quarkus/kafka/streams/deployment/KafkaStreamsProcessor.java +++ b/extensions/kafka-streams/deployment/src/main/java/io/quarkus/kafka/streams/deployment/KafkaStreamsProcessor.java @@ -22,7 +22,6 @@ import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.builditem.JniBuildItem; import io.quarkus.deployment.builditem.LaunchModeBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; @@ -44,7 +43,6 @@ class KafkaStreamsProcessor { BuildProducer reflectiveClasses, BuildProducer reinitialized, BuildProducer nativeLibs, - BuildProducer jni, LaunchModeBuildItem launchMode, NativeConfig config) throws IOException { @@ -53,7 +51,6 @@ class KafkaStreamsProcessor { registerClassesThatAreLoadedThroughReflection(reflectiveClasses, launchMode); addSupportForRocksDbLib(nativeLibs, config); enableLoadOfNativeLibs(reinitialized); - enableJniForNativeBuild(jni); } private void registerClassesThatAreLoadedThroughReflection(BuildProducer reflectiveClasses, @@ -123,10 +120,6 @@ class KafkaStreamsProcessor { reinitialized.produce(new RuntimeReinitializedClassBuildItem("org.rocksdb.RocksDB")); } - private void enableJniForNativeBuild(BuildProducer jni) { - jni.produce(new JniBuildItem()); - } - private void registerClassName(BuildProducer reflectiveClasses, String defaultKeySerdeClass) { reflectiveClasses.produce(new ReflectiveClassBuildItem(true, false, false, defaultKeySerdeClass)); } diff --git a/extensions/kafka-streams/runtime/pom.xml b/extensions/kafka-streams/runtime/pom.xml index 2be409ef1..04836450a 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/kubernetes-client/runtime/pom.xml b/extensions/kubernetes-client/runtime/pom.xml index 11cce61c0..d4a40d007 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/logging-gelf/deployment/src/main/java/io/quarkus/logging/gelf/deployment/GelfLogHandlerProcessor.java b/extensions/logging-gelf/deployment/src/main/java/io/quarkus/logging/gelf/deployment/GelfLogHandlerProcessor.java index bca87866b..7b3aae12f 100644 --- a/extensions/logging-gelf/deployment/src/main/java/io/quarkus/logging/gelf/deployment/GelfLogHandlerProcessor.java +++ b/extensions/logging-gelf/deployment/src/main/java/io/quarkus/logging/gelf/deployment/GelfLogHandlerProcessor.java @@ -4,7 +4,6 @@ import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.builditem.JniBuildItem; import io.quarkus.deployment.builditem.LogHandlerBuildItem; import io.quarkus.deployment.builditem.SystemPropertyBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; @@ -18,11 +17,6 @@ class GelfLogHandlerProcessor { return new FeatureBuildItem(FeatureBuildItem.LOGGING_GELF); } - @BuildStep - JniBuildItem enableJni() { - return new JniBuildItem(); - } - @BuildStep @Record(ExecutionTime.RUNTIME_INIT) LogHandlerBuildItem build(GelfLogHandlerRecorder recorder, GelfConfig config) { diff --git a/extensions/logging-gelf/runtime/pom.xml b/extensions/logging-gelf/runtime/pom.xml index 0e3be8d0b..c275db7c0 100644 --- a/extensions/logging-gelf/runtime/pom.xml +++ b/extensions/logging-gelf/runtime/pom.xml @@ -20,7 +20,7 @@ logstash-gelf - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/mongodb-client/runtime/pom.xml b/extensions/mongodb-client/runtime/pom.xml index 5324fc3b2..8012cc744 100644 --- a/extensions/mongodb-client/runtime/pom.xml +++ b/extensions/mongodb-client/runtime/pom.xml @@ -45,7 +45,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 72d1fee5c..cd1ebc634 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/narayana-stm/runtime/pom.xml b/extensions/narayana-stm/runtime/pom.xml index 86d982540..dfb3dfb03 100644 --- a/extensions/narayana-stm/runtime/pom.xml +++ b/extensions/narayana-stm/runtime/pom.xml @@ -23,7 +23,7 @@ quarkus-core - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/neo4j/runtime/pom.xml b/extensions/neo4j/runtime/pom.xml index 7f824f086..579406480 100644 --- a/extensions/neo4j/runtime/pom.xml +++ b/extensions/neo4j/runtime/pom.xml @@ -27,7 +27,7 @@ true - com.oracle.substratevm + org.graalvm.nativeimage svm diff --git a/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java b/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java index 0e9bdc8bb..facc0bc5c 100644 --- a/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java +++ b/extensions/netty/deployment/src/main/java/io/quarkus/netty/deployment/NettyProcessor.java @@ -17,7 +17,6 @@ import io.quarkus.deployment.annotations.BuildProducer; import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; -import io.quarkus.deployment.builditem.JniBuildItem; import io.quarkus.deployment.builditem.SystemPropertyBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageConfigBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem; @@ -54,8 +53,7 @@ class NettyProcessor { } @BuildStep - NativeImageConfigBuildItem build(BuildProducer jni) { - boolean enableJni = false; + NativeImageConfigBuildItem build() { reflectiveClass.produce(new ReflectiveClassBuildItem(false, false, "io.netty.channel.socket.nio.NioSocketChannel")); reflectiveClass @@ -97,7 +95,6 @@ class NettyProcessor { try { Class.forName("io.netty.channel.unix.UnixChannel"); - enableJni = true; builder.addRuntimeInitializedClass("io.netty.channel.unix.Errors") .addRuntimeInitializedClass("io.netty.channel.unix.FileDescriptor") .addRuntimeInitializedClass("io.netty.channel.unix.IovArray") @@ -109,7 +106,6 @@ class NettyProcessor { try { Class.forName("io.netty.channel.epoll.EpollMode"); - enableJni = true; builder.addRuntimeInitializedClass("io.netty.channel.epoll.Epoll") .addRuntimeInitializedClass("io.netty.channel.epoll.EpollEventArray") .addRuntimeInitializedClass("io.netty.channel.epoll.EpollEventLoop") @@ -121,7 +117,6 @@ class NettyProcessor { try { Class.forName("io.netty.channel.kqueue.AcceptFilter"); - enableJni = true; builder.addRuntimeInitializedClass("io.netty.channel.kqueue.KQueue") .addRuntimeInitializedClass("io.netty.channel.kqueue.KQueueEventArray") .addRuntimeInitializedClass("io.netty.channel.kqueue.KQueueEventLoop") @@ -131,10 +126,6 @@ class NettyProcessor { log.debug("Not registering Netty native kqueue classes as they were not found"); } - if (enableJni) { - jni.produce(new JniBuildItem()); - } - return builder //TODO: make configurable .build(); } diff --git a/extensions/netty/runtime/pom.xml b/extensions/netty/runtime/pom.xml index e84ebb005..034b97477 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 ae6593109..b558869c1 100644 --- a/extensions/quartz/runtime/pom.xml +++ b/extensions/quartz/runtime/pom.xml @@ -24,7 +24,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 e7cd65dde..2686ff5db 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 7f04f1644..fc9ea9c29 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 4b6947b17..a67895d59 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 0c1f1e66a..ccb5aa835 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 40136711a..2b2a2dee4 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 c96bd88af..4927005c5 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 8cb780fae..49c5035b3 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 3b4b099c8..e3b9f8f82 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 5ce1596f5..6ff889787 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 4144091a7..2499bff2d 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 fc6ca58cc..f47ec2dc9 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/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java b/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java index 154f4288f..dd885d7dd 100644 --- a/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java +++ b/extensions/tika/deployment/src/main/java/io/quarkus/tika/deployment/TikaProcessor.java @@ -25,7 +25,6 @@ import io.quarkus.deployment.annotations.ExecutionTime; import io.quarkus.deployment.annotations.Record; import io.quarkus.deployment.builditem.CapabilityBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; -import io.quarkus.deployment.builditem.JniBuildItem; import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem; @@ -79,11 +78,6 @@ public class TikaProcessor { return new FeatureBuildItem(FeatureBuildItem.TIKA); } - @BuildStep - void setupJni(BuildProducer jniProducer) { - jniProducer.produce(new JniBuildItem()); - } - @BuildStep public void registerRuntimeInitializedClasses(BuildProducer resource) { //org.apache.tika.parser.pdf.PDFParser (https://issues.apache.org/jira/browse/PDFBOX-4548) diff --git a/extensions/undertow-websockets/runtime/pom.xml b/extensions/undertow-websockets/runtime/pom.xml index 769049876..42c4e4ce3 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 49896eef4..db8d57c86 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 ceaf0211e..ea903f40e 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 b86c2cb88..0b7164bb5 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 3bc814a13..2a4e80fe4 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 9a08589d6..c864171a4 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 9282acbe2..6ff448134 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 7b8a78e0a..62026c71f 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 e5afb1450..43ba95c78 100644 --- a/integration-tests/flyway/pom.xml +++ b/integration-tests/flyway/pom.xml @@ -120,7 +120,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 572f19c9d..59a7b99a4 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 c607395b7..bf3e55f93 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 f5a4ef24c..5b6678661 100644 --- a/integration-tests/hibernate-validator/pom.xml +++ b/integration-tests/hibernate-validator/pom.xml @@ -125,7 +125,6 @@ false false ${graalvmHome} - false diff --git a/integration-tests/infinispan-cache-jpa/pom.xml b/integration-tests/infinispan-cache-jpa/pom.xml index 1b4cd3ab0..f6098d8fb 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 bfdec55fc..062440a70 100644 --- a/integration-tests/infinispan-embedded/pom.xml +++ b/integration-tests/infinispan-embedded/pom.xml @@ -144,7 +144,6 @@ -H:ResourceConfigurationFiles=resources-config.json ${graalvmHome} - true diff --git a/integration-tests/jpa-derby/pom.xml b/integration-tests/jpa-derby/pom.xml index 10f426d01..08776dd2d 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 23eaf40c1..df11bc035 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 9396154f0..3e79aeb8d 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 0172829c4..869f26622 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 6a3bc77cd..a1c69bdcb 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 f9a9a9ab2..5ce6c7a13 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 daaaacf86..3e40b635a 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/jsch/src/test/java/io/quarkus/it/jsch/JSchTest.java b/integration-tests/jsch/src/test/java/io/quarkus/it/jsch/JSchTest.java index 2d54975af..f6cc8e243 100644 --- a/integration-tests/jsch/src/test/java/io/quarkus/it/jsch/JSchTest.java +++ b/integration-tests/jsch/src/test/java/io/quarkus/it/jsch/JSchTest.java @@ -17,7 +17,6 @@ import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import io.quarkus.test.junit.DisabledOnNativeImage; import io.quarkus.test.junit.QuarkusTest; @QuarkusTest @@ -38,7 +37,6 @@ public class JSchTest { } @Test - @DisabledOnNativeImage("This test fails with GraalVM 19.2.1 but is successful with GraalVM 19.3.1") void shouldConnect() { given().queryParam("host", sshd.getHost()) .queryParam("port", sshd.getPort()) diff --git a/integration-tests/logging-gelf/pom.xml b/integration-tests/logging-gelf/pom.xml index c6dcaa9b3..6237acc5f 100644 --- a/integration-tests/logging-gelf/pom.xml +++ b/integration-tests/logging-gelf/pom.xml @@ -131,7 +131,6 @@ false false ${graalvmHome} - true true 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 1ccd2892c..e5fb5b277 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/vault-app/pom.xml b/integration-tests/vault-app/pom.xml index 82630cec2..70462be04 100644 --- a/integration-tests/vault-app/pom.xml +++ b/integration-tests/vault-app/pom.xml @@ -171,7 +171,6 @@ false false ${graalvmHome} - false diff --git a/integration-tests/vertx-graphql/pom.xml b/integration-tests/vertx-graphql/pom.xml index 3ed19f8eb..2c543f814 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 eef1a2e2f..151c17b42 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