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
If you use quarkus-maven-plugin then QuarkusIntegrationTest allows to execute quarkus in a separate JVM using java command.
The setup can be this:
default Java version is 8
maven is executed with Java 11 (e.g. via setting $JAVA_HOME).
The result is : maven and everything inside it is executed using Java 11 as required for Quarkus.
But integration test executes java command disregarding maven: it runs a separate process.
I see this in DefaultJarLauncher:
List<String> args = new ArrayList<>();
args.add("java");
So it's just java command .
Everything works fine at the same time if you use QuarkusTest: the same JVM is used to run maven and quarkus.
So if you have working QuarkusTest and decides to make it QuarkusIntegrationTest then test may become broken.
The setup when some specific Java is used to run maven and another Java is a system default Java is a generic case for Continuous integration servers.
Expected behavior
There is a way to run proper java process: it either should somehow get info about Java from Maven (e.g. using JAVA_HOME) or it may provide a way to set the path to the Java command (or both).
Actual behavior
System default java command is used which may have a version below 11.
How to Reproduce?
Set Java 8 as a default Java.
Set JAVA_HOME to JDK 11.
Make a project with quarkus-maven-plugin
Make an integration test using QuarkusIntegrationTest.
Run it.
There will be an exception
Exception in thread "main" java.lang.UnsupportedClassVersionError: io/quarkus/bootstrap/runner/QuarkusEntryPoint has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
[13:24:44][Step 3/3] at java.lang.ClassLoader.defineClass1(Native Method)
Output of uname -a or ver
Linux, version 4.14.225-169.362.amzn2.x86_64
Output of java -version
Java 8
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.2.1.Final
Build tool (ie. output of mvnw --version or gradlew --version)
Describe the bug
If you use
quarkus-maven-plugin
thenQuarkusIntegrationTest
allows to execute quarkus in a separate JVM usingjava
command.The setup can be this:
The result is : maven and everything inside it is executed using Java 11 as required for Quarkus.
But integration test executes
java
command disregarding maven: it runs a separate process.I see this in
DefaultJarLauncher
:So it's just
java
command .Everything works fine at the same time if you use
QuarkusTest
: the same JVM is used to run maven and quarkus.So if you have working
QuarkusTest
and decides to make itQuarkusIntegrationTest
then test may become broken.The setup when some specific Java is used to run maven and another Java is a system default Java is a generic case for Continuous integration servers.
Expected behavior
There is a way to run proper
java
process: it either should somehow get info about Java from Maven (e.g. using JAVA_HOME) or it may provide a way to set the path to the Java command (or both).Actual behavior
System default java command is used which may have a version below 11.
How to Reproduce?
quarkus-maven-plugin
QuarkusIntegrationTest
.There will be an exception
Output of
uname -a
orver
Linux, version 4.14.225-169.362.amzn2.x86_64
Output of
java -version
Java 8
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.2.1.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
No response
quarkusio#20049
The text was updated successfully, but these errors were encountered: