When using Windows with space on username there's 2 errors on different steps on mvn package.
the command that I ran is:
mvn -Pnative package
Expected behavior
Successfully generate my native image.
Actual behavior
Breaks on 2 steps of ' io.quarkus:quarkus-maven-plugin:1.9.1.Final:build'
The first step that breaks is
' io.quarkus.vertx.http.deployment.VertxHttpProcessor#registerExchangeAttributeBuilders'
The entire message on this error is:
Failed to execute goal io.quarkus:quarkus-maven-plugin:1.9.1.Final:build (default) on project qa-tracker-api: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.vertx.http.deployment.VertxHttpProcessor#registerExchangeAttributeBuilders threw an exception: java.nio.file.FileSystemNotFoundException: C:\Users\Lucca%2520Prado.m2\repository\io\quarkus\quarkus-vertx-http\1.9.1.Final\quarkus-vertx-http-1.9.1.Final.jar
[ERROR] at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.(ZipFileSystem.java:118)
[ERROR] at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newFileSystem(ZipFileSystemProvider.java:109)
[ERROR] at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:337)
[ERROR] at java.base/java.nio.file.FileSystems.newFileSystem(FileSystems.java:286)
[ERROR] at io.quarkus.bootstrap.util.ZipUtils.newFileSystem(ZipUtils.java:160)
[ERROR] at io.quarkus.vertx.http.deployment.VertxHttpProcessor.registerExchangeAttributeBuilders(VertxHttpProcessor.java:221)
[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:936)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[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)
The second step that break (after bypassing the first) is
'io.quarkus.container.image.deployment.ContainerImageProcessor#publishImageInfo'
The entire message on this error is:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.9.1.Final:build (default) on project qa-tracker-api: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step io.quarkus.container.image.deployment.ContainerImageProcessor#publishImageInfo threw an exception: java.lang.IllegalArgumentException: The supplied combination of container-image group 'lucca prado' and name 'qa-tracker-api' is invalid
[ERROR] at io.quarkus.container.image.deployment.ContainerImageProcessor.publishImageInfo(ContainerImageProcessor.java:47)
[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:936)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2046)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1578)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1452)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
To Reproduce
Steps to reproduce the behavior:
mvn -Pnative packageScreenshots
(If applicable, add screenshots to help explain your problem.)
Environment (please complete the following information):
uname -a or ver:java -version:mvnw --version or gradlew --version):Additional context
To bypass the first error i changed the settings.xml in my .m2 folder to one that don't have , but would be nice if this step escaped the space char correctly.
The second one I guess that I can override it, but, would be really nice if the space on username could be changed to "-".
Hello, this problem is indeed caused by space in the path and I am experiencing it too in my Windows CI. I had to workaround it like this in my .m2/settings.xml:
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository>C:\tmp\.m2\repository</localRepository>
</settings>
Perhaps @maxandersen has the fix handy from the top of his head as he surely hit something like that with JBang at some point...
I bet it's not just a windows issue.
Any path with space would fail on Linux and Mac too is my guess.
Fix is to always quote arguments when passing them to command line calls.
No silver bullet :)
@Karm I did like you to workaround as I said on Additional context. But in my opinion this isn't the best way as we are duplicating the downloaded artifacts on computer.
I bet it's not just a windows issue.
Any path with space would fail on Linux and Mac too is my guess.
Fix is to always quote arguments when passing them to command line calls.
No silver bullet :)
I'll try on my Ubuntu Vm to update this issue saying that it isn't only on windows.
Most helpful comment
Hello, this problem is indeed caused by space in the path and I am experiencing it too in my Windows CI. I had to workaround it like this in my .m2/settings.xml:
Perhaps @maxandersen has the fix handy from the top of his head as he surely hit something like that with JBang at some point...