Author: jdcasey
Date: Mon Aug 22 16:14:34 2005
New Revision: 239272

URL: http://svn.apache.org/viewcvs?rev=239272&view=rev
Log:
Resolving: MNG-643

o Added includes/excludes for compile and testCompile
o added integration tests for single execution of compile and testCompile with 
excludes
o Added integration test for multiple execution of compile in different phases 
per Dan Tran's request

The bulk of this commit is KrisBravo's work (I think that's who Corridor 
Software Developer is??). Thanks for the help.



Added:
    maven/components/trunk/maven-core-it/it0055/
    maven/components/trunk/maven-core-it/it0055/expected-results.txt   (with 
props)
    maven/components/trunk/maven-core-it/it0055/goals.txt   (with props)
    maven/components/trunk/maven-core-it/it0055/pom.xml   (with props)
    maven/components/trunk/maven-core-it/it0055/src/
    maven/components/trunk/maven-core-it/it0055/src/main/
    maven/components/trunk/maven-core-it/it0055/src/main/java/
    maven/components/trunk/maven-core-it/it0055/src/main/java/org/
    maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/
    maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/
    
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/
    
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java
   (with props)
    
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java
   (with props)
    maven/components/trunk/maven-core-it/it0055/src/main/resources/
    
maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties
   (with props)
    maven/components/trunk/maven-core-it/it0055/src/test/
    maven/components/trunk/maven-core-it/it0055/src/test/java/
    maven/components/trunk/maven-core-it/it0055/src/test/java/org/
    maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/
    maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/
    
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/
    
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java
   (with props)
    
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
   (with props)
    maven/components/trunk/maven-core-it/it0056/
    maven/components/trunk/maven-core-it/it0056/expected-results.txt   (with 
props)
    maven/components/trunk/maven-core-it/it0056/goals.txt   (with props)
    maven/components/trunk/maven-core-it/it0056/pom.xml   (with props)
    maven/components/trunk/maven-core-it/it0056/src/
    maven/components/trunk/maven-core-it/it0056/src/main/
    maven/components/trunk/maven-core-it/it0056/src/main/java/
    maven/components/trunk/maven-core-it/it0056/src/main/java/org/
    maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/
    maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/
    
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/
    
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java
   (with props)
    
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java
   (with props)
    
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java
   (with props)
    maven/components/trunk/maven-core-it/it0056/src/main/resources/
    
maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties
   (with props)
    maven/components/trunk/maven-core-it/it0056/src/test/
    maven/components/trunk/maven-core-it/it0056/src/test/java/
    maven/components/trunk/maven-core-it/it0056/src/test/java/org/
    maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/
    maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/
    
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/
    
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java
   (with props)
    
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
   (with props)
    
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
   (with props)
Modified:
    maven/components/trunk/maven-core-it/README.txt
    maven/components/trunk/maven-core-it/integration-tests.txt
    maven/components/trunk/maven-plugins/maven-compiler-plugin/pom.xml
    
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
    
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
    
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java

Modified: maven/components/trunk/maven-core-it/README.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/README.txt?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/README.txt (original)
+++ maven/components/trunk/maven-core-it/README.txt Mon Aug 22 16:14:34 2005
@@ -153,6 +153,12 @@
 it0054: Test that locally defined repositories override those from the super
         POM. This is from MNG-479.
 
+it0055: Test that source includes/excludes with in the compiler plugin config.
+        This will test excludes and testExcludes...
+
+it0056: Test that multiple executions of the compile goal with different
+        includes/excludes will succeed.
+
 -------------------------------------------------------------------------------
 
 - generated sources

Modified: maven/components/trunk/maven-core-it/integration-tests.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/integration-tests.txt?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- maven/components/trunk/maven-core-it/integration-tests.txt (original)
+++ maven/components/trunk/maven-core-it/integration-tests.txt Mon Aug 22 
16:14:34 2005
@@ -1,4 +1,7 @@
+it0056
+it0055
 it0054
+it0053
 it0052
 it0051
 it0050

