additional system properties are not passed as arguments to native execution during maven verify
See original GitHub issueDescribe the bug
Additional system properties, which are configured inside the <systemProperties>
attribute in the maven-failsafe-plugin part, are not passed as arguments to native execution during maven verify.
For example:
... <configuration> <systemProperties> <native.image.path>${project.build.directory}/${project.build.finalName}-runner</native.image.path> <quarkus.http.test-port>8444</quarkus.http.test-port> <test.url>https://localhost:8444</test.url> <java.library.path>native-libs</java.library.path> </systemProperties> </configuration>
…
The values for <quarkus.http.test-port>
and <test.url>
are applied correctly but the value for <java.library.path>
is not appended to the execute command (see behaviour below).
Expected behavior
The output in the log states:
Executing [/home/daniel/IdeaProjects/lmt2-server/target/lmt2-server-1.0-SNAPSHOT-runner, -Dquarkus.http.port=8444, -Dtest.url=http://localhost:8444, -Dquarkus.log.file.path=target/quarkus.log, -Djava.library.path=native-libs]
Actual behavior
The output in the log states:
Executing [/home/daniel/IdeaProjects/lmt2-server/target/lmt2-server-1.0-SNAPSHOT-runner, -Dquarkus.http.port=8444, -Dtest.url=http://localhost:8444, -Dquarkus.log.file.path=target/quarkus.log]
To Reproduce Steps to reproduce the behavior:
- Add some system property to the configuration of the maven-failsafe-plugin
- Execute mvn verify -Pnative
Environment (please complete the following information):
- Linux xxxxxxxxxxxx 4.15.0-70-generic #79-Ubuntu SMP Tue Nov 12 10:36:11 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux openjdk version “1.8.0_232” OpenJDK Runtime Environment (build 1.8.0_232-20191008104205.buildslave.jdk8u-src-tar–b07) OpenJDK 64-Bit GraalVM CE 19.2.1 (build 25.232-b07-jvmci-19.2-b03, mixed mode) Quarkus Version 1.0
Issue Analytics
- State:
- Created 4 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Thank you @benDeMtp, that has helped me a lot. Indeed it’s using the property when I put it there 👍
I think during verify, the native image is already build. So properties from quarkus.native.additional-build-args will be ignore, because the build is already done. The problem described here is for other systemProperties needed for run tests (like proxy settings). In this case a QuarkusTestProfile or QuarkusTestResourceLifecycleManager should do the trick.
@pantaoran, In your case, I think you have a problem with your package phase You should have something like these settings in your pom.xml