monperrus commented on a change in pull request #3: [MCOMPILER-205] fixes 
incremental compilation
URL: 
https://github.com/apache/maven-compiler-plugin/pull/3#discussion_r270634580
 
 

 ##########
 File path: 
src/main/java/org/apache/maven/plugin/compiler/AbstractCompilerMojo.java
 ##########
 @@ -775,36 +775,16 @@ else if ( 
CompilerConfiguration.CompilerReuseStrategy.ReuseSame.getStrategy().eq
 
         IncrementalBuildHelperRequest incrementalBuildHelperRequest = null;
 
-        if ( useIncrementalCompilation )
+        if ( !useIncrementalCompilation )
         {
-            getLog().debug( "useIncrementalCompilation enabled" );
+            getLog().debug( "useIncrementalCompilation disabled" );
             try
             {
                 canUpdateTarget = compiler.canUpdateTarget( 
compilerConfiguration );
 
                 sources = getCompileSources( compiler, compilerConfiguration );
-                
+                compilerConfiguration.setSourceFiles( sources );
                 preparePaths( sources );
-
-                incrementalBuildHelperRequest = new 
IncrementalBuildHelperRequest().inputFiles( sources );
-
-                // CHECKSTYLE_OFF: LineLength
-                if ( ( compiler.getCompilerOutputStyle().equals( 
CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES ) && !canUpdateTarget )
 
 Review comment:
   this simplification is on purpose for regular behavior and maintainability: 
we are not using incremental compilation, so we consider all sources.
   
   the else branch is responsible for detecting stale changes. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to