Describe the bug
mvn package -Pnative fails with an unknown arguments error
It seems to have to do with the args being passed with -J
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on OpenJDK 64-Bit GraalVM CE 19.3.0
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Users\george\scoop\apps\graalvm\current\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rovert-1.0.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI -H:-UseServiceLoaderFeature -H:+StackTrace rovert-1.0.0-SNAPSHOT-runner
Warning: the '=' character in program arguments is not fully supported.
Make sure that command line arguments using it are wrapped in double quotes.
Example:
"--vm.Dfoo=bar"
Error: Unknown arguments: org.jboss.logmanager.LogManager, io.quarkus.vertx.core.runtime.VertxLogDelegateFactory, true, DISABLED, 1, com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime, 1, 0, http, rovert-1.0.0-SNAPSHOT-runner
Environment (please complete the following information):
uname -a
or ver
: windows 10java -version
:Hello @gdoenlen, Any chance you can quickly try this against the previous 19.2.1
of Graal VM native image? By the way, we also have 1.0.0.CR2
of Quarkus released. Although the Quarkus version shouldn't be a factor in this issue, it would be good if you could try it against that.
This looks odd, since I don't see any obvious issue here other than Graal VM 19.3 and Java 11 that you are using.
So I tried a few things:
CR2 with 19.3 and Java 11 still fails with the same message.
CR2 with 19.3 and Java 8 still fails with the same message.
With CR2 and 19.2.1 and Java 8 I get different message, about failing to augment application classes:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on OpenJDK 64-Bit Graa lVM CE 19.2.1
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Users\george\desktop\graalvm-ce-windows-amd64-19.2.1\gr aalvm-ce-19.2.1\jre\bin\native-image.cmd -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.ma xUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initiali ze-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rovert -1.0.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportE xceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI -H:-UseServiceLoaderFeature -H:+StackTrace rov ert-1.0.0-SNAPSHOT-runner
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 4.754 s
[INFO] Finished at: 2019-11-21T23:05:13-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.0.0.CR2:build (default) on project rovert: Failed to bu ild a runnable JAR: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:289)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
[ERROR] at java.lang.Thread.run(Thread.java:748)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:278)
[ERROR] ... 12 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
For reference my project can be found here, and I can push a branch without any Java 11 features if needed: https://github.com/gdoenlen/rovert
For reference my project can be found here, and I can push a branch without any Java 11 features if needed: https://github.com/gdoenlen/rovert
A Java 8 branch would be good, if possible. Thank you.
@gdoenlen
I am seeing:
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Objects.java:203)
at com.github.gdoenlen.rovert.AuthorizationRequestFilter.<init>(AuthorizationRequestFilter.java:63)
I see the same error both in mvn clean package -Pnative
or when trying to run the jar using  java -jar target/rovert-1.0.0-SNAPSHOT-runner.jar
If I instead change your application.properties
to:
rovert.authorization.enabled = false
rovert.messages.user = trevor
slack.api.token = token
slack.api.url = localhost:9000
slack.signing-secret = rovert
then mvn clean package -Pnative
works.
Just to be clear: we don't support 19.3 yet. The work is in progress.
On Fri, Nov 22, 2019 at 11:39 AM Georgios Andrianakis <
[email protected]> wrote:
If I instead change your application.properties to:
rovert.authorization.enabled = false
rovert.messages.user = trevor
slack.api.token = token
slack.api.url = localhost:9000
slack.signing-secret = rovertthen mvn clean package -Pnative works.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/quarkusio/quarkus/issues/5675?email_source=notifications&email_token=AAJYOBN7C22YPFUVTISBZPDQU6ZHDA5CNFSM4JQKU5B2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEE5IFHA#issuecomment-557482652,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAJYOBMCFFF4SCU3ZXAXU7TQU6ZHDANCNFSM4JQKU5BQ
.
@geoand The docs says that stuff can be defined at runtime via environment variables for native or jar packages. (https://quarkus.io/guides/config). I removed that file entirely (the application doesn't have any config it needs anymore) and the packaging is still failing.
Running that generated native-image
command manually its exit code is non-zero and it looks like in NativeImageBuildStep it explicitly throws for non-zero. So I guess I need to figure out why the command is failing on my system as the command doesn't output anything to stdout.
~\Desktop\rovert\rovert\target [graal8 ≡ +0 ~1 -1 !]> C:\Users\george\desktop\graalvm-ce-windows-amd64-19.2.1\graalvm-ce-19.2.1\jre\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rovert-1.0.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI -H:-UseServiceLoaderFeature -H:+StackTrace rovert-1.0.0-SNAPSHOT-runner
~\Desktop\rovert\rovert\target [graal8 ≡ +0 ~1 -1 !]> $lastexitcode
-1073741819
@gsmet I understand that, but the 19.2.1 build for me is still failing.
@gdoenlen I might have missed the command you used to build the image. Can you paste it again?
@geoand it's just the command generated from the build step.
C:\Users\george\desktop\graalvm-ce-windows-amd64-19.2.1\graalvm-ce-19.2.1\jre\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar rovert-1.0.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI -H:-UseServiceLoaderFeature -H:+StackTrace rovert-1.0.0-SNAPSHOT-runner
I haven't had time to look look into why it's returning non-zero yet though.
I had access to an Windows setup yesterday and I did see it silently fail with 19.2.1
and Java 8. Unfortunately, I didn't have enough time to look more into this. I'll see if I can borrow a Windows setup again sometime soon.
@jaikiran Just an update, I've successfully packaged natively under WSL with 19.2.1 (19.3 still fails with other errors) so I think this is definitely a graalvm windows problem.
@geoand I did run into the null pointers you pointed out, so I guess I misread the documentation there about having config properties be available at runtime as environment variables.
@gdoenlen thanks for the info.
From what I understood the problem was the way your application is setup, but I don't have a Windows machine so I can't tell for sure
@jaikiran Just an update, I've successfully packaged natively under WSL with 19.2.1 (19.3 still fails with other errors) so I think this is definitely a graalvm windows problem.
Thank you for verifying that. So if it succeeds against 19.2.1
, I think it's good enough and this issue can be probably closed, since Quarkus doesn't yet support 19.3
(there are a bunch of changes that are currently WIP to support that).
There is still the issue that windows compilation just doesn't work/fails silently (with both 19.3 and 19.2.1). But that should probably be tracked under the graal repo I guess.
For reference, packaging the default app from https://code.quarkus.io on Windows with 19.2.1 fails with the same error from native-image.cmd returning non-zero:
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Users\george\desktop\co de-with-quarkus\target\code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar\code-with-quarkus-1.0.0-SNAPSHOT-runner. jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Users\george\desktop\code-wi th-quarkus\target\code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar\code-with-quarkus-1.0.0-SNAPSHOT-runner.jar [INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on OpenJDK 64-Bit Graa lVM CE 19.2.1
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Users\george\desktop\graalvm-ce-windows-amd64-19.2.1\gr aalvm-ce-19.2.1\jre\bin\native-image.cmd -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dsun.nio.ch.ma xUpdateArraySize=100 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initiali ze-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar code-w ith-quarkus-1.0.0-SNAPSHOT-runner.jar -J-Djava.util.concurrent.ForkJoinPool.common.parallelism=1 -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-JNI -H:-UseServiceLoaderFeature -H:+Sta ckTrace code-with-quarkus-1.0.0-SNAPSHOT-runner
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 22.672 s
[INFO] Finished at: 2019-11-24T09:31:17-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.0.0.CR2:build (default) on project code-with-quarkus: F ailed to build a runnable JAR: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:289)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.lang.reflect.Method.invoke(Method.java:498)
[ERROR] at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:941)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:415)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
[ERROR] at java.lang.Thread.run(Thread.java:748)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:278)
[ERROR] ... 12 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
For reference, packaging the default app from https://code.quarkus.io on Windows with 19.2.1 fails with the same error from native-image.cmd returning non-zero
It would be good to have it reported here https://github.com/oracle/graal/issues and see if they have any inputs.
Same here (with graalvm-ce-java11-19.3.1
):
[INFO] --- quarkus-maven-plugin:1.2.0.Final:build (default) @ modmono-quarkus ---
[INFO] [org.jboss.threads] JBoss Threads version 3.0.0.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Develop\_dev\modmono-quarkus\target\modmono-quarkus-1.0-SNAPSHOT-native-image-source-jar\modmono-quarkus-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Develop\_dev\modmono-quarkus\target\modmono-quarkus-1.0-SNAPSHOT-native-image-source-jar\modmono-quarkus-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version dev
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Develop\_tools\graal-default\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar modmono-quarkus-1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:+JNI -H:-UseServiceLoaderFeature -H:+StackTrace modmono-quarkus-1.0-SNAPSHOT-runner
Warning: the '=' character in program arguments is not fully supported.
Make sure that command line arguments using it are wrapped in double quotes.
Example:
"--vm.Dfoo=bar"
Error: Unknown arguments: org.jboss.logmanager.LogManager, io.quarkus.vertx.core.runtime.VertxLogDelegateFactory, true, DISABLED, 1, com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime, 0, http, modmono-quarkus-1.0-SNAPSHOT-runner
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 8.645 s
[INFO] Finished at: 2020-01-23T18:15:37+01:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.2.0.Final:build (default) on project modmono-quarkus: Failed to build a runnable JAR: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:319)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:308)
[ERROR] ... 12 more
[ERROR] -> [Help 1]
$ mvn -version
Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: C:\Develop\_tools\mvn-default
Java version: 11.0.6, vendor: AdoptOpenJDK, runtime: C:\Develop\_tools\jdk-default
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 10", version: "10.0", arch: "amd64", family: "windows"
Git Bash (for Windows)
When I take the printed command
C:\Develop\_tools\graal-default\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -jar modmono-quarkus-1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:+JNI -H:-UseServiceLoaderFeature -H:+StackTrace modmono-quarkus-1.0-SNAPSHOT-runner
and wrap every parameter that contains a =
with "...=..."
and execute it manually, the "Unknown arguments" error vanishes! (but I then hit https://github.com/oracle/graal/issues/1675 which shadows the real problem)
It seems Quarkus should do this wrapping automatically, at least on Windows.
It seems Quarkus should do this wrapping automatically, at least on Windows.
Hello @famod,
It shouldn't need wrapping when the command is being run from the Java ProcessBuilder (which is what Quarkus does). I think the reason you needed to wrap them with double quotes is perhaps because you tried to run the command from the command line manually? Running the command from command line manually needs the escaping to prevent the command line from interpreting it differently.
Hi @jaikiran,
I think the reason you needed to wrap them with double quotes is perhaps because you tried to run the command from the command line manually?
Well, yes and no. When I simply took the printed command and ran it directly on the Windows command line I received the _very same error message_ as via quarkus-maven-plugin
.
This in combination with the GraalVM warning Warning: the '=' character in program arguments is not fully supported.
got me thinking whether it needed _additional_ quotation and that indeed fixed it for me.
I suppose ProcessBuilder
does not quote every parameter by default but only if necessary. And if the parameter does not contain spaces etc. it might not consider adding quotes necessary.
GraalVM 20.0.0 is out and this entry in the release notes caught my attention:
Native Image support on Windows has significantly advanced. Please report issues if you find any problems.
Wonder when Quarkus moves to GraalVM 20?
@famod you can already use GraalVM 20.0 with Quarkus. I propose you give it a go :)
@famod you can already use GraalVM 20.0 with Quarkus. I propose you give it a go :)
This solved building it on Mac with gradle.
./gradlew buildNative --docker-build=true
failed on 19.3.1
@fmhwong if you have access to a Windows machine, it would be nice to test a couple of examples on Windows with GraalVM 20 and see how it goes.
I have access to Windows machines and I can take a look.
GraalVM 20.0.0 seems to have fixed this issue!
I am now getting past that point, but running into https://github.com/oracle/graal/issues/1160:
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Develop\_tools\graal-default\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 --allow-incomplete-classpath --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -jar modmono-quarkus-dist-1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace modmono-quarkus-dist-1.0-SNAPSHOT-runner
[modmono-quarkus-dist-1.0-SNAPSHOT-runner:3284] classlist: 12,635.09 ms, 1.44 GB
[modmono-quarkus-dist-1.0-SNAPSHOT-runner:3284] (cap): 1,859.32 ms, 1.44 GB
[modmono-quarkus-dist-1.0-SNAPSHOT-runner:3284] setup: 3,091.44 ms, 1.44 GB
Error: Error compiling query code (in C:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.cpp). Compiler command CL C:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.cpp /FeC:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.exe output included error: [NativeInfoDirectives.cpp, C:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.cpp(32): fatal error C1083: Datei (Include) kann nicht ge?ffnet werden: "unistd.h": No such file or directory]
com.oracle.svm.core.util.UserError$UserException: Error compiling query code (in C:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.cpp). Compiler command CL C:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.cpp /FeC:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.exe output included error: [NativeInfoDirectives.cpp, C:\Develop\Temp\SVM-16654948314929508846\NativeInfoDirectives.cpp(32): fatal error C1083: Datei (Include) kann nicht ge?ffnet werden: "unistd.h": No such file or directory]
at com.oracle.svm.core.util.UserError.abort(UserError.java:135)
at com.oracle.svm.hosted.c.NativeLibraries.reportErrors(NativeLibraries.java:228)
at com.oracle.svm.hosted.NativeImageGenerator.processNativeLibraryImports(NativeImageGenerator.java:1515)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeLibraries(NativeImageGenerator.java:1010)
at com.oracle.svm.hosted.NativeImageGenerator.setupNativeImage(NativeImageGenerator.java:841)
at com.oracle.svm.hosted.NativeImageGenerator.doRun(NativeImageGenerator.java:528)
at com.oracle.svm.hosted.NativeImageGenerator.lambda$run$0(NativeImageGenerator.java:445)
at java.base/java.util.concurrent.ForkJoinTask$AdaptedRunnableAction.exec(ForkJoinTask.java:1407)
at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290)
at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020)
at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656)
at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594)
at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:177)
Error: Image build request failed with exit status 1
I can confirm that it still does not work on windows with Graal 20.0 and Quarkus 1.2.1.Final with the default project generated from quarkus.io.
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.2.1.Final:build (default) on project code-with-quarkus: Failed to build a runnable JAR: Failed to augment application classes: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.deployment.pkg.steps.NativeImageBuildStep#build threw an exception: java.lang.RuntimeException: Failed to build native image
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:319)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
[ERROR] at io.quarkus.deployment.ExtensionLoader$2.execute(ExtensionLoader.java:915)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:279)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) [ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2011)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1535)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1426)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.lang.RuntimeException: Image generation failed. Exit code: 1
[ERROR] at io.quarkus.deployment.pkg.steps.NativeImageBuildStep.build(NativeImageBuildStep.java:308)
[ERROR] ... 12 more
I ran into the same problem reported in https://github.com/quarkusio/quarkus/issues/7269
Just retried this with 1.3.0.CR2 and it is now working.
Environment:
Windows 10 Enterprise
graalvm-ce-java11-20.0.0
Windows VisualStudio 2019 x86 Native Tool Command Prompt
C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started>mvnw package -Pnative
Found "C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\.mvn\wrapper\maven-wrapper.jar"
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------------< org.acme:getting-started >----------------------
[INFO] Building getting-started 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy/1.3.0.CR2/quarkus-resteasy-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy/1.3.0.CR2/quarkus-resteasy-1.3.0.CR2.pom (2.3 kB at 4.4 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-parent/1.3.0.CR2/quarkus-resteasy-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-parent/1.3.0.CR2/quarkus-resteasy-parent-1.3.0.CR2.pom (752 B at 9.6 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http/1.3.0.CR2/quarkus-vertx-http-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http/1.3.0.CR2/quarkus-vertx-http-1.3.0.CR2.pom (2.8 kB at 36 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http-parent/1.3.0.CR2/quarkus-vertx-http-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http-parent/1.3.0.CR2/quarkus-vertx-http-parent-1.3.0.CR2.pom (758 B at 12 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core/1.3.0.CR2/quarkus-core-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core/1.3.0.CR2/quarkus-core-1.3.0.CR2.pom (6.4 kB at 68 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core-parent/1.3.0.CR2/quarkus-core-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core-parent/1.3.0.CR2/quarkus-core-parent-1.3.0.CR2.pom (1.2 kB at 15 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode-spi/1.3.0.CR2/quarkus-development-mode-spi-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode-spi/1.3.0.CR2/quarkus-development-mode-spi-1.3.0.CR2.pom (755 B at 8.0 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-core/1.3.0.CR2/quarkus-vertx-core-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-core/1.3.0.CR2/quarkus-vertx-core-1.3.0.CR2.pom (2.9 kB at 37 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-core-parent/1.3.0.CR2/quarkus-vertx-core-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-core-parent/1.3.0.CR2/quarkus-vertx-core-parent-1.3.0.CR2.pom (758 B at 12 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-arc/1.3.0.CR2/quarkus-arc-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-arc/1.3.0.CR2/quarkus-arc-1.3.0.CR2.pom (1.6 kB at 26 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-arc-parent/1.3.0.CR2/quarkus-arc-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-arc-parent/1.3.0.CR2/quarkus-arc-parent-1.3.0.CR2.pom (742 B at 9.5 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/arc/arc/1.3.0.CR2/arc-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/arc/arc/1.3.0.CR2/arc-1.3.0.CR2.pom (1.4 kB at 22 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/arc/arc-parent/1.3.0.CR2/arc-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/arc/arc-parent/1.3.0.CR2/arc-parent-1.3.0.CR2.pom (21 kB at 274 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-netty/1.3.0.CR2/quarkus-netty-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-netty/1.3.0.CR2/quarkus-netty-1.3.0.CR2.pom (2.9 kB at 37 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-netty-parent/1.3.0.CR2/quarkus-netty-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-netty-parent/1.3.0.CR2/quarkus-netty-parent-1.3.0.CR2.pom (747 B at 9.6 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-server-common/1.3.0.CR2/quarkus-resteasy-server-common-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-server-common/1.3.0.CR2/quarkus-resteasy-server-common-1.3.0.CR2.pom (2.1 kB at 26 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-server-common-parent/1.3.0.CR2/quarkus-resteasy-server-common-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-server-common-parent/1.3.0.CR2/quarkus-resteasy-server-common-parent-1.3.0.CR2.pom (811 B at 10 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-common/1.3.0.CR2/quarkus-resteasy-common-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-common/1.3.0.CR2/quarkus-resteasy-common-1.3.0.CR2.pom (3.1 kB at 40 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-common-parent/1.3.0.CR2/quarkus-resteasy-common-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-common-parent/1.3.0.CR2/quarkus-resteasy-common-parent-1.3.0.CR2.pom (797 B at 10 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-junit5/1.3.0.CR2/quarkus-junit5-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-junit5/1.3.0.CR2/quarkus-junit5-1.3.0.CR2.pom (1.5 kB at 24 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-test-framework/1.3.0.CR2/quarkus-test-framework-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-test-framework/1.3.0.CR2/quarkus-test-framework-1.3.0.CR2.pom (1.1 kB at 14 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-core/1.3.0.CR2/quarkus-bootstrap-core-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-core/1.3.0.CR2/quarkus-bootstrap-core-1.3.0.CR2.pom (3.9 kB at 50 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-parent/1.3.0.CR2/quarkus-bootstrap-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-parent/1.3.0.CR2/quarkus-bootstrap-parent-1.3.0.CR2.pom (30 kB at 318 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.pom (6.6 kB at 105 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.11/httpcomponents-client-4.5.11.pom
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpcomponents-client/4.5.11/httpcomponents-client-4.5.11.pom (16 kB at 260 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-test-common/1.3.0.CR2/quarkus-test-common-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-test-common/1.3.0.CR2/quarkus-test-common-1.3.0.CR2.pom (1.6 kB at 21 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core-deployment/1.3.0.CR2/quarkus-core-deployment-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core-deployment/1.3.0.CR2/quarkus-core-deployment-1.3.0.CR2.pom (3.5 kB at 45 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-builder/1.3.0.CR2/quarkus-builder-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-builder/1.3.0.CR2/quarkus-builder-1.3.0.CR2.pom (2.5 kB at 40 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp-deployment/1.3.0.CR2/quarkus-jsonp-deployment-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp-deployment/1.3.0.CR2/quarkus-jsonp-deployment-1.3.0.CR2.pom (1.5 kB at 24 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp-parent/1.3.0.CR2/quarkus-jsonp-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp-parent/1.3.0.CR2/quarkus-jsonp-parent-1.3.0.CR2.pom (746 B at 9.4 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp/1.3.0.CR2/quarkus-jsonp-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp/1.3.0.CR2/quarkus-jsonp-1.3.0.CR2.pom (2.3 kB at 37 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy/1.3.0.CR2/quarkus-resteasy-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http/1.3.0.CR2/quarkus-vertx-http-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode-spi/1.3.0.CR2/quarkus-development-mode-spi-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-netty/1.3.0.CR2/quarkus-netty-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-core/1.3.0.CR2/quarkus-vertx-core-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy/1.3.0.CR2/quarkus-resteasy-1.3.0.CR2.jar (81 kB at 473 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-server-common/1.3.0.CR2/quarkus-resteasy-server-common-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode-spi/1.3.0.CR2/quarkus-development-mode-spi-1.3.0.CR2.jar (3.6 kB at 17 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-arc/1.3.0.CR2/quarkus-arc-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-server-common/1.3.0.CR2/quarkus-resteasy-server-common-1.3.0.CR2.jar (3.1 kB at 10 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/arc/arc/1.3.0.CR2/arc-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-netty/1.3.0.CR2/quarkus-netty-1.3.0.CR2.jar (48 kB at 146 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-common/1.3.0.CR2/quarkus-resteasy-common-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-arc/1.3.0.CR2/quarkus-arc-1.3.0.CR2.jar (33 kB at 75 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-junit5/1.3.0.CR2/quarkus-junit5-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-core/1.3.0.CR2/quarkus-vertx-core-1.3.0.CR2.jar (48 kB at 98 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-core/1.3.0.CR2/quarkus-bootstrap-core-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-resteasy-common/1.3.0.CR2/quarkus-resteasy-common-1.3.0.CR2.jar (13 kB at 24 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-test-common/1.3.0.CR2/quarkus-test-common-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-junit5/1.3.0.CR2/quarkus-junit5-1.3.0.CR2.jar (26 kB at 38 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core-deployment/1.3.0.CR2/quarkus-core-deployment-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-vertx-http/1.3.0.CR2/quarkus-vertx-http-1.3.0.CR2.jar (170 kB at 248 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-builder/1.3.0.CR2/quarkus-builder-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-test-common/1.3.0.CR2/quarkus-test-common-1.3.0.CR2.jar (37 kB at 45 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp-deployment/1.3.0.CR2/quarkus-jsonp-deployment-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp-deployment/1.3.0.CR2/quarkus-jsonp-deployment-1.3.0.CR2.jar (4.5 kB at 4.7 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp/1.3.0.CR2/quarkus-jsonp-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bootstrap-core/1.3.0.CR2/quarkus-bootstrap-core-1.3.0.CR2.jar (177 kB at 186 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core/1.3.0.CR2/quarkus-core-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-builder/1.3.0.CR2/quarkus-builder-1.3.0.CR2.jar (50 kB at 52 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-jsonp/1.3.0.CR2/quarkus-jsonp-1.3.0.CR2.jar (3.0 kB at 2.8 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/arc/arc/1.3.0.CR2/arc-1.3.0.CR2.jar (149 kB at 123 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core/1.3.0.CR2/quarkus-core-1.3.0.CR2.jar (197 kB at 119 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-core-deployment/1.3.0.CR2/quarkus-core-deployment-1.3.0.CR2.jar (555 kB at 314 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/httpcomponents/httpclient/4.5.11/httpclient-4.5.11.jar (778 kB at 425 kB/s)
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ getting-started ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ getting-started ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ getting-started ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.quickstart.GreetingResourceTest
2020-03-11 10:52:15,031 INFO [io.quarkus] (main) Quarkus 1.3.0.CR2 started in 3.695s. Listening on: http://0.0.0.0:8081
2020-03-11 10:52:15,047 INFO [io.quarkus] (main) Profile test activated.
2020-03-11 10:52:15,047 INFO [io.quarkus] (main) Installed features: [cdi, resteasy]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 14.951 s - in org.acme.quickstart.GreetingResourceTest
2020-03-11 10:52:17,531 INFO [io.quarkus] (main) Quarkus stopped in 0.203s
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ getting-started ---
[INFO] Building jar: C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\getting-started-1.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:1.3.0.CR2:build (default) @ getting-started ---
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-json/1.3.0.CR2/quarkus-platform-descriptor-json-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-json/1.3.0.CR2/quarkus-platform-descriptor-json-1.3.0.CR2.pom (4.0 kB at 40 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-all/1.3.0.CR2/quarkus-devtools-all-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-all/1.3.0.CR2/quarkus-devtools-all-1.3.0.CR2.pom (1.0 kB at 13 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-common/1.3.0.CR2/quarkus-devtools-common-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-common/1.3.0.CR2/quarkus-devtools-common-1.3.0.CR2.pom (4.3 kB at 50 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-tools-parent/1.3.0.CR2/quarkus-tools-parent-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-tools-parent/1.3.0.CR2/quarkus-tools-parent-1.3.0.CR2.pom (22 kB at 284 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-utilities/1.3.0.CR2/quarkus-devtools-utilities-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-utilities/1.3.0.CR2/quarkus-devtools-utilities-1.3.0.CR2.pom (580 B at 8.1 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-api/1.3.0.CR2/quarkus-platform-descriptor-api-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-api/1.3.0.CR2/quarkus-platform-descriptor-api-1.3.0.CR2.pom (949 B at 11 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bom-descriptor-json/1.3.0.CR2/quarkus-bom-descriptor-json-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bom-descriptor-json/1.3.0.CR2/quarkus-bom-descriptor-json-1.3.0.CR2.pom (1.4 kB at 14 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-resolver-json/1.3.0.CR2/quarkus-platform-descriptor-resolver-json-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-resolver-json/1.3.0.CR2/quarkus-platform-descriptor-resolver-json-1.3.0.CR2.pom (1.8 kB at 28 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode/1.3.0.CR2/quarkus-development-mode-1.3.0.CR2.pom
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode/1.3.0.CR2/quarkus-development-mode-1.3.0.CR2.pom (2.3 kB at 36 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-json/1.3.0.CR2/quarkus-platform-descriptor-json-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bom-descriptor-json/1.3.0.CR2/quarkus-bom-descriptor-json-1.3.0.CR2.json
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-api/1.3.0.CR2/quarkus-platform-descriptor-api-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-utilities/1.3.0.CR2/quarkus-devtools-utilities-1.3.0.CR2.jar
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-common/1.3.0.CR2/quarkus-devtools-common-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-api/1.3.0.CR2/quarkus-platform-descriptor-api-1.3.0.CR2.jar (17 kB at 135 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-resolver-json/1.3.0.CR2/quarkus-platform-descriptor-resolver-json-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-utilities/1.3.0.CR2/quarkus-devtools-utilities-1.3.0.CR2.jar (4.9 kB at 35 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode/1.3.0.CR2/quarkus-development-mode-1.3.0.CR2.jar
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-json/1.3.0.CR2/quarkus-platform-descriptor-json-1.3.0.CR2.jar (52 kB at 336 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-bom-descriptor-json/1.3.0.CR2/quarkus-bom-descriptor-json-1.3.0.CR2.json (76 kB at 272 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-development-mode/1.3.0.CR2/quarkus-development-mode-1.3.0.CR2.jar (44 kB at 157 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-platform-descriptor-resolver-json/1.3.0.CR2/quarkus-platform-descriptor-resolver-json-1.3.0.CR2.jar (19 kB at 61 kB/s)
Downloaded from central: https://repo.maven.apache.org/maven2/io/quarkus/quarkus-devtools-common/1.3.0.CR2/quarkus-devtools-common-1.3.0.CR2.jar (108 kB at 346 kB/s)
[INFO] [org.jboss.threads] JBoss Threads version 3.0.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\getting-started-1.0-SNAPSHOT-native-image-source-jar\getting-started-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\getting-started-1.0-SNAPSHOT-native-image-source-jar\getting-started-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.0.0 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Users\fmhwong\graalvm-ce-java11-20.0.0\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=Cp1252 -H:+TraceClassInitialization --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -jar getting-started-1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:-IncludeAllTimeZones -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace getting-started-1.0-SNAPSHOT-runner
[getting-started-1.0-SNAPSHOT-runner:9580] classlist: 10,684.71 ms, 1.20 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (cap): 15,446.22 ms, 1.20 GB
[getting-started-1.0-SNAPSHOT-runner:9580] setup: 19,439.97 ms, 1.20 GB
10:53:03,656 INFO [org.jbo.threads] JBoss Threads version 3.0.1.Final
[getting-started-1.0-SNAPSHOT-runner:9580] (typeflow): 39,771.70 ms, 4.80 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (objects): 26,604.86 ms, 4.80 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (features): 622.96 ms, 4.80 GB
[getting-started-1.0-SNAPSHOT-runner:9580] analysis: 68,749.09 ms, 4.80 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (clinit): 1,180.57 ms, 5.37 GB
[getting-started-1.0-SNAPSHOT-runner:9580] universe: 7,053.25 ms, 5.37 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (parse): 10,805.04 ms, 5.57 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (inline): 7,146.89 ms, 5.65 GB
[getting-started-1.0-SNAPSHOT-runner:9580] (compile): 48,290.15 ms, 5.68 GB
[getting-started-1.0-SNAPSHOT-runner:9580] compile: 68,535.21 ms, 5.68 GB
[getting-started-1.0-SNAPSHOT-runner:9580] image: 4,446.25 ms, 5.68 GB
[getting-started-1.0-SNAPSHOT-runner:9580] write: 3,815.08 ms, 5.68 GB
[getting-started-1.0-SNAPSHOT-runner:9580] [total]: 183,405.38 ms, 5.68 GB
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 190953ms
[INFO]
[INFO] --- quarkus-maven-plugin:1.3.0.CR2:native-image (default) @ getting-started ---
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\getting-started-1.0-SNAPSHOT-native-image-source-jar\getting-started-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Users\fmhwong\gitRepos\quarkus-quickstarts\getting-started\target\getting-started-1.0-SNAPSHOT-native-image-source-jar\getting-started-1.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.0.0 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Users\fmhwong\graalvm-ce-java11-20.0.0\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Duser.language=en -J-Dfile.encoding=Cp1252 -H:+TraceClassInitialization --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -jar getting-started-1.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:-IncludeAllTimeZones -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace getting-started-1.0-SNAPSHOT-runner
[getting-started-1.0-SNAPSHOT-runner:7892] classlist: 11,344.13 ms, 1.00 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (cap): 16,704.71 ms, 1.00 GB
[getting-started-1.0-SNAPSHOT-runner:7892] setup: 20,614.67 ms, 1.00 GB
10:56:19,140 INFO [org.jbo.threads] JBoss Threads version 3.0.1.Final
[getting-started-1.0-SNAPSHOT-runner:7892] (typeflow): 40,142.28 ms, 5.09 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (objects): 28,494.64 ms, 5.09 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (features): 688.97 ms, 5.09 GB
[getting-started-1.0-SNAPSHOT-runner:7892] analysis: 71,324.80 ms, 5.09 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (clinit): 1,442.05 ms, 5.09 GB
[getting-started-1.0-SNAPSHOT-runner:7892] universe: 4,150.32 ms, 5.09 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (parse): 10,428.97 ms, 5.55 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (inline): 6,155.63 ms, 5.64 GB
[getting-started-1.0-SNAPSHOT-runner:7892] (compile): 47,651.02 ms, 5.64 GB
[getting-started-1.0-SNAPSHOT-runner:7892] compile: 66,527.26 ms, 5.64 GB
[getting-started-1.0-SNAPSHOT-runner:7892] image: 4,752.20 ms, 5.67 GB
[getting-started-1.0-SNAPSHOT-runner:7892] write: 1,053.77 ms, 5.67 GB
[getting-started-1.0-SNAPSHOT-runner:7892] [total]: 180,542.30 ms, 5.67 GB
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 189390ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 06:56 min
[INFO] Finished at: 2020-03-11T10:58:43-04:00
[INFO] ------------------------------------------------------------------------
Great to hear! Thanks for letting us know!
@gdoenlen would you be able to test as well?
More than likely I will be able to tonight.
Excellent, thank you
@geoand I managed to get around to testing this this morning and it does work, but it's not really in an ideal form atm.
Some things to note:
vcvars64.bat
quarkus.platform.artifact-id
as quarkus-universe-bom
and I had to switch this to quarkus-bom
for maven to find 1.3.0.CR2, I'm not sure if this is a bug with quarkus.io or if this is by design.I know the first two issues are probably upstream problems with either Graal or Microsoft themselves, but if you want to drive adoption it's probably something that should be worked on. I think for now there needs to be some sort of documentation somewhere on how to do the above process for windows users (maybe in here somewhere https://quarkus.io/guides/maven-tooling).
Thanks for keeping this a priority guys!
Environment:
OS: Microsoft Windows [Version 10.0.18362.719]
Java:
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02)
OpenJDK 64-Bit Server VM GraalVM CE 20.0.0 (build 11.0.6+9-jvmci-20.0-b02, mixed mode, sharing)
VCVars: C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build>vcvars64.bat
Project: default generated project from quarkus.io
**********************************************************************
** Visual Studio 2019 Developer Command Prompt v16.0
** Copyright (c) 2019 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64'
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>whereis cl
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Tools\MSVC\14.20.27508\bin\Hostx64\x64\cl.exe
C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools>cd C:/users/george/desktop
C:\Users\george\Desktop>cd code-with-quarkus
C:\Users\george\Desktop\code-with-quarkus>mvn clean package -Pnative
[INFO] Scanning for projects...
[INFO]
[INFO] ---------------------< org.acme:code-with-quarkus >---------------------
[INFO] Building code-with-quarkus 1.0.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ code-with-quarkus ---
[INFO] Deleting C:\Users\george\Desktop\code-with-quarkus\target
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ code-with-quarkus ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @ code-with-quarkus ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\george\Desktop\code-with-quarkus\target\classes
[INFO]
[INFO] --- maven-resources-plugin:2.6:testResources (default-testResources) @ code-with-quarkus ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory C:\Users\george\Desktop\code-with-quarkus\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile (default-testCompile) @ code-with-quarkus ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\george\Desktop\code-with-quarkus\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.1:test (default-test) @ code-with-quarkus ---
[INFO]
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.acme.ExampleResourceTest
2020-03-12 09:13:56,317 INFO [io.quarkus] (main) Quarkus 1.3.0.CR2 started in 1.273s. Listening on: http://0.0.0.0:8081
2020-03-12 09:13:56,318 INFO [io.quarkus] (main) Profile test activated.
2020-03-12 09:13:56,318 INFO [io.quarkus] (main) Installed features: [cdi, resteasy]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 3.404 s - in org.acme.ExampleResourceTest
2020-03-12 09:13:57,097 INFO [io.quarkus] (main) Quarkus stopped in 0.021s
[INFO]
[INFO] Results:
[INFO]
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0
[INFO]
[INFO]
[INFO] --- maven-jar-plugin:2.4:jar (default-jar) @ code-with-quarkus ---
[INFO] Building jar: C:\Users\george\Desktop\code-with-quarkus\target\code-with-quarkus-1.0.0-SNAPSHOT.jar
[INFO]
[INFO] --- quarkus-maven-plugin:1.3.0.CR2:build (default) @ code-with-quarkus ---
[INFO] [org.jboss.threads] JBoss Threads version 3.0.1.Final
[INFO] [io.quarkus.deployment.pkg.steps.JarResultBuildStep] Building native image source jar: C:\Users\george\Desktop\code-with-quarkus\target\code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar\code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Building native image from C:\Users\george\Desktop\code-with-quarkus\target\code-with-quarkus-1.0.0-SNAPSHOT-native-image-source-jar\code-with-quarkus-1.0.0-SNAPSHOT-runner.jar
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] Running Quarkus native-image plugin on GraalVM Version 20.0.0 CE
[INFO] [io.quarkus.deployment.pkg.steps.NativeImageBuildStep] C:\Users\george\scoop\apps\graalvm\current\bin\native-image.cmd -J-Dsun.nio.ch.maxUpdateArraySize=100 -J-Djava.util.logging.manager=org.jboss.logmanager.LogManager -J-Dvertx.logger-delegate-factory-class-name=io.quarkus.vertx.core.runtime.VertxLogDelegateFactory -J-Dvertx.disableDnsResolver=true -J-Dio.netty.leakDetection.level=DISABLED -J-Dio.netty.allocator.maxOrder=1 -J-Duser.language=en -J-Dfile.encoding=Cp1252 --initialize-at-build-time= -H:InitialCollectionPolicy=com.oracle.svm.core.genscavenge.CollectionPolicy$BySpaceAndTime -H:+JNI -jar code-with-quarkus-1.0.0-SNAPSHOT-runner.jar -H:FallbackThreshold=0 -H:+ReportExceptionStackTraces -H:-AddAllCharsets -H:-IncludeAllTimeZones -H:EnableURLProtocols=http -H:-UseServiceLoaderFeature -H:+StackTrace code-with-quarkus-1.0.0-SNAPSHOT-runner
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] classlist: 2,415.90 ms, 1.27 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (cap): 1,829.13 ms, 1.27 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] setup: 2,841.18 ms, 1.27 GB
09:14:08,315 INFO [org.jbo.threads] JBoss Threads version 3.0.1.Final
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (typeflow): 7,555.07 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (objects): 6,607.83 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (features): 252.82 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] analysis: 15,014.06 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (clinit): 398.91 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] universe: 994.55 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (parse): 1,369.05 ms, 2.88 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (inline): 1,545.27 ms, 3.77 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] (compile): 8,111.35 ms, 3.77 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] compile: 11,972.74 ms, 3.77 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] image: 1,736.52 ms, 3.77 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] write: 421.54 ms, 3.77 GB
[code-with-quarkus-1.0.0-SNAPSHOT-runner:15204] [total]: 35,652.05 ms, 3.77 GB
[INFO] [io.quarkus.deployment.QuarkusAugmentor] Quarkus augmentation completed in 39612ms
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 52.812 s
[INFO] Finished at: 2020-03-12T09:14:38-04:00
[INFO] ------------------------------------------------------------------------
@geoand I managed to get around to testing this this morning and it does work, but it's not really in an ideal form atm.
Some things to note:
- Only works from cmd (this isn't ideal as every developer I know on windows uses powershell).
- Only works after manually running
vcvars64.bat
- The default project generates
quarkus.platform.artifact-id
asquarkus-universe-bom
and I had to switch this toquarkus-bom
for maven to find 1.3.0.CR2, I'm not sure if this is a bug with quarkus.io or if this is by design.
This is by design.
I know the first two issues are probably upstream problems with either Graal or Microsoft themselves, but if you want to drive adoption it's probably something that should be worked on. I think for now there needs to be some sort of documentation somewhere on how to do the above process for windows users (maybe in here somewhere https://quarkus.io/guides/maven-tooling).
cc @maxandersen
What is it you can't do in / out of powershell ?
I don't recall having to run vcvars64.bat - just that you need to run the window 7 sdk terminal initially - yes, not great; but thats windows sdk setup :/
I don't recall having to run vcvars64.bat - just that you need to run the window 7 sdk terminal initially
I'm not sure what you mean by this, but without running the bat file CL won't be found to be executed. After manually adding CL onto my path both shells complain about not having the include path set properly for the compiler. I'm assuming vcvars does something that sets an environment variable for this and only in cmd does it actually stay around after the bat file is done.
AFTER putting CL on path:
Error: Error compiling query code (in C:\Users\george\AppData\Local\Temp\SVM-5429191132714981263\AMD64LibCHelperDirectives.cpp). Compiler command CL C:\Users\geor ge\AppData\Local\Temp\SVM-5429191132714981263\AMD64LibCHelperDirectives.cpp /FeC:\Users\george\AppData\Local\Temp\SVM-5429191132714981263\AMD64LibCHelperDirectives .exe output included error: [AMD64LibCHelperDirectives.cpp, C:\Users\george\AppData\Local\Temp\SVM-5429191132714981263\AMD64LibCHelperDirectives.cpp(33): fatal error C1034: stdio.h: no include path set]
The only way I've gotten a clean compile in powershell is to:
vcvars64.bat
Like I said, it works, it's just not ideal and requires some documentation.
Yes, so what I have in my windows install is a windows 7 sdk command line prompt - that does the magical setup; that might be just calling out vcvars64.bat
- but yeah; this is how compilation tools are configured on windows and it seem to change slightly over time.
Would you be up for taking a stab on such documentation to get it bootstrapped and we can iterate on over time ?
that might be just calling out
vcvars64.bat
Yes it does my x64 Native Tools Command Prompt for VS 2019
has a target of: %comspec% /k "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\VC\Auxiliary\Build\vcvars64.bat"
Would you be up for taking a stab on such documentation to get it bootstrapped and we can iterate on over time ?
I could do this, but ideally I would like to see NativeBuildStep.java in quarkus take care of this. Either by passing the path to vcvars64.bat in mvn package -Pnative -DVCVARS=/path/to/vc/vars
and then in NativeBuildStep do $env:ComSpec /c "/path/to/vc/vars.bat && <your current native-image.cmd>"
or somehow automagically figuring out where this bat file is though currently I'm not sure what that looks like. I don't see any environment vars on my system that could help, and scanning through $env:PROGRAM_FILES seems like it would be rather error prone.
Windows env setup doesn't work as transparent as linux though thus I don't think we can do this in a reliable fashion - docs are the best way forward at the moment.
in other conversations we are working on trying to auto setup native-image so you don't need to download it separately but in all cases I think the assumption must be that the surrounding environment need to be setup for native compilation.
I would say improve the documentation and then on windows detect failure during complation and have the exception refer to that documentation would be a good bet.
@gsmet @gdoenlen I don't think this is an issue any more. Let's close it. Windows Quarkus native app build works just fine for me.
Most helpful comment
I'm not sure what you mean by this, but without running the bat file CL won't be found to be executed. After manually adding CL onto my path both shells complain about not having the include path set properly for the compiler. I'm assuming vcvars does something that sets an environment variable for this and only in cmd does it actually stay around after the bat file is done.
AFTER putting CL on path:
The only way I've gotten a clean compile in powershell is to:
vcvars64.bat
Like I said, it works, it's just not ideal and requires some documentation.