You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by hb...@apache.org on 2012/05/27 22:36:46 UTC

svn commit: r1343091 - in /maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin: AbstractCompilerMojo.java CompilerMojo.java TestCompilerMojo.java

Author: hboutemy
Date: Sun May 27 20:36:45 2012
New Revision: 1343091

URL: http://svn.apache.org/viewvc?rev=1343091&view=rev
Log:
used latest improvement of maven-plugin-tools 3.0-SNAPSHOT

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

Modified: maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?rev=1343091&r1=1343090&r2=1343091&view=diff
==============================================================================
--- maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java (original)
+++ maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java Sun May 27 20:36:45 2012
@@ -71,49 +71,49 @@ public abstract class AbstractCompilerMo
      *
      * @since 2.0.2
      */
-    @Parameter( expression = "${maven.compiler.failOnError}", defaultValue = "true" )
+    @Parameter( property = "maven.compiler.failOnError", defaultValue = "true" )
     private boolean failOnError = true;
 
     /**
      * Set to <code>true</code> to include debugging information in the compiled class files.
      */
-    @Parameter( expression = "${maven.compiler.debug}", defaultValue = "true" )
+    @Parameter( property = "maven.compiler.debug", defaultValue = "true" )
     private boolean debug = true;
 
     /**
      * Set to <code>true</code> to show messages about what the compiler is doing.
      */
-    @Parameter( expression = "${maven.compiler.verbose}", defaultValue = "false" )
+    @Parameter( property = "maven.compiler.verbose", defaultValue = "false" )
     private boolean verbose;
 
     /**
      * Sets whether to show source locations where deprecated APIs are used.
      */
-    @Parameter( expression = "${maven.compiler.showDeprecation}", defaultValue = "false" )
+    @Parameter( property = "maven.compiler.showDeprecation", defaultValue = "false" )
     private boolean showDeprecation;
 
     /**
      * Set to <code>true</code> to optimize the compiled code using the compiler's optimization methods.
      */
-    @Parameter( expression = "${maven.compiler.optimize}", defaultValue = "false" )
+    @Parameter( property = "maven.compiler.optimize", defaultValue = "false" )
     private boolean optimize;
 
     /**
      * Set to <code>true</code> to show compilation warnings.
      */
-    @Parameter( expression = "${maven.compiler.showWarnings}", defaultValue = "false" )
+    @Parameter( property = "maven.compiler.showWarnings", defaultValue = "false" )
     private boolean showWarnings;
 
     /**
      * The -source argument for the Java compiler.
      */
-    @Parameter( expression = "${maven.compiler.source}", defaultValue = "1.5" )
+    @Parameter( property = "maven.compiler.source", defaultValue = "1.5" )
     protected String source;
 
     /**
      * The -target argument for the Java compiler.
      */
-    @Parameter( expression = "${maven.compiler.target}", defaultValue = "1.5" )
+    @Parameter( property = "maven.compiler.target", defaultValue = "1.5" )
     protected String target;
 
     /**
@@ -121,34 +121,34 @@ public abstract class AbstractCompilerMo
      *
      * @since 2.1
      */
-    @Parameter( expression = "${encoding}", defaultValue = "${project.build.sourceEncoding}" )
+    @Parameter( property = "encoding", defaultValue = "${project.build.sourceEncoding}" )
     private String encoding;
 
     /**
      * Sets the granularity in milliseconds of the last modification
      * date for testing whether a source needs recompilation.
      */
-    @Parameter( expression = "${lastModGranularityMs}", defaultValue = "0" )
+    @Parameter( property = "lastModGranularityMs", defaultValue = "0" )
     private int staleMillis;
 
     /**
      * The compiler id of the compiler to use. See this
      * <a href="non-javac-compilers.html">guide</a> for more information.
      */
-    @Parameter( expression = "${maven.compiler.compilerId}", defaultValue = "javac" )
+    @Parameter( property = "maven.compiler.compilerId", defaultValue = "javac" )
     private String compilerId;
 
     /**
      * Version of the compiler to use, ex. "1.3", "1.5", if {@link #fork} is set to <code>true</code>.
      */
-    @Parameter( expression = "${maven.compiler.compilerVersion}" )
+    @Parameter( property = "maven.compiler.compilerVersion" )
     private String compilerVersion;
 
     /**
      * Allows running the compiler in a separate process.
      * If <code>false</code> it uses the built in compiler, while if <code>true</code> it will use an executable.
      */
-    @Parameter( expression = "${maven.compiler.fork}", defaultValue = "false" )
+    @Parameter( property = "maven.compiler.fork", defaultValue = "false" )
     private boolean fork;
 
     /**
@@ -157,7 +157,7 @@ public abstract class AbstractCompilerMo
      *
      * @since 2.0.1
      */
-    @Parameter( expression = "${maven.compiler.meminitial}" )
+    @Parameter( property = "maven.compiler.meminitial" )
     private String meminitial;
 
     /**
@@ -166,13 +166,13 @@ public abstract class AbstractCompilerMo
      *
      * @since 2.0.1
      */
