File tree Expand file tree Collapse file tree 1 file changed +5
-2
lines changed
platform-tooling-support-tests/src/main/java/platform/tooling/support Expand file tree Collapse file tree 1 file changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -55,12 +55,15 @@ public static ProcessStarter maven() {
5555 }
5656
5757 public static ProcessStarter maven (Path javaHome ) {
58- return new ProcessStarter () //
58+ var starter = new ProcessStarter () //
5959 .executable (Path .of (System .getProperty ("mavenDistribution" )).resolve ("bin" ).resolve (
6060 windowsOrOtherExecutable ("mvn.cmd" , "mvn" )).toAbsolutePath ()) //
6161 .putEnvironment ("JAVA_HOME" , javaHome ) //
62- .putEnvironment ("MAVEN_OPTS" , "--enable-final-field-mutation=ALL-UNNAMED" ) //
6362 .addArguments ("-Djunit.version=" + Helper .version ());
63+ if (Runtime .version ().feature () >= 26 ) {
64+ starter .putEnvironment ("MAVEN_OPTS" , "--enable-final-field-mutation=ALL-UNNAMED" );
65+ }
66+ return starter ;
6467 }
6568
6669 private static String windowsOrOtherExecutable (String cmdOrExe , String other ) {
You can’t perform that action at this time.
0 commit comments