Building a native executable with <quarkus.native.reuse-existing>true</quarkus.native.reuse-existing> set, and compression enabled, leads to a failing build, when the artifact already exists.
Expected behavior
The plugin skips the compression step for the already compressed executable, and the build is finished without error.
Actual behavior
The build fails with:
Build step io.quarkus.deployment.pkg.steps.UpxCompressionBuildStep#compress threw an exception: java.lang.IllegalStateException: Unable to compress the native executable
How to Reproduce?
quarkus create
add the following properties to the native profile in pom.xml. <quarkus.native.container-build>true</quarkus.native.container-build> <quarkus.native.reuse-existing>true</quarkus.native.reuse-existing> <quarkus.native.compression.level>1</quarkus.native.compression.level>
mvn package -DskipTests -Dnative
When running the build a 2nd time (mvn package -DskipTests -Dnative) the build fails, because the plugin tries to recompress the already compressed executable.
Output of uname -a or ver
Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64
Output of java -version
java 22.0.1 2024-04-16
Mandrel or GraalVM version (if different from Java)
Describe the bug
Building a native executable with
<quarkus.native.reuse-existing>true</quarkus.native.reuse-existing>
set, and compression enabled, leads to a failing build, when the artifact already exists.Expected behavior
The plugin skips the compression step for the already compressed executable, and the build is finished without error.
Actual behavior
The build fails with:
Build step io.quarkus.deployment.pkg.steps.UpxCompressionBuildStep#compress threw an exception: java.lang.IllegalStateException: Unable to compress the native executable
How to Reproduce?
<quarkus.native.container-build>true</quarkus.native.container-build>
<quarkus.native.reuse-existing>true</quarkus.native.reuse-existing>
<quarkus.native.compression.level>1</quarkus.native.compression.level>
mvn package -DskipTests -Dnative
mvn package -DskipTests -Dnative
) the build fails, because the plugin tries to recompress the already compressed executable.Output of
uname -a
orver
Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:09:52 PDT 2024; root:xnu-10063.121.3~5/RELEASE_X86_64 x86_64
Output of
java -version
java 22.0.1 2024-04-16
Mandrel or GraalVM version (if different from Java)
quay.io/quarkus/ubi-quarkus-mandrel-builder-image:jdk-21
Quarkus version or git rev
3.11.3
Build tool (ie. output of
mvnw --version
orgradlew --version
)Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Additional information
No response