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 2014/08/25 00:24:27 UTC
svn commit: r1620216 -
/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
Author: hboutemy
Date: Sun Aug 24 22:24:27 2014
New Revision: 1620216
URL: http://svn.apache.org/r1620216
Log:
Injection via @Parameter instead of @Component
Modified:
maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
Modified: maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java?rev=1620216&r1=1620215&r2=1620216&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java (original)
+++ maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java Sun Aug 24 22:24:27 2014
@@ -320,7 +320,7 @@ public abstract class AbstractCompilerMo
/**
* The current build session instance. This is used for toolchain manager API calls.
*/
- @Component
+ @Parameter( defaultValue = "${session}", readonly = true, required = true )
private MavenSession session;
/**
@@ -356,18 +356,10 @@ public abstract class AbstractCompilerMo
/**
* @since 3.0 needed for storing the status for the incremental build support.
*/
- @Parameter( property = "mojoExecution" )
+ @Parameter( property = "mojoExecution", readonly = true, required = true )
private MojoExecution mojoExecution;
/**
- * We need this to determine the start timestamp of the build.
- *
- * @since 3.0
- */
- @Component
- protected MavenSession mavenSession;
-
- /**
* file extensions to check timestamp for incremental build
* <b>default contains only <code>.class</code></b>
*
@@ -622,7 +614,7 @@ public abstract class AbstractCompilerMo
boolean canUpdateTarget;
- IncrementalBuildHelper incrementalBuildHelper = new IncrementalBuildHelper( mojoExecution, mavenSession );
+ IncrementalBuildHelper incrementalBuildHelper = new IncrementalBuildHelper( mojoExecution, session );
Set<File> sources;
@@ -1168,7 +1160,7 @@ public abstract class AbstractCompilerMo
*/
protected boolean isDependencyChanged()
{
- if ( mavenSession == null )
+ if ( session == null )
{
// we just cannot determine it, so don't do anything beside logging
getLog().info( "Cannot determine build start date, skipping incremental build detection." );