I get build errors when using mvn unleash:perform
because it tries to use the default Java VM to build the release instead of the one pointed to with JAVA_HOME
or the one which was used to start the maven-unleash-plugin.
With -Dunleash.releaseArgs="--debug=true" -X
, I can see that the outer Maven uses Java 11 and the inner uses 8.
I tried to fix this with:
mvn unleash:perform -Dunleash.releaseEnvironment="JAVA_HOME=$JAVA_HOME" -X |& tee mvn.log
but that leads to an NPE:
Caused by: java.lang.NullPointerException
at com.itemis.maven.plugins.unleash.steps.actions.BuildProject.setupInvocationRequest (BuildProject.java:123)
at com.itemis.maven.plugins.unleash.steps.actions.BuildProject.execute (BuildProject.java:73)
Is changing the default VM in Windows my only option?