Author: brett
Date: Thu Mar 23 20:25:08 2006
New Revision: 388361

URL: http://svn.apache.org/viewcvs?rev=388361&view=rev
Log:
get tests to pass in the reactor

Added:
    
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
   (contents, props changed)
      - copied, changed from r388352, 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile1.java
    
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
   (contents, props changed)
      - copied, changed from r388352, 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile1.java
Removed:
    
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile1.java
    
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile1.java
Modified:
    
maven/plugins/trunk/maven-compiler-plugin/src/test/java/org/apache/maven/plugin/CompilerMojoTest.java
    
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/plugin-config.xml

Modified: 
maven/plugins/trunk/maven-compiler-plugin/src/test/java/org/apache/maven/plugin/CompilerMojoTest.java
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-compiler-plugin/src/test/java/org/apache/maven/plugin/CompilerMojoTest.java?rev=388361&r1=388360&r2=388361&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-compiler-plugin/src/test/java/org/apache/maven/plugin/CompilerMojoTest.java
 (original)
+++ 
maven/plugins/trunk/maven-compiler-plugin/src/test/java/org/apache/maven/plugin/CompilerMojoTest.java
 Thu Mar 23 20:25:08 2006
@@ -17,19 +17,22 @@
  */
 
 
-import org.codehaus.plexus.util.FileUtils;
 import org.apache.maven.plugins.testing.AbstractMojoTestCase;