Added: maven/components/trunk/maven-core-it/it0055/expected-results.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/expected-results.txt?rev=239272&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0055/expected-results.txt (added)
+++ maven/components/trunk/maven-core-it/it0055/expected-results.txt Mon Aug 22 
16:14:34 2005
@@ -0,0 +1,4 @@
+target/classes/org/apache/maven/it0001/Person.class
+target/test-classes/org/apache/maven/it0001/PersonTest.class
+!target/classes/org/apache/maven/it0001/PersonTwo.class
+!target/test-classes/org/apache/maven/it0001/PersonTwoTest.class

Propchange: maven/components/trunk/maven-core-it/it0055/expected-results.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0055/expected-results.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0055/goals.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/goals.txt?rev=239272&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0055/goals.txt (added)
+++ maven/components/trunk/maven-core-it/it0055/goals.txt Mon Aug 22 16:14:34 
2005
@@ -0,0 +1 @@
+test-compile

Propchange: maven/components/trunk/maven-core-it/it0055/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0055/goals.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0055/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/pom.xml?rev=239272&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0055/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0055/pom.xml Mon Aug 22 16:14:34 2005
@@ -0,0 +1,33 @@
+<model>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>maven-core-it0055</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0</version>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <type>jar</type>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <excludes>
+            <exclude 
implementation="java.lang.String">**/PersonTwo.java</exclude>
+          </excludes>
+          <testExcludes>
+            <testExclude 
implementation="java.lang.String">**/PersonTwoTest.java</testExclude>
+          </testExcludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+</model>

