File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
src/main/java/scala_maven Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -497,11 +497,9 @@ private DependencyNodeFilter createScalaDistroDependencyFilter() throws Exceptio
497497 final JavaMainCaller getScalaCommand (final boolean forkOverride , final String mainClass )
498498 throws Exception {
499499 JavaMainCaller cmd = getEmptyScalaCommand (mainClass , forkOverride );
500- cmd .addArgs (args );
501- if (StringUtils .isNotEmpty (addScalacArgs )) {
502- cmd .addArgs (StringUtils .split (addScalacArgs , "|" ));
500+ for (String option : getScalacOptions ()) {
501+ cmd .addArgs (option );
503502 }
504- addCompilerPluginOptions (cmd );
505503 cmd .addJvmArgs (jvmArgs );
506504 return cmd ;
507505 }
@@ -627,8 +625,11 @@ protected List<String> getScalacOptions() throws Exception {
627625 }
628626 }
629627 if (release != null && !release .isEmpty ()) {
630- options .add ("-release" );
631- options .add (release );
628+ VersionNumber scalaVersion = findScalaVersion ();
629+ if (scalaVersion .major > 2 || (scalaVersion .major == 2 && scalaVersion .minor >= 12 )) {
630+ options .add ("-release" );
631+ options .add (release );
632+ }
632633 }
633634
634635 return options ;
You can’t perform that action at this time.
0 commit comments