-    @Parameter( expression = "${maven.compiler.maxmem}" )
+    @Parameter( property = "maven.compiler.maxmem" )
     private String maxmem;
 
     /**
      * Sets the executable of the compiler to use when {@link #fork} is <code>true</code>.
      */
-    @Parameter( expression = "${maven.compiler.executable}" )
+    @Parameter( property = "maven.compiler.executable" )
     private String executable;
 
     /**
@@ -257,7 +257,7 @@ public abstract class AbstractCompilerMo
      *
      * @since 2.1
      */
-    @Parameter( expression = "${maven.compiler.debuglevel}" )
+    @Parameter( property = "maven.compiler.debuglevel" )
     private String debuglevel;
 
     /**
@@ -291,7 +291,7 @@ public abstract class AbstractCompilerMo
     /**
      * The current build session instance. This is used for toolchain manager API calls.
      */
-    @Parameter( defaultValue = "${session}", required = true, readonly = true )
+    @Component
     private MavenSession session;
 
     /**
@@ -306,13 +306,13 @@ public abstract class AbstractCompilerMo
      *
      * @since 2.5
      */
-    @Parameter( defaultValue = "${reuseCreated}", expression = "${maven.compiler.compilerReuseStrategy}" )
+    @Parameter( defaultValue = "${reuseCreated}", property = "maven.compiler.compilerReuseStrategy" )
     private String compilerReuseStrategy = "reuseCreated";
 
     /**
      * @since 2.5
      */
-    @Parameter( defaultValue = "${false}", expression = "${maven.compiler.skipMultiThreadWarning}" )
+    @Parameter( defaultValue = "false", property = "maven.compiler.skipMultiThreadWarning" )
     private boolean skipMultiThreadWarning;
 
     protected abstract SourceInclusionScanner getSourceInclusionScanner( int staleMillis );

Modified: maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/CompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/CompilerMojo.java?rev=1343091&r1=1343090&r2=1343091&view=diff
==============================================================================
--- maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/CompilerMojo.java (original)
+++ maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/CompilerMojo.java Sun May 27 20:36:45 2012
@@ -20,7 +20,7 @@ package org.apache.maven.plugin;
  */
 
 import org.apache.maven.artifact.Artifact;
-import org.apache.maven.plugins.annotations.DependencyScope;
+import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
@@ -42,7 +42,7 @@ import java.util.Set;
  * @since 2.0
  */
 @org.apache.maven.plugins.annotations.Mojo( name = "compile", defaultPhase = LifecyclePhase.COMPILE, threadSafe = true,
-                                            requiresDependencyResolution = DependencyScope.COMPILE )
+                                            requiresDependencyResolution = ResolutionScope.COMPILE )
 public class CompilerMojo
     extends AbstractCompilerMojo
 {

Modified: maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java?rev=1343091&r1=1343090&r2=1343091&view=diff
==============================================================================
--- maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java (original)
+++ maven/plugins/branches/maven-compiler-plugin-annotations/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java Sun May 27 20:36:45 2012
@@ -19,7 +19,7 @@ package org.apache.maven.plugin;
  * under the License.
  */
 
-import org.apache.maven.plugins.annotations.DependencyScope;
+import org.apache.maven.plugins.annotations.ResolutionScope;
 import org.apache.maven.plugins.annotations.LifecyclePhase;
 import org.apache.maven.plugins.annotations.Parameter;
 import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
@@ -41,7 +41,7 @@ import java.util.Set;
  * @since 2.0
  */
 @org.apache.maven.plugins.annotations.Mojo( name = "testCompile", defaultPhase = LifecyclePhase.TEST_COMPILE,
-                                            threadSafe = true, requiresDependencyResolution = DependencyScope.TEST )
+                                            threadSafe = true, requiresDependencyResolution = ResolutionScope.TEST )
 public class TestCompilerMojo
     extends AbstractCompilerMojo
 {
@@ -49,7 +49,7 @@ public class TestCompilerMojo
      * Set this to 'true' to bypass compilation of test sources.
      * Its use is NOT RECOMMENDED, but quite convenient on occasion.
      */
-    @Parameter( expression = "${maven.test.skip}" )
+    @Parameter( property = "maven.test.skip" )
     private boolean skip;
 
     /**
@@ -87,7 +87,7 @@ public class TestCompilerMojo
      *
      * @since 2.1
      */
-    @Parameter( expression = "${maven.compiler.testSource}" )
+    @Parameter( property = "maven.compiler.testSource" )
     private String testSource;
 
     /**
@@ -95,7 +95,7 @@ public class TestCompilerMojo
      *
      * @since 2.1
      */
-    @Parameter( expression = "${maven.compiler.testTarget}" )
+    @Parameter( property = "maven.compiler.testTarget" )
     private String testTarget;