Author: agudian
Date: Thu Jan 21 19:43:20 2016
New Revision: 1726074

URL: http://svn.apache.org/viewvc?rev=1726074&view=rev
Log:
[MCOMPILER-235] do not add files from generatedSourcesDirectory to the list of 
source files to compile.

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=1726074&r1=1726073&r2=1726074&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
 Thu Jan 21 19:43:20 2016
@@ -563,7 +563,8 @@ public abstract class AbstractCompilerMo
         compilerConfiguration.setProc( proc );
 
         File generatedSourcesDirectory = getGeneratedSourcesDirectory();
-        compilerConfiguration.setGeneratedSourcesDirectory( 
generatedSourcesDirectory );
+        compilerConfiguration.setGeneratedSourcesDirectory( 
generatedSourcesDirectory != null
+                        ? generatedSourcesDirectory.getAbsoluteFile() : null );
 
         if ( generatedSourcesDirectory != null )
         {
@@ -1052,7 +1053,8 @@ public abstract class AbstractCompilerMo
         {
             File rootFile = new File( sourceRoot );
 
-            if ( !rootFile.isDirectory() )
+            if ( !rootFile.isDirectory()
+                || rootFile.getAbsoluteFile().equals( 
compilerConfiguration.getGeneratedSourcesDirectory() ) )
             {
                 continue;
             }


Reply via email to