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/26 01:48:31 UTC

svn commit: r1620485 - /maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java

Author: hboutemy
Date: Mon Aug 25 23:48:31 2014
New Revision: 1620485

URL: http://svn.apache.org/r1620485
Log:
revert mavenSession removel, since it is causing failure

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=1620485&r1=1620484&r2=1620485&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 Mon Aug 25 23:48:31 2014
@@ -360,6 +360,14 @@ public abstract class AbstractCompilerMo
     private MojoExecution mojoExecution;
 
     /**
+     * We need this to determine the start timestamp of the build.
+     *
+     * @since 3.0
+     */
+    @Parameter( defaultValue = "${session}", readonly = true, required = true )
+    protected MavenSession mavenSession; // TODO why not reuse "session"?
+
+    /**
      * file extensions to check timestamp for incremental build
      * <b>default contains only <code>.class</code></b>
      *
@@ -614,7 +622,7 @@ public abstract class AbstractCompilerMo
 
         boolean canUpdateTarget;
 
-        IncrementalBuildHelper incrementalBuildHelper = new IncrementalBuildHelper( mojoExecution, session );
+        IncrementalBuildHelper incrementalBuildHelper = new IncrementalBuildHelper( mojoExecution, mavenSession );
 
         Set<File> sources;
 
@@ -1160,7 +1168,7 @@ public abstract class AbstractCompilerMo
      */
     protected boolean isDependencyChanged()
     {
-        if ( session == null )
+        if ( mavenSession == null )
         {
             // we just cannot determine it, so don't do anything beside logging
             getLog().info( "Cannot determine build start date, skipping incremental build detection." );