From 41aeb6158e47a10ed4ae69dba8f0b0eddc934e2c Mon Sep 17 00:00:00 2001 From: Gwenneg Lepage Date: Thu, 9 Jan 2020 23:19:41 +0100 Subject: [PATCH 1/5] Support both GraalVM 19.2.1 and 19.3.0.2 --- .../quarkus/deployment/pkg/NativeConfig.java | 2 +- .../pkg/steps/NativeImageBuildStep.java | 6 +- .../steps/NativeImageAutoFeatureStep.java | 73 ++++++++++++++++--- 3 files changed, 65 insertions(+), 16 deletions(-) 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 3858195aa5b71..f1aa185da8574 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 @@ -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.3.0.2-java8") + @ConfigItem(defaultValue = "quay.io/quarkus/ubi-quarkus-native-image:19.2.1") 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 8777a8ff9a319..74b1a1c90edc6 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 @@ -322,12 +322,12 @@ public NativeImageBuildItem build(NativeConfig nativeConfig, NativeImageSourceJa 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."); + final List obsoleteGraalVmVersions = Arrays.asList("1.0.0", "19.0.", "19.1.", "19.2.0"); final boolean vmVersionIsObsolete = version.contains(" 19.3.0 ") || obsoleteGraalVmVersions.stream().anyMatch(v -> version.contains(" " + v)); if (vmVersionIsObsolete) { - throw new IllegalStateException( - "Out of date build of GraalVM detected: " + version + ". Please upgrade to GraalVM 19.3.0.2"); + throw new IllegalStateException("Unsupported version of GraalVM detected: " + version + + ". Quarkus currently offers a stable support of GraalVM 19.2.1 and an experimental support of GraalVM 19.3.0.2"); } } 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 776aeb77a2860..7e35e42c4a7ff 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 @@ -66,6 +66,7 @@ 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"; + static final String LOCALIZATION_SUPPORT = "com.oracle.svm.core.jdk.LocalizationSupport"; @BuildStep List registerPackageResources( @@ -205,26 +206,74 @@ public void write(String s, byte[] bytes) { } if (!resourceBundles.isEmpty()) { - ResultHandle locClass = overallCatch.loadClass(LOCALIZATION_FEATURE); - - ResultHandle params = overallCatch.marshalAsArray(Class.class, overallCatch.loadClass(String.class)); - ResultHandle registerMethod = overallCatch.invokeVirtualMethod( - ofMethod(Class.class, "getDeclaredMethod", Method.class, String.class, Class[].class), locClass, - overallCatch.load("addBundleToCache"), params); - overallCatch.invokeVirtualMethod(ofMethod(AccessibleObject.class, "setAccessible", void.class, boolean.class), - registerMethod, overallCatch.load(true)); + /* + * Start of a quick and dirty fix to support both GraalVM 19.2.1 and 19.3.0.2 at the same time. + * This is only a first version that will be improved if the double GraalVM support works. + */ + + // This try block should be removed with the fix. + TryBlock tempTryBlock = overallCatch.tryBlock(); + + /* + * Start of GraalVM 19.3.0.2 compatibility code. + */ + ResultHandle locFeatureClass = tempTryBlock.loadClass(LOCALIZATION_FEATURE); + + ResultHandle locFeatureParams = tempTryBlock.marshalAsArray(Class.class, tempTryBlock.loadClass(String.class)); + ResultHandle locFeatureRegisterMethod = tempTryBlock.invokeVirtualMethod( + ofMethod(Class.class, "getDeclaredMethod", Method.class, String.class, Class[].class), locFeatureClass, + tempTryBlock.load("addBundleToCache"), locFeatureParams); + tempTryBlock.invokeVirtualMethod(ofMethod(AccessibleObject.class, "setAccessible", void.class, boolean.class), + locFeatureRegisterMethod, tempTryBlock.load(true)); + + ResultHandle locFeature = tempTryBlock.invokeStaticMethod( + IMAGE_SINGLETONS_LOOKUP, + locFeatureClass); + for (NativeImageResourceBundleBuildItem i : resourceBundles) { + TryBlock et = tempTryBlock.tryBlock(); - ResultHandle locSupport = overallCatch.invokeStaticMethod( + et.invokeVirtualMethod(ofMethod(Method.class, "invoke", Object.class, Object.class, Object[].class), + locFeatureRegisterMethod, locFeature, et.marshalAsArray(Object.class, et.load(i.getBundleName()))); + CatchBlockCreator c = et.addCatch(Throwable.class); + //c.invokeVirtualMethod(ofMethod(Throwable.class, "printStackTrace", void.class), c.getCaughtException()); + } + /* + * End of GraalVM 19.3.0.2 compatibility code. + */ + + // This catch block should be removed with the fix. + CatchBlockCreator tempCatchBlock = tempTryBlock.addCatch(Throwable.class); + + /* + * Start of GraalVM 19.2.1 compatibility code. + */ + ResultHandle locSupportClass = tempCatchBlock.loadClass(LOCALIZATION_SUPPORT); + + ResultHandle locSupportParams = tempCatchBlock.marshalAsArray(Class.class, tempCatchBlock.loadClass(String.class)); + ResultHandle locSupportRegisterMethod = tempCatchBlock.invokeVirtualMethod( + ofMethod(Class.class, "getDeclaredMethod", Method.class, String.class, Class[].class), locSupportClass, + tempCatchBlock.load("addBundleToCache"), locSupportParams); + tempCatchBlock.invokeVirtualMethod(ofMethod(AccessibleObject.class, "setAccessible", void.class, boolean.class), + locSupportRegisterMethod, tempCatchBlock.load(true)); + + ResultHandle locSupport = tempCatchBlock.invokeStaticMethod( IMAGE_SINGLETONS_LOOKUP, - locClass); + locSupportClass); for (NativeImageResourceBundleBuildItem i : resourceBundles) { - TryBlock et = overallCatch.tryBlock(); + TryBlock et = tempCatchBlock.tryBlock(); et.invokeVirtualMethod(ofMethod(Method.class, "invoke", Object.class, Object.class, Object[].class), - registerMethod, locSupport, et.marshalAsArray(Object.class, et.load(i.getBundleName()))); + locSupportRegisterMethod, locSupport, et.marshalAsArray(Object.class, et.load(i.getBundleName()))); CatchBlockCreator c = et.addCatch(Throwable.class); //c.invokeVirtualMethod(ofMethod(Throwable.class, "printStackTrace", void.class), c.getCaughtException()); } + /* + * End of GraalVM 19.2.1 compatibility code. + */ + + /* + * End of the quick and dirty fix. + */ } int count = 0; From 9b8585a7ad4e25c6db81b0aae357a73bd9fa5d99 Mon Sep 17 00:00:00 2001 From: Gwenneg Lepage Date: Fri, 10 Jan 2020 20:30:25 +0100 Subject: [PATCH 2/5] Use 19.2.1 SDK instead of 19.3.0.2 SDK --- bom/runtime/pom.xml | 6 +++--- build-parent/pom.xml | 2 +- core/runtime/pom.xml | 2 +- core/test-extension/runtime/pom.xml | 2 +- extensions/agroal/runtime/pom.xml | 2 +- extensions/amazon-lambda-http/deployment/pom.xml | 2 +- extensions/amazon-lambda-http/runtime/pom.xml | 2 +- extensions/artemis-core/runtime/pom.xml | 2 +- extensions/azure-functions-http/deployment/pom.xml | 2 +- extensions/azure-functions-http/runtime/pom.xml | 2 +- extensions/caffeine/runtime/pom.xml | 2 +- extensions/elasticsearch-rest-client/runtime/pom.xml | 2 +- extensions/elytron-security-common/runtime/pom.xml | 2 +- extensions/elytron-security-properties-file/runtime/pom.xml | 2 +- extensions/elytron-security/runtime/pom.xml | 2 +- extensions/flyway/runtime/pom.xml | 2 +- extensions/hibernate-orm/runtime/pom.xml | 2 +- extensions/hibernate-search-elasticsearch/runtime/pom.xml | 2 +- extensions/hibernate-validator/runtime/pom.xml | 2 +- extensions/infinispan-client/runtime/pom.xml | 2 +- extensions/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 +- extensions/jdbc/jdbc-postgresql/runtime/pom.xml | 2 +- extensions/jgit/runtime/pom.xml | 2 +- extensions/jsch/runtime/pom.xml | 2 +- extensions/kafka-client/runtime/pom.xml | 2 +- extensions/kafka-streams/runtime/pom.xml | 2 +- extensions/kubernetes-client/runtime/pom.xml | 2 +- extensions/logging-gelf/runtime/pom.xml | 2 +- extensions/mongodb-client/runtime/pom.xml | 2 +- extensions/narayana-jta/runtime/pom.xml | 2 +- extensions/neo4j/runtime/pom.xml | 2 +- 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 +- extensions/smallrye-fault-tolerance/deployment/pom.xml | 2 +- extensions/smallrye-fault-tolerance/runtime/pom.xml | 2 +- extensions/smallrye-opentracing/runtime/pom.xml | 2 +- extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml | 2 +- .../smallrye-reactive-messaging-kafka/runtime/pom.xml | 2 +- extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml | 2 +- extensions/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 +- 55 files changed, 57 insertions(+), 57 deletions(-) diff --git a/bom/runtime/pom.xml b/bom/runtime/pom.xml index 717db3e168948..1eeb2b691873b 100644 --- a/bom/runtime/pom.xml +++ b/bom/runtime/pom.xml @@ -74,7 +74,7 @@ 3.5.2 1.7.1 - 19.3.0.2 + 19.2.1 1.0.0.Final 2.10.2 1.0.0.Final @@ -831,7 +831,7 @@ ${jboss-logmanager.version} - org.graalvm.nativeimage + com.oracle.substratevm svm @@ -1643,7 +1643,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm ${graal-sdk.version} provided diff --git a/build-parent/pom.xml b/build-parent/pom.xml index 6b5cb1136494b..565c5bfb14b5b 100644 --- a/build-parent/pom.xml +++ b/build-parent/pom.xml @@ -32,7 +32,7 @@ - 19.3.0.2 + 19.2.1 4.1.1 0.0.9 3.8.4 diff --git a/core/runtime/pom.xml b/core/runtime/pom.xml index d749efc30781d..8337866bb83ff 100644 --- a/core/runtime/pom.xml +++ b/core/runtime/pom.xml @@ -70,7 +70,7 @@ graal-sdk - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/core/test-extension/runtime/pom.xml b/core/test-extension/runtime/pom.xml index 195aa6ed065e5..208261cf59b6e 100644 --- a/core/test-extension/runtime/pom.xml +++ b/core/test-extension/runtime/pom.xml @@ -31,7 +31,7 @@ quarkus-arc - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/agroal/runtime/pom.xml b/extensions/agroal/runtime/pom.xml index 4c191c9b6a3ea..3600282874ecd 100644 --- a/extensions/agroal/runtime/pom.xml +++ b/extensions/agroal/runtime/pom.xml @@ -27,7 +27,7 @@ quarkus-narayana-jta - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/amazon-lambda-http/deployment/pom.xml b/extensions/amazon-lambda-http/deployment/pom.xml index 94476ebeb81b6..511d6393b3c67 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/amazon-lambda-http/runtime/pom.xml b/extensions/amazon-lambda-http/runtime/pom.xml index 6cc3acf55e907..9dc609d58a669 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/artemis-core/runtime/pom.xml b/extensions/artemis-core/runtime/pom.xml index c08161d8bcaa6..2ce771b64827b 100644 --- a/extensions/artemis-core/runtime/pom.xml +++ b/extensions/artemis-core/runtime/pom.xml @@ -65,7 +65,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/azure-functions-http/deployment/pom.xml b/extensions/azure-functions-http/deployment/pom.xml index b80d6dc35f14c..bf6846299c1ce 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/azure-functions-http/runtime/pom.xml b/extensions/azure-functions-http/runtime/pom.xml index 353b363fdeae2..da4ad843166eb 100644 --- a/extensions/azure-functions-http/runtime/pom.xml +++ b/extensions/azure-functions-http/runtime/pom.xml @@ -24,7 +24,7 @@ quarkus-core - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/caffeine/runtime/pom.xml b/extensions/caffeine/runtime/pom.xml index aa917db6e66a0..2246644b68522 100644 --- a/extensions/caffeine/runtime/pom.xml +++ b/extensions/caffeine/runtime/pom.xml @@ -18,7 +18,7 @@ caffeine - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/elasticsearch-rest-client/runtime/pom.xml b/extensions/elasticsearch-rest-client/runtime/pom.xml index c12933c484ba6..3f269656070bf 100644 --- a/extensions/elasticsearch-rest-client/runtime/pom.xml +++ b/extensions/elasticsearch-rest-client/runtime/pom.xml @@ -43,7 +43,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/elytron-security-common/runtime/pom.xml b/extensions/elytron-security-common/runtime/pom.xml index 6337720a62ac9..dff337ab6810f 100644 --- a/extensions/elytron-security-common/runtime/pom.xml +++ b/extensions/elytron-security-common/runtime/pom.xml @@ -18,7 +18,7 @@ quarkus-core - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/elytron-security-properties-file/runtime/pom.xml b/extensions/elytron-security-properties-file/runtime/pom.xml index 6017955d47d95..0cbc3141c4543 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/elytron-security/runtime/pom.xml b/extensions/elytron-security/runtime/pom.xml index 82908be7f47d0..f52ae5e738f24 100644 --- a/extensions/elytron-security/runtime/pom.xml +++ b/extensions/elytron-security/runtime/pom.xml @@ -27,7 +27,7 @@ quarkus-vertx-http - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/flyway/runtime/pom.xml b/extensions/flyway/runtime/pom.xml index 651367e3da86a..4ce1b1c881d6d 100644 --- a/extensions/flyway/runtime/pom.xml +++ b/extensions/flyway/runtime/pom.xml @@ -30,7 +30,7 @@ quarkus-narayana-jta - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/hibernate-orm/runtime/pom.xml b/extensions/hibernate-orm/runtime/pom.xml index 3719a1bc5425e..2b704d7ba25ec 100644 --- a/extensions/hibernate-orm/runtime/pom.xml +++ b/extensions/hibernate-orm/runtime/pom.xml @@ -91,7 +91,7 @@ jakarta.transaction-api - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/hibernate-search-elasticsearch/runtime/pom.xml b/extensions/hibernate-search-elasticsearch/runtime/pom.xml index 9118d971db2d7..56449247de528 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/hibernate-validator/runtime/pom.xml b/extensions/hibernate-validator/runtime/pom.xml index d19c75c3ef356..7183ba22ea317 100644 --- a/extensions/hibernate-validator/runtime/pom.xml +++ b/extensions/hibernate-validator/runtime/pom.xml @@ -58,7 +58,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/infinispan-client/runtime/pom.xml b/extensions/infinispan-client/runtime/pom.xml index 231597bd62bb7..0cc55e17b2603 100644 --- a/extensions/infinispan-client/runtime/pom.xml +++ b/extensions/infinispan-client/runtime/pom.xml @@ -93,7 +93,7 @@ protostream-processor - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/infinispan-embedded/runtime/pom.xml b/extensions/infinispan-embedded/runtime/pom.xml index c923679a6f8fc..ea450674da85d 100644 --- a/extensions/infinispan-embedded/runtime/pom.xml +++ b/extensions/infinispan-embedded/runtime/pom.xml @@ -57,7 +57,7 @@ jakarta.transaction-api - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jaeger/runtime/pom.xml b/extensions/jaeger/runtime/pom.xml index 5925e55b73e00..552f9fc3751f7 100644 --- a/extensions/jaeger/runtime/pom.xml +++ b/extensions/jaeger/runtime/pom.xml @@ -27,7 +27,7 @@ jaeger-thrift - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jaxb/runtime/pom.xml b/extensions/jaxb/runtime/pom.xml index 7e4aa5bab9d3e..3d91533a1042d 100644 --- a/extensions/jaxb/runtime/pom.xml +++ b/extensions/jaxb/runtime/pom.xml @@ -15,7 +15,7 @@ XML serialization support - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jdbc/jdbc-derby/runtime/pom.xml b/extensions/jdbc/jdbc-derby/runtime/pom.xml index 29909c78e29f6..bab7a00fb7012 100644 --- a/extensions/jdbc/jdbc-derby/runtime/pom.xml +++ b/extensions/jdbc/jdbc-derby/runtime/pom.xml @@ -22,7 +22,7 @@ derbyclient - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jdbc/jdbc-h2/runtime/pom.xml b/extensions/jdbc/jdbc-h2/runtime/pom.xml index d15aeb177e264..ef7f584445901 100644 --- a/extensions/jdbc/jdbc-h2/runtime/pom.xml +++ b/extensions/jdbc/jdbc-h2/runtime/pom.xml @@ -28,7 +28,7 @@ --> - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jdbc/jdbc-mariadb/runtime/pom.xml b/extensions/jdbc/jdbc-mariadb/runtime/pom.xml index 550d0382e5d55..9e37c30953be4 100644 --- a/extensions/jdbc/jdbc-mariadb/runtime/pom.xml +++ b/extensions/jdbc/jdbc-mariadb/runtime/pom.xml @@ -18,7 +18,7 @@ mariadb-java-client - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jdbc/jdbc-mssql/runtime/pom.xml b/extensions/jdbc/jdbc-mssql/runtime/pom.xml index 1bdebd9b64dea..59239e66d20ba 100644 --- a/extensions/jdbc/jdbc-mssql/runtime/pom.xml +++ b/extensions/jdbc/jdbc-mssql/runtime/pom.xml @@ -66,7 +66,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jdbc/jdbc-mysql/runtime/pom.xml b/extensions/jdbc/jdbc-mysql/runtime/pom.xml index 019f1e3be1161..6f01b9ed12158 100644 --- a/extensions/jdbc/jdbc-mysql/runtime/pom.xml +++ b/extensions/jdbc/jdbc-mysql/runtime/pom.xml @@ -22,7 +22,7 @@ mysql-connector-java - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jdbc/jdbc-postgresql/runtime/pom.xml b/extensions/jdbc/jdbc-postgresql/runtime/pom.xml index 208186fd9646b..30660ebf35a2a 100644 --- a/extensions/jdbc/jdbc-postgresql/runtime/pom.xml +++ b/extensions/jdbc/jdbc-postgresql/runtime/pom.xml @@ -18,7 +18,7 @@ postgresql - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jgit/runtime/pom.xml b/extensions/jgit/runtime/pom.xml index aa16e954a1d42..9ae1132e76bc6 100644 --- a/extensions/jgit/runtime/pom.xml +++ b/extensions/jgit/runtime/pom.xml @@ -15,7 +15,7 @@ Access your Git repositories - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/jsch/runtime/pom.xml b/extensions/jsch/runtime/pom.xml index a25f26e47fe8c..2b6bf18b4ed13 100644 --- a/extensions/jsch/runtime/pom.xml +++ b/extensions/jsch/runtime/pom.xml @@ -16,7 +16,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/kafka-client/runtime/pom.xml b/extensions/kafka-client/runtime/pom.xml index ed5db7fabd3df..382b3ecc0dbd8 100644 --- a/extensions/kafka-client/runtime/pom.xml +++ b/extensions/kafka-client/runtime/pom.xml @@ -40,7 +40,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/kafka-streams/runtime/pom.xml b/extensions/kafka-streams/runtime/pom.xml index 04836450a7c8d..2be409ef18ac1 100644 --- a/extensions/kafka-streams/runtime/pom.xml +++ b/extensions/kafka-streams/runtime/pom.xml @@ -31,7 +31,7 @@ kafka-streams - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/kubernetes-client/runtime/pom.xml b/extensions/kubernetes-client/runtime/pom.xml index 9a352b5b456f6..1d175d63e4d33 100644 --- a/extensions/kubernetes-client/runtime/pom.xml +++ b/extensions/kubernetes-client/runtime/pom.xml @@ -23,7 +23,7 @@ quarkus-jackson - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/logging-gelf/runtime/pom.xml b/extensions/logging-gelf/runtime/pom.xml index c275db7c06231..0e3be8d0bdae6 100644 --- a/extensions/logging-gelf/runtime/pom.xml +++ b/extensions/logging-gelf/runtime/pom.xml @@ -20,7 +20,7 @@ logstash-gelf - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/mongodb-client/runtime/pom.xml b/extensions/mongodb-client/runtime/pom.xml index 8012cc7446360..5324fc3b2013d 100644 --- a/extensions/mongodb-client/runtime/pom.xml +++ b/extensions/mongodb-client/runtime/pom.xml @@ -45,7 +45,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/narayana-jta/runtime/pom.xml b/extensions/narayana-jta/runtime/pom.xml index 78b06a9212007..cfe45f6a03c73 100644 --- a/extensions/narayana-jta/runtime/pom.xml +++ b/extensions/narayana-jta/runtime/pom.xml @@ -45,7 +45,7 @@ smallrye-reactive-converter-api - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/neo4j/runtime/pom.xml b/extensions/neo4j/runtime/pom.xml index 579406480e685..7f824f086e30f 100644 --- a/extensions/neo4j/runtime/pom.xml +++ b/extensions/neo4j/runtime/pom.xml @@ -27,7 +27,7 @@ true - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/netty/runtime/pom.xml b/extensions/netty/runtime/pom.xml index 034b97477a8bc..e84ebb0050580 100644 --- a/extensions/netty/runtime/pom.xml +++ b/extensions/netty/runtime/pom.xml @@ -36,7 +36,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/quartz/runtime/pom.xml b/extensions/quartz/runtime/pom.xml index b558869c18f4c..ae65931098b48 100644 --- a/extensions/quartz/runtime/pom.xml +++ b/extensions/quartz/runtime/pom.xml @@ -24,7 +24,7 @@ quarkus-scheduler - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/rest-client/runtime/pom.xml b/extensions/rest-client/runtime/pom.xml index 2686ff5db481f..e7cd65dde329e 100644 --- a/extensions/rest-client/runtime/pom.xml +++ b/extensions/rest-client/runtime/pom.xml @@ -58,7 +58,7 @@ commons-logging-jboss-logging - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/resteasy-common/deployment/pom.xml b/extensions/resteasy-common/deployment/pom.xml index fc9ea9c2961eb..7f04f1644cfac 100644 --- a/extensions/resteasy-common/deployment/pom.xml +++ b/extensions/resteasy-common/deployment/pom.xml @@ -31,7 +31,7 @@ quarkus-arc-deployment - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/resteasy-common/runtime/pom.xml b/extensions/resteasy-common/runtime/pom.xml index 6d553d8f62029..12fdcd0bda0ce 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/resteasy/deployment/pom.xml b/extensions/resteasy/deployment/pom.xml index ccb5aa8354c4f..0c1f1e66a00da 100644 --- a/extensions/resteasy/deployment/pom.xml +++ b/extensions/resteasy/deployment/pom.xml @@ -39,7 +39,7 @@ quarkus-security-spi - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/security/runtime/pom.xml b/extensions/security/runtime/pom.xml index 2b2a2dee44ce1..40136711a0b3e 100644 --- a/extensions/security/runtime/pom.xml +++ b/extensions/security/runtime/pom.xml @@ -23,7 +23,7 @@ jakarta.interceptor-api - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/smallrye-fault-tolerance/deployment/pom.xml b/extensions/smallrye-fault-tolerance/deployment/pom.xml index 4927005c5d9f6..c96bd88afac5c 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/smallrye-fault-tolerance/runtime/pom.xml b/extensions/smallrye-fault-tolerance/runtime/pom.xml index 53da9a7c4edd1..8284aa06e61a6 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 - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/smallrye-opentracing/runtime/pom.xml b/extensions/smallrye-opentracing/runtime/pom.xml index e3b9f8f823e94..3b4b099c8491b 100644 --- a/extensions/smallrye-opentracing/runtime/pom.xml +++ b/extensions/smallrye-opentracing/runtime/pom.xml @@ -57,7 +57,7 @@ jakarta.servlet-api - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml b/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml index 6ff8897875253..5ce1596f590f0 100644 --- a/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-amqp/runtime/pom.xml @@ -54,7 +54,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml index 2499bff2d963f..4144091a790e7 100644 --- a/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-kafka/runtime/pom.xml @@ -66,7 +66,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml b/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml index f47ec2dc9b344..fc6ca58cc3dc4 100644 --- a/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml +++ b/extensions/smallrye-reactive-messaging-mqtt/runtime/pom.xml @@ -50,7 +50,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/undertow-websockets/runtime/pom.xml b/extensions/undertow-websockets/runtime/pom.xml index 67e66d5deb9e6..e4e727a4a4330 100644 --- a/extensions/undertow-websockets/runtime/pom.xml +++ b/extensions/undertow-websockets/runtime/pom.xml @@ -16,7 +16,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/undertow/runtime/pom.xml b/extensions/undertow/runtime/pom.xml index b4bf23076f96b..6465349bedb6c 100644 --- a/extensions/undertow/runtime/pom.xml +++ b/extensions/undertow/runtime/pom.xml @@ -37,7 +37,7 @@ jakarta.enterprise.cdi-api - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/vertx-core/runtime/pom.xml b/extensions/vertx-core/runtime/pom.xml index ea903f40e0974..ceaf0211ebc63 100644 --- a/extensions/vertx-core/runtime/pom.xml +++ b/extensions/vertx-core/runtime/pom.xml @@ -42,7 +42,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm diff --git a/extensions/vertx/runtime/pom.xml b/extensions/vertx/runtime/pom.xml index 0b7164bb5495a..b86c2cb88766d 100644 --- a/extensions/vertx/runtime/pom.xml +++ b/extensions/vertx/runtime/pom.xml @@ -57,7 +57,7 @@ - org.graalvm.nativeimage + com.oracle.substratevm svm From f13d93a0ee6f1215c2a3df5b76e7f7edee1627b6 Mon Sep 17 00:00:00 2001 From: Gwenneg Lepage Date: Sun, 12 Jan 2020 00:18:27 +0100 Subject: [PATCH 3/5] Try fixing quarkus-integration-test-jsch failure --- .../deployment/builditem/FeatureBuildItem.java | 1 + .../io/quarkus/jsch/deployment/JSchProcessor.java | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/core/deployment/src/main/java/io/quarkus/deployment/builditem/FeatureBuildItem.java b/core/deployment/src/main/java/io/quarkus/deployment/builditem/FeatureBuildItem.java index c4c02efad123e..7ea1018f73b7c 100644 --- a/core/deployment/src/main/java/io/quarkus/deployment/builditem/FeatureBuildItem.java +++ b/core/deployment/src/main/java/io/quarkus/deployment/builditem/FeatureBuildItem.java @@ -32,6 +32,7 @@ public final class FeatureBuildItem extends MultiBuildItem { public static final String JDBC_MSSQL = "jdbc-mssql"; public static final String JDBC_MYSQL = "jdbc-mysql"; public static final String JGIT = "jgit"; + public static final String JSCH = "jsch"; public static final String KAFKA_STREAMS = "kafka-streams"; public static final String KEYCLOAK_AUTHORIZATION = "keycloak-authorization"; public static final String KOGITO = "kogito"; diff --git a/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java b/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java index fdca53f4d33d7..092a23b5ef770 100644 --- a/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java +++ b/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java @@ -2,6 +2,8 @@ import io.quarkus.deployment.annotations.BuildStep; import io.quarkus.deployment.builditem.EnableAllSecurityServicesBuildItem; +import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem; +import io.quarkus.deployment.builditem.FeatureBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import io.quarkus.jsch.runtime.PortWatcherRunTime; @@ -72,4 +74,14 @@ ReflectiveClassBuildItem reflection() { "com.jcraft.jsch.UserAuthPassword", "com.jcraft.jsch.UserAuthPublicKey"); } + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FeatureBuildItem.JSCH); + } + + @BuildStep + ExtensionSslNativeSupportBuildItem activateSslNativeSupport() { + return new ExtensionSslNativeSupportBuildItem(FeatureBuildItem.JSCH); + } } From 827a9d79c074e47f5e2b4d9a809f48ef5db63ed0 Mon Sep 17 00:00:00 2001 From: Gwenneg Lepage Date: Mon, 13 Jan 2020 00:05:29 +0100 Subject: [PATCH 4/5] Force java.library.path (this is only a test) --- .../main/java/io/quarkus/jsch/deployment/JSchProcessor.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java b/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java index 092a23b5ef770..fc3f077983e35 100644 --- a/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java +++ b/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java @@ -4,6 +4,7 @@ import io.quarkus.deployment.builditem.EnableAllSecurityServicesBuildItem; import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem; import io.quarkus.deployment.builditem.FeatureBuildItem; +import io.quarkus.deployment.builditem.nativeimage.NativeImageSystemPropertyBuildItem; import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem; import io.quarkus.deployment.builditem.nativeimage.RuntimeInitializedClassBuildItem; import io.quarkus.jsch.runtime.PortWatcherRunTime; @@ -20,6 +21,11 @@ RuntimeInitializedClassBuildItem runtimeInitialized() { return new RuntimeInitializedClassBuildItem(PortWatcherRunTime.class.getName()); } + @BuildStep + NativeImageSystemPropertyBuildItem javaLibPath() { + return new NativeImageSystemPropertyBuildItem("java.library.path", "/opt/graalvm/jre/lib/amd64"); + } + @BuildStep ReflectiveClassBuildItem reflection() { //Classes that use reflection From 39a3b25910ed0f5373f719d2dd7a6514720c9b9b Mon Sep 17 00:00:00 2001 From: Gwenneg Lepage Date: Mon, 13 Jan 2020 01:16:13 +0100 Subject: [PATCH 5/5] Revert non-working changes --- .../java/io/quarkus/jsch/deployment/JSchProcessor.java | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java b/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java index fc3f077983e35..48efde52b579a 100644 --- a/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java +++ b/extensions/jsch/deployment/src/main/java/io/quarkus/jsch/deployment/JSchProcessor.java @@ -21,11 +21,6 @@ RuntimeInitializedClassBuildItem runtimeInitialized() { return new RuntimeInitializedClassBuildItem(PortWatcherRunTime.class.getName()); } - @BuildStep - NativeImageSystemPropertyBuildItem javaLibPath() { - return new NativeImageSystemPropertyBuildItem("java.library.path", "/opt/graalvm/jre/lib/amd64"); - } - @BuildStep ReflectiveClassBuildItem reflection() { //Classes that use reflection @@ -81,11 +76,6 @@ ReflectiveClassBuildItem reflection() { "com.jcraft.jsch.UserAuthPublicKey"); } - @BuildStep - FeatureBuildItem feature() { - return new FeatureBuildItem(FeatureBuildItem.JSCH); - } - @BuildStep ExtensionSslNativeSupportBuildItem activateSslNativeSupport() { return new ExtensionSslNativeSupportBuildItem(FeatureBuildItem.JSCH);