maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rfscho...@apache.org
Subject svn commit: r1741750 - in /maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler: AbstractCompilerMojo.java CompilerMojo.java TestCompilerMojo.java
Date Sat, 30 Apr 2016 11:32:15 GMT
Author: rfscholte
Date: Sat Apr 30 11:32:15 2016
New Revision: 1741750

URL: http://svn.apache.org/viewvc?rev=1741750&view=rev
Log:
Add -release support (new argument since java9)

Modified:
    maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
    maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
    maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java

Modified: maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?rev=1741750&r1=1741749&r2=1741750&view=diff
==============================================================================
--- maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
(original)
+++ maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
Sat Apr 30 11:32:15 2016
@@ -144,6 +144,12 @@ public abstract class AbstractCompilerMo
     protected String target;
 
     /**
+     * The -release argument for the Java compiler, supported since Java9
+     */
+    @Parameter( property = "maven.compiler.release" )
+    protected String release;
+    
+    /**
      * The -encoding argument for the Java compiler.
      *
      * @since 2.1
@@ -463,6 +469,8 @@ public abstract class AbstractCompilerMo
 
     protected abstract String getTarget();
 
+    protected abstract String getRelease();
+
     protected abstract String getCompilerArgument();
 
     protected abstract Map<String, String> getCompilerArguments();
@@ -575,6 +583,8 @@ public abstract class AbstractCompilerMo
         compilerConfiguration.setSourceVersion( getSource() );
 
         compilerConfiguration.setTargetVersion( getTarget() );
+        
+        compilerConfiguration.setReleaseVersion( getRelease() );
 
         compilerConfiguration.setProc( proc );
 

Modified: maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java?rev=1741750&r1=1741749&r2=1741750&view=diff
==============================================================================
--- maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
(original)
+++ maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/CompilerMojo.java
Sat Apr 30 11:32:15 2016
@@ -224,6 +224,13 @@ public class CompilerMojo
     {
         return target;
     }
+    
+    @Override
+    protected String getRelease()
+    {
+        return release;
+    }
+    
 
     protected String getCompilerArgument()
     {

Modified: maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java?rev=1741750&r1=1741749&r2=1741750&view=diff
==============================================================================
--- maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
(original)
+++ maven/plugins/branches/maven-compiler-plugin_jigsaw-ea/src/main/java/org/apache/maven/plugin/compiler/TestCompilerMojo.java
Sat Apr 30 11:32:15 2016
@@ -97,6 +97,8 @@ public class TestCompilerMojo
     @Parameter ( property = "maven.compiler.testTarget" )
     private String testTarget;
 
+    @Parameter ( property = "maven.compiler.testRelease" )
+    private String testRelease;
 
     /**
      * <p>
@@ -312,6 +314,12 @@ public class TestCompilerMojo
     {
         return testTarget == null ? target : testTarget;
     }
+    
+    @Override
+    protected String getRelease()
+    {
+        return testRelease == null ? release : testRelease;
+    }
 
     protected String getCompilerArgument()
     {



Mime
View raw message