quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.83k stars 2.7k forks source link

Cannot build TODO demo app on windows into uber-jar since quarkus 3.16.1 #44576

Closed mocenas closed 2 days ago

mocenas commented 3 days ago

Trying to build this app on windows 2022, with java 17.0.10. Using command:

mvn clean -Dquarkus.package.jar.type=uber-jar -DskipTests=true -Dquarkus.platform.version=3.16.1 package

It fails on:

[ERROR] Failed to execute goal io.quarkus:quarkus-maven-plugin:3.16.1:build (default) on project todo-backend: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR]         [error]: Build step io.quarkus.deployment.pkg.steps.JarResultBuildStep#buildRunnerJar threw an exception: java.lang.reflect.UndeclaredThrowableException
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:862)
[ERROR]         at io.quarkus.builder.BuildContext.run(BuildContext.java:256)
[ERROR]         at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2675)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2654)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1627)
[ERROR]         at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1594)
[ERROR]         at java.base/java.lang.Thread.run(Thread.java:840)
[ERROR]         at org.jboss.threads.JBossThread.run(JBossThread.java:499)
[ERROR] Caused by: java.nio.file.NoSuchFileException: /META-INF/resources/app
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.checkParents(ZipFileSystem.java:1162)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystem.newOutputStream(ZipFileSystem.java:843)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipPath.newOutputStream(ZipPath.java:905)
[ERROR]         at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.newOutputStream(ZipFileSystemProvider.java:268)
[ERROR]         at java.base/java.nio.file.Files.newOutputStream(Files.java:228)
[ERROR]         at io.quarkus.deployment.pkg.steps.JarResultBuildStep.copyCommonContent(JarResultBuildStep.java:1251)
[ERROR]         at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildUberJar0(JarResultBuildStep.java:433)
[ERROR]         at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildUberJar(JarResultBuildStep.java:292)
[ERROR]         at io.quarkus.deployment.pkg.steps.JarResultBuildStep.buildRunnerJar(JarResultBuildStep.java:219)
[ERROR]         at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:732)
[ERROR]         at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:856)
[ERROR]         ... 8 more

Fails with same error with any quarkus build since 3.16.1 including current 999-SNAPSHOT.

Building on linux is not affected by this.

cescoffier commented 3 days ago

@aloubyansky @gsmet @geoand This looks suspicious. Did we change anything in this area?

gsmet commented 3 days ago

Probably :)

I think it warrants a Quarkus issue and investigation. Somehow the parent directory is missing in the zip.

gsmet commented 2 days ago

I transferred the issue to the main repo.

jedla97 commented 2 days ago

@mocenas can you try it with https://github.com/quarkusio/quarkus/pull/44584 . It worked for me but want to make sure.

mocenas commented 2 days ago

@mocenas can you try it with #44584 . It worked for me but want to make sure.

I tried it and yes this solves the problem.