+import org.codehaus.plexus.util.FileUtils;
 
 import java.io.File;
 
 public class CompilerMojoTest
     extends AbstractMojoTestCase
 {
-    protected void setUp() throws Exception {
+    protected void setUp()
+        throws Exception
+    {
 
         // required for mojo lookups to work
         super.setUp();
 
+        FileUtils.deleteDirectory( new File( getBasedir(), "target/test/unit" 
) );
     }
 
     /**
@@ -37,11 +40,13 @@
      *
      * @throws Exception
      */
-    public void testCompilerTestEnvironment() throws Exception {
+    public void testCompilerTestEnvironment()
+        throws Exception
+    {
 
         File testPom = new File( getBasedir(), 
"target/test-classes/unit/compiler-basic-test/plugin-config.xml" );
 
-        CompilerMojo mojo = (CompilerMojo) lookupMojo ("compile", testPom );
+        CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );
 
         assertNotNull( mojo );
     }
@@ -51,17 +56,20 @@
      *
      * @throws Exception
      */
-    public void testCompilerBasic() throws Exception {
-
+    public void testCompilerBasic()
+        throws Exception
+    {
         File testPom = new File( getBasedir(), 
"target/test-classes/unit/compiler-basic-test/plugin-config.xml" );
 
-        CompilerMojo mojo = (CompilerMojo) lookupMojo ("compile", testPom );
+        CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );
 
         assertNotNull( mojo );
 
         mojo.execute();
 
-        assertTrue( FileUtils.fileExists( 
"target/test/unit/compiler-basic-test/target/classes/TestCompile1.class" ) );
+        File testClass =
+            new File( getBasedir(), 
"target/test/unit/compiler-basic-test/target/classes/TestCompile0.class" );
+        assertTrue( FileUtils.fileExists( testClass.getAbsolutePath() ) );
     }
 
     /**
@@ -69,59 +77,77 @@
      *
      * @throws Exception
      */
-    public void testCompilerEmptySource() throws Exception {
+    public void testCompilerEmptySource()
+        throws Exception
+    {
 
-        File testPom = new File( getBasedir(), 
"target/test-classes/unit/compiler-empty-source-test/plugin-config.xml" );
+        File testPom =
+            new File( getBasedir(), 
"target/test-classes/unit/compiler-empty-source-test/plugin-config.xml" );
 
-        CompilerMojo mojo = (CompilerMojo) lookupMojo ("compile", testPom );
+        CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );
 
         assertNotNull( mojo );
 
         mojo.execute();
 
-        assertFalse( FileUtils.fileExists( 
"target/test/unit/compiler-empty-source-test/target/classes/TestCompile1.class" 
) );
+        File testClass =
+            new File( getBasedir(), 
"target/test/unit/compiler-empty-source-test/target/classes/TestCompile1.class" 
);
+        assertFalse( FileUtils.fileExists( testClass.getAbsolutePath() ) );
     }
 
-       /**
+    /**
      * tests the ability of the plugin to respond to includes and excludes 
correctly
      *
      * @throws Exception
      */
-    public void testCompilerIncludesExcludes() throws Exception
+    public void testCompilerIncludesExcludes()
+        throws Exception
     {
 
-        File testPom = new File( getBasedir(), 
"target/test-classes/unit/compiler-includes-excludes-test/plugin-config.xml" );
+        File testPom =
+            new File( getBasedir(), 
"target/test-classes/unit/compiler-includes-excludes-test/plugin-config.xml" );
 
-        CompilerMojo mojo = (CompilerMojo) lookupMojo ("compile", testPom );
+        CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );
 
         assertNotNull( mojo );
 
         mojo.execute();
 
-        assertTrue( FileUtils.fileExists( 
"target/test/unit/compiler-includes-excludes-test/target/classes/TestCompile1.class"
 ) );
-        assertFalse( FileUtils.fileExists( 
"target/test/unit/compiler-includes-excludes-test/target/classes/TestCompile2.class"
 ) );
-        assertFalse( FileUtils.fileExists( 
"target/test/unit/compiler-includes-excludes-test/target/classes/TestCompile3.class"
 ) );
+        File testClass = new File( getBasedir(),
+                                   
"target/test/unit/compiler-includes-excludes-test/target/classes/TestCompile4.class"
 );
+        assertTrue( FileUtils.fileExists( testClass.getAbsolutePath() ) );
+        File testClass2 = new File( getBasedir(),
+                                    
"target/test/unit/compiler-includes-excludes-test/target/classes/TestCompile2.class"
 );
+        assertFalse( FileUtils.fileExists( testClass2.getAbsolutePath() ) );
+        File testClass3 = new File( getBasedir(),
+                                    
"target/test/unit/compiler-includes-excludes-test/target/classes/TestCompile3.class"
 );
+        assertFalse( FileUtils.fileExists( testClass3.getAbsolutePath() ) );
     }
 
-       /**
+    /**
      * tests the ability of the plugin to fork and successfully compile
      *
      * @throws Exception
      */
-    public void testCompilerFork() throws Exception {
+    public void testCompilerFork()
+        throws Exception
+    {
 
         File testPom = new File( getBasedir(), 
"target/test-classes/unit/compiler-fork-test/plugin-config.xml" );
 
-        CompilerMojo mojo = (CompilerMojo) lookupMojo ("compile", testPom );
+        CompilerMojo mojo = (CompilerMojo) lookupMojo( "compile", testPom );
 
         assertNotNull( mojo );
 
         mojo.execute();
 
-        assertTrue( FileUtils.fileExists( 
"target/test/unit/compiler-fork-test/target/classes/TestCompile1.class" ) );
+        assertTrue( FileUtils.fileExists( new File( getBasedir(),
+                                                    
"target/test/unit/compiler-fork-test/target/classes/TestCompile1.class" 
).getAbsolutePath() ) );
     }
 
-    protected void tearDown() throws Exception {
+    protected void tearDown()
+        throws Exception
+    {
 
         //FileUtils.deleteDirectory( new File ("target/test/unit/compiler") );
 

Copied: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
 (from r388352, 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile1.java)
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java?p2=maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java&p1=maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile1.java&r1=388352&r2=388361&rev=388361&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile1.java
 (original)
+++ 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
 Thu Mar 23 20:25:08 2006
@@ -1,9 +1,9 @@
 
 
-public class TestCompile1
+public class TestCompile0
 {
 
-    public TestCompile1()
+    public TestCompile0()
     {
 
         System.out.println("Woo Hoo!");

Propchange: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-basic-test/src/main/java/TestCompile0.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"

Modified: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/plugin-config.xml
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/plugin-config.xml?rev=388361&r1=388360&r2=388361&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/plugin-config.xml
 (original)
+++ 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/plugin-config.xml
 Thu Mar 23 20:25:08 2006
@@ -13,7 +13,7 @@
             -->
             <!--
             <includes>
-                <includes>**/TestCompile1.java</includes>
+                <includes>**/TestCompile4.java</includes>
             </includes>
             <excludes>
               <exclude>**/TestCompile*.java</exclude>
@@ -21,7 +21,7 @@
             -->
 
           <includes>
-                <includes>**/TestCompile1.java</includes>
+                <includes>**/TestCompile4.java</includes>
           </includes>
           <excludes>
               <exclude>**/TestCompile2.java</exclude>

Copied: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
 (from r388352, 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile1.java)
URL: 
http://svn.apache.org/viewcvs/maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java?p2=maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java&p1=maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile1.java&r1=388352&r2=388361&rev=388361&view=diff
==============================================================================
--- 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile1.java
 (original)
+++ 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
 Thu Mar 23 20:25:08 2006
@@ -1,9 +1,9 @@
 
 
-public class TestCompile1
+public class TestCompile4
 {
 
-    public TestCompile1()
+    public TestCompile4()
     {
 
         System.out.println("Woo Hoo!");

Propchange: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
maven/plugins/trunk/maven-compiler-plugin/src/test/resources/unit/compiler-includes-excludes-test/src/main/java/TestCompile4.java
------------------------------------------------------------------------------
    svn:keywords = "Author Date Id Revision"


Reply via email to