Propchange: maven/components/trunk/maven-core-it/it0055/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0055/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+public class Person
+{
+    private String name;
+    
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+    
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/Person.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+public class PersonTwo
+{
+    private String name;
+    
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+    
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/main/java/org/apache/maven/it0001/PersonTwo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties
 (added)
+++ 
maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1 @@
+name = jason

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/main/resources/it0001.properties
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonTest
+    extends TestCase
+{
+    public void testPerson()
+    {
+        Person person = new Person();
+        
+        person.setName( "foo" );
+        
+        assertEquals( "foo", person.getName() );
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonTwoTest
+    extends TestCase
+{
+    public void testPerson()
+    {
+        Person person = new Person();
+        
+        person.setName( "foo" );
+        
+        assertEquals( "foo", person.getName() );
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0055/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0056/expected-results.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/expected-results.txt?rev=239272&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0056/expected-results.txt (added)
+++ maven/components/trunk/maven-core-it/it0056/expected-results.txt Mon Aug 22 
16:14:34 2005
@@ -0,0 +1,6 @@
+target/classes/org/apache/maven/it0001/Person.class
+target/classes/org/apache/maven/it0001/PersonTwo.class
+target/classes/org/apache/maven/it0001/PersonThree.class
+target/test-classes/org/apache/maven/it0001/PersonTest.class
+target/test-classes/org/apache/maven/it0001/PersonTwoTest.class
+target/test-classes/org/apache/maven/it0001/PersonThreeTest.class

Propchange: maven/components/trunk/maven-core-it/it0056/expected-results.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0056/expected-results.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0056/goals.txt
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/goals.txt?rev=239272&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0056/goals.txt (added)
+++ maven/components/trunk/maven-core-it/it0056/goals.txt Mon Aug 22 16:14:34 
2005
@@ -0,0 +1 @@
+test-compile

Propchange: maven/components/trunk/maven-core-it/it0056/goals.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0056/goals.txt
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: maven/components/trunk/maven-core-it/it0056/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/pom.xml?rev=239272&view=auto
==============================================================================
--- maven/components/trunk/maven-core-it/it0056/pom.xml (added)
+++ maven/components/trunk/maven-core-it/it0056/pom.xml Mon Aug 22 16:14:34 2005
@@ -0,0 +1,42 @@
+<model>
+  <modelVersion>4.0.0</modelVersion>
+  <groupId>org.apache.maven</groupId>
+  <artifactId>maven-core-it0056</artifactId>
+  <packaging>jar</packaging>
+  <version>1.0</version>
+  <dependencies>
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <type>jar</type>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <executions>
+          <execution>
+            <id>validation-phase-execution</id>
+            <phase>validate</phase>
+            <goals>
+              <goal>compile</goal>
+            </goals>
+            <configuration>
+              <excludes>
+                <exclude 
implementation="java.lang.String">**/PersonTwo.java</exclude>
+              </excludes>
+              <testExcludes>
+                <testExclude 
implementation="java.lang.String">**/PersonTwoTest.java</testExclude>
+              </testExcludes>
+            </configuration>
+          </execution>
+        </executions>
+      </plugin>
+    </plugins>
+  </build>
+</model>

Propchange: maven/components/trunk/maven-core-it/it0056/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: maven/components/trunk/maven-core-it/it0056/pom.xml
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+public class Person
+{
+    private String name;
+    
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+    
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/Person.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+public class PersonThree
+{
+    private String name;
+    
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+    
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonThree.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+public class PersonTwo
+{
+    private String name;
+    
+    public void setName( String name )
+    {
+        this.name = name;
+    }
+    
+    public String getName()
+    {
+        return name;
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/java/org/apache/maven/it0001/PersonTwo.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1 @@
+name = jason

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/main/resources/it0001.properties
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonTest
+    extends TestCase
+{
+    public void testPerson()
+    {
+        Person person = new Person();
+        
+        person.setName( "foo" );
+        
+        assertEquals( "foo", person.getName() );
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonThreeTest
+    extends TestCase
+{
+    public void testPerson()
+    {
+        Person person = new Person();
+        
+        person.setName( "foo" );
+        
+        assertEquals( "foo", person.getName() );
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonThreeTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Added: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java?rev=239272&view=auto
==============================================================================
--- 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
 (added)
+++ 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
 Mon Aug 22 16:14:34 2005
@@ -0,0 +1,16 @@
+package org.apache.maven.it0001;
+
+import junit.framework.TestCase;
+
+public class PersonTwoTest
+    extends TestCase
+{
+    public void testPerson()
+    {
+        Person person = new Person();
+        
+        person.setName( "foo" );
+        
+        assertEquals( "foo", person.getName() );
+    }
+}

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/components/trunk/maven-core-it/it0056/src/test/java/org/apache/maven/it0001/PersonTwoTest.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: maven/components/trunk/maven-plugins/maven-compiler-plugin/pom.xml
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-compiler-plugin/pom.xml?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- maven/components/trunk/maven-plugins/maven-compiler-plugin/pom.xml 
(original)
+++ maven/components/trunk/maven-plugins/maven-compiler-plugin/pom.xml Mon Aug 
22 16:14:34 2005
@@ -27,7 +27,6 @@
       <artifactId>plexus-compiler-javac</artifactId>
       <version>1.5-SNAPSHOT</version>
       <scope>runtime</scope>
-      <version>1.5-SNAPSHOT</version>
     </dependency>
     <dependency>
       <groupId>plexus</groupId>

Modified: 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/AbstractCompilerMojo.java
 Mon Aug 22 16:14:34 2005
@@ -24,16 +24,13 @@
 import org.codehaus.plexus.compiler.manager.CompilerManager;
 import org.codehaus.plexus.compiler.manager.NoSuchCompilerException;
 import org.codehaus.plexus.compiler.util.scan.InclusionScanException;
-import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
 import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
-import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
 import 
org.codehaus.plexus.compiler.util.scan.mapping.SingleTargetSourceMapping;
 import org.codehaus.plexus.compiler.util.scan.mapping.SourceMapping;
 import org.codehaus.plexus.compiler.util.scan.mapping.SuffixMapping;
 
 import java.io.File;
 import java.util.ArrayList;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -114,13 +111,6 @@
     private String compilerId;
 
     /**
-     * Version of the compiler to use, ex. "1.3", "1.5"
-     *
-     * @parameter
-     */
-    private String compilerVersion;
-
-    /**
      * Runs the compiler in a separate process.
      * <p/>
      * If not set the compiler will default to a executable.
@@ -183,6 +173,10 @@
      */
     private CompilerManager compilerManager;
 
+    protected abstract SourceInclusionScanner getSourceInclusionScanner( int 
staleMillis );
+
+    protected abstract SourceInclusionScanner getSourceInclusionScanner( 
String inputFileEnding );
+
     protected abstract List getClasspathElements();
 
     protected abstract List getCompileSourceRoots();
@@ -267,24 +261,19 @@
 
         try
         {
-            staleSources = computeStaleSources( compilerConfiguration,
-                                                compiler,
-                                                new StaleSourceScanner( 
staleMillis ) );
+            staleSources = computeStaleSources( compilerConfiguration, 
compiler, getSourceInclusionScanner( staleMillis ) );
 
             canUpdateTarget = compiler.canUpdateTarget( compilerConfiguration 
);
 
-            if ( compiler.getCompilerOutputStyle() == 
CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES &&
-                 !canUpdateTarget )
+            if ( compiler.getCompilerOutputStyle() == 
CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES
+                && !canUpdateTarget )
             {
                 getLog().info( "RESCANNING!" );
                 // TODO: This second scan for source files is sub-optimal
                 String inputFileEnding = compiler.getInputFileEnding( 
compilerConfiguration );
 
-                Set includes = Collections.singleton( "**/*." + 
inputFileEnding );
-
-                Set sources = computeStaleSources( compilerConfiguration,
-                                                   compiler,
-                                                   new 
SimpleSourceInclusionScanner( includes, Collections.EMPTY_SET ));
+                Set sources = computeStaleSources( compilerConfiguration, 
compiler,
+                                                   getSourceInclusionScanner( 
inputFileEnding ) );
 
                 compilerConfiguration.setSourceFiles( sources );
             }
@@ -364,9 +353,8 @@
         }
     }
 
-    private Set computeStaleSources( CompilerConfiguration 
compilerConfiguration,
-                                     Compiler compiler,
-                                     SourceInclusionScanner scanner )
+    private Set computeStaleSources( CompilerConfiguration 
compilerConfiguration, Compiler compiler,
+                                    SourceInclusionScanner scanner )
         throws MojoExecutionException, CompilerException
     {
         CompilerOutputStyle outputStyle = compiler.getCompilerOutputStyle();
@@ -377,15 +365,15 @@
 
         if ( outputStyle == CompilerOutputStyle.ONE_OUTPUT_FILE_PER_INPUT_FILE 
)
         {
-            mapping = new SuffixMapping( compiler.getInputFileEnding( 
compilerConfiguration ),
-                                         compiler.getOutputFileEnding( 
compilerConfiguration ) );
+            mapping = new SuffixMapping( compiler.getInputFileEnding( 
compilerConfiguration ), compiler
+                .getOutputFileEnding( compilerConfiguration ) );
 
             outputDirectory = getOutputDirectory();
         }
         else if ( outputStyle == 
CompilerOutputStyle.ONE_OUTPUT_FILE_FOR_ALL_INPUT_FILES )
         {
-            mapping = new SingleTargetSourceMapping( 
compiler.getInputFileEnding( compilerConfiguration ),
-                                                     compiler.getOutputFile( 
compilerConfiguration ) );
+            mapping = new SingleTargetSourceMapping( 
compiler.getInputFileEnding( compilerConfiguration ), compiler
+                .getOutputFile( compilerConfiguration ) );
 
             outputDirectory = buildDirectory;
         }
@@ -415,8 +403,8 @@
             }
             catch ( InclusionScanException e )
             {
-                throw new MojoExecutionException( "Error scanning source root: 
\'" + sourceRoot + "\' " +
-                                                  "for stale files to 
recompile.", e );
+                throw new MojoExecutionException( "Error scanning source root: 
\'" + sourceRoot + "\' "
+                    + "for stale files to recompile.", e );
             }
         }
 

Modified: 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompilerMojo.java
 Mon Aug 22 16:14:34 2005
@@ -17,8 +17,14 @@
  */
 
 import org.apache.maven.artifact.Artifact;
+import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
+import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
+import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
 
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import java.io.File;
 
 /**
@@ -61,6 +67,18 @@
      */
     private Artifact projectArtifact;
 
+    /**
+     * A list of inclusion filters for the compiler.
+     * @parameter
+     */
+    private Set includes = new HashSet();
+
+    /**
+     * A list of exclusion filters for the compiler.
+     * @parameter
+     */
+    private Set excludes = new HashSet();
+
     protected List getCompileSourceRoots()
     {
         return compileSourceRoots;
@@ -83,4 +101,46 @@
 
         projectArtifact.setFile( outputDirectory );
     }
+
+    protected SourceInclusionScanner getSourceInclusionScanner( int 
staleMillis )
+    {
+        SourceInclusionScanner scanner = null;
+
+        if ( includes.isEmpty() && excludes.isEmpty() )
+        {
+            scanner = new StaleSourceScanner( staleMillis );
+        }
+        else
+        {
+            if ( includes.isEmpty() )
+            {
+                includes.add( "**/*.java" );
+            }
+            scanner = new StaleSourceScanner( staleMillis, includes, excludes 
);
+        }
+
+        return scanner;
+    }
+
+    protected SourceInclusionScanner getSourceInclusionScanner( String 
inputFileEnding )
+    {
+        SourceInclusionScanner scanner = null;
+
+        if ( includes.isEmpty() && excludes.isEmpty() )
+        {
+            includes = Collections.singleton( "**/*." + inputFileEnding );
+            scanner = new SimpleSourceInclusionScanner( includes, 
Collections.EMPTY_SET );
+        }
+        else
+        {
+            if ( includes.isEmpty() )
+            {
+                includes.add( "**/*." + inputFileEnding );
+            }
+            scanner = new SimpleSourceInclusionScanner( excludes, excludes );
+        }
+
+        return scanner;
+    }
+
 }

Modified: 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java
URL: 
http://svn.apache.org/viewcvs/maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java?rev=239272&r1=239271&r2=239272&view=diff
==============================================================================
--- 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java
 (original)
+++ 
maven/components/trunk/maven-plugins/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/TestCompilerMojo.java
 Mon Aug 22 16:14:34 2005
@@ -16,7 +16,14 @@
  * limitations under the License.
  */
 
+import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
+import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
+import org.codehaus.plexus.compiler.util.scan.StaleSourceScanner;
+
+import java.util.Collections;
+import java.util.HashSet;
 import java.util.List;
+import java.util.Set;
 import java.io.File;
 
 /**
@@ -51,6 +58,18 @@
      */
     private File outputDirectory;
 
+    /**
+     * A list of inclusion filters for the compiler.
+     * @parameter
+     */
+    private Set testIncludes = new HashSet();
+
+    /**
+     * A list of exclusion filters for the compiler.
+     * @parameter
+     */
+    private Set testExcludes = new HashSet();
+
     protected List getCompileSourceRoots()
     {
         return compileSourceRoots;
@@ -64,6 +83,47 @@
     protected File getOutputDirectory()
     {
         return outputDirectory;
+    }
+
+    protected SourceInclusionScanner getSourceInclusionScanner( int 
staleMillis )
+    {
+        SourceInclusionScanner scanner = null;
+
+        if ( testIncludes.isEmpty() && testExcludes.isEmpty() )
+        {
+            scanner = new StaleSourceScanner( staleMillis );
+        }
+        else
+        {
+            if ( testIncludes.isEmpty() )
+            {
+                testIncludes.add( "**/*.java" );
+            }
+            scanner = new StaleSourceScanner( staleMillis, testIncludes, 
testExcludes );
+        }
+
+        return scanner;
+    }
+
+    protected SourceInclusionScanner getSourceInclusionScanner( String 
inputFileEnding )
+    {
+        SourceInclusionScanner scanner = null;
+
+        if ( testIncludes.isEmpty() && testExcludes.isEmpty() )
+        {
+            testIncludes = Collections.singleton( "**/*." + inputFileEnding );
+            scanner = new SimpleSourceInclusionScanner( testIncludes, 
Collections.EMPTY_SET );
+        }
+        else
+        {
+            if ( testIncludes.isEmpty() )
+            {
+                testIncludes.add( "**/*." + inputFileEnding );
+            }
+            scanner = new SimpleSourceInclusionScanner( testExcludes, 
testExcludes );
+        }
+
+        return scanner;
     }
 
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to