Skip to content

Commit 9b5494f

Browse files
committed
Make java command of "mvn -Pexec" configurable
Unfortunately, the value of JAVA_HOME is not preserved when forking the JVM. As a workaround, we can at least make it work to run: mvn -Pexec -Dscijava.exec.java="$JAVA_HOME/bin/java" Or similar, to force it.
1 parent 8cb62ba commit 9b5494f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

pom.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,9 @@
210210
<scijava.javadoc.url.java>https://javadoc.scijava.org/Java8/</scijava.javadoc.url.java>
211211
<scijava.javadoc.url.javafx>https://javadoc.scijava.org/JavaFX8/</scijava.javadoc.url.javafx>
212212

213+
<!-- Command to use when invoking java via "mvn -Pexec". -->
214+
<scijava.exec.java>java</scijava.exec.java>
215+
213216
<!--
214217
The coding-style property defines a coding style to be used in your project.
215218
Supported values as of this writing are scijava and imglib2.
@@ -1386,7 +1389,7 @@
13861389
<groupId>org.codehaus.mojo</groupId>
13871390
<artifactId>exec-maven-plugin</artifactId>
13881391
<configuration>
1389-
<executable>java</executable>
1392+
<executable>${scijava.exec.java}</executable>
13901393
<arguments>
13911394
<argument>-classpath</argument>
13921395
<classpath />

0 commit comments

Comments
 (0)