You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
The quarkus-maven-plugin fails with an exception if it's configured with a finalName using a directory that doesn't exist. I think this was working in previous versions, so looks like a regression.
Then mvn clean package will fail with an exception like this one:
[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:1.0.0.CR2:build (default) on project server-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.JarResultBuildStep#buildRunnerJar threw an exception: java.lang.IllegalStateException: java.io.IOException: Failed to create a new filesystem for jar:file:/tmp/test/target/non-existing-dir/server-quarkus-1.0-SNAPSHOT-runner.jar
[ERROR] at io.quarkus.deployment.ExtensionLoader$1.execute(ExtensionLoader.java:950)
[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.base/java.lang.Thread.run(Thread.java:834)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:479)
[ERROR] Caused by: java.io.IOException: Failed to create a new filesystem for jar:file:/tmp/test/target/non-existing-dir/server-quarkus-1.0-SNAPSHOT-runner.jar
[ERROR] at io.quarkus.bootstrap.util.ZipUtils.newFileSystem(ZipUtils.java:150)
[ERROR] at io.quarkus.bootstrap.util.ZipUtils.newZip(ZipUtils.java:102)
[ERROR] at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildThinJar(JarResultBuildStep.java:295)
[ERROR] at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildRunnerJar(JarResultBuildStep.java:141)
[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$1.execute(ExtensionLoader.java:941)
[ERROR] ... 7 more
[ERROR] Caused by: java.nio.file.NoSuchFileException: /tmp/test/target/non-existing-dir/server-quarkus-1.0-SNAPSHOT-runner.jar
[ERROR] at java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:92)
[ERROR] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111)
[ERROR] at java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:116)
[ERROR] at java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:219)
[ERROR] at java.base/java.nio.file.spi.FileSystemProvider.newOutputStream(FileSystemProvider.java:478)
[ERROR] at java.base/java.nio.file.Files.newOutputStream(Files.java:219)
[ERROR] at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.<init>(ZipFileSystem.java:112)
[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:143)
[ERROR] ... 15 more
[ERROR] -> [Help 1]
[ERROR]
The text was updated successfully, but these errors were encountered:
More info, even after creating the directory manually, looks like the jar fails to work and I get an exception stating that Caused by: java.lang.ClassNotFoundException: io.quarkus.runtime.Application.
When removing the finalName from the config, the generated JAR works properly.
UPDATE: This looks like it's a misunderstanding on my part, the generated jar is not a fat jar and somehow loads other jars in the lib directory even when not passing them to the classpath, so this is unrelated to this issue
Describe the bug
The
quarkus-maven-plugin
fails with an exception if it's configured with afinalName
using a directory that doesn't exist. I think this was working in previous versions, so looks like a regression.To Reproduce
In your pom.xml
Then
mvn clean package
will fail with an exception like this one:The text was updated successfully, but these errors were encountered: