You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by jd...@apache.org on 2010/05/22 00:31:29 UTC
svn commit: r947206 - in /maven/plugins/trunk/maven-compiler-plugin: ./
src/it/extras/ src/it/extras/with-copy/ src/it/extras/with-copy/src/
src/it/extras/with-copy/src/main/ src/it/extras/with-copy/src/main/extras/
src/it/extras/with-copy/src/main/ext...
Author: jdcasey
Date: Fri May 21 22:31:28 2010
New Revision: 947206
URL: http://svn.apache.org/viewvc?rev=947206&view=rev
Log:
[MCOMPILER-128] Add integration tests for cases where output of extra compilations are copied and are not copied to the respective mainstream output directories so they'll be available on the classpath.
Added:
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/pom.xml (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/Person.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/PersonTest.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/verify.bsh (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/pom.xml (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/Person.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/PersonTest.java (with props)
maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/verify.bsh (with props)
Modified:
maven/plugins/trunk/maven-compiler-plugin/pom.xml
maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileExtrasMojo.java
maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileTestExtrasMojo.java
Modified: maven/plugins/trunk/maven-compiler-plugin/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/pom.xml?rev=947206&r1=947205&r2=947206&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/pom.xml (original)
+++ maven/plugins/trunk/maven-compiler-plugin/pom.xml Fri May 21 22:31:28 2010
@@ -157,6 +157,7 @@ under the License.
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
<pomIncludes>
<pomInclude>*/pom.xml</pomInclude>
+ <pomInclude>extras/*/pom.xml</pomInclude>
</pomIncludes>
<postBuildHookScript>verify</postBuildHookScript>
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/pom.xml?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/pom.xml (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/pom.xml Fri May 21 22:31:28 2010
@@ -0,0 +1,81 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.plugins.compiler</groupId>
+ <artifactId>extras-with-copy</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Compiler Plugin IT::Extras With Copy</name>
+ <description>
+ Test compilation using compile-extras with copyOutput == true,
+ which should result in the extra classes being copied to target/classes and target/test-classes.
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>@project.version@</version>
+ <executions>
+ <execution>
+ <id>extras</id>
+ <goals>
+ <goal>compile-extras</goal>
+ </goals>
+ <configuration>
+ <sourceRoots>
+ <sourceRoot>src/main/extras</sourceRoot>
+ </sourceRoots>
+ <outputDirectory>${project.build.directory}/extra-classes</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test-extras</id>
+ <goals>
+ <goal>compile-test-extras</goal>
+ </goals>
+ <configuration>
+ <sourceRoots>
+ <sourceRoot>src/test/extras</sourceRoot>
+ </sourceRoots>
+ <outputDirectory>${project.build.directory}/extra-test-classes</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+public class PersonTwo
+{
+ private String name;
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/Person.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/Person.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/Person.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/Person.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+public class Person
+{
+ private String name;
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/main/java/org/apache/maven/it0055/Person.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+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/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/PersonTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/PersonTest.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/PersonTest.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/PersonTest.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+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/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/src/test/java/org/apache/maven/it0055/PersonTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/verify.bsh?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/verify.bsh (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/verify.bsh Fri May 21 22:31:28 2010
@@ -0,0 +1,63 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ File targetDir = new File( basedir, "target" );
+
+ File mainClass = new File( targetDir, "classes/org/apache/maven/it0055/Person.class" );
+ System.out.println( "Checking for existence of: " + mainClass );
+ if ( !mainClass.isFile() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraMainClassOrigin = new File( targetDir, "extra-classes/org/apache/maven/it0055/PersonTwo.class" );
+ System.out.println( "Checking for existence of: " + extraMainClassOrigin );
+ if ( !extraMainClassOrigin.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraMainClass = new File( targetDir, "classes/org/apache/maven/it0055/PersonTwo.class" );
+ System.out.println( "Checking for existence of: " + extraMainClass );
+ if ( !extraMainClass.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File testClass = new File( targetDir, "test-classes/org/apache/maven/it0055/PersonTest.class" );
+ System.out.println( "Checking for existence of: " + testClass );
+ if ( !testClass.isFile() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraTestClassOrigin = new File( targetDir, "extra-test-classes/org/apache/maven/it0055/PersonTwoTest.class" );
+ System.out.println( "Checking for existence of: " + extraTestClassOrigin );
+ if ( !extraTestClassOrigin.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraTestClass = new File( targetDir, "test-classes/org/apache/maven/it0055/PersonTwoTest.class" );
+ System.out.println( "Checking for existence of: " + extraTestClass );
+ if ( !extraTestClass.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/with-copy/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/pom.xml
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/pom.xml?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/pom.xml (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/pom.xml Fri May 21 22:31:28 2010
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<project>
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.maven.its.it0055</groupId>
+ <artifactId>maven-it-it0055</artifactId>
+ <version>1.0</version>
+ <packaging>jar</packaging>
+
+ <name>Maven Integration Test :: it0055</name>
+ <description>
+ Test that source includes/excludes with in the compiler plugin config.
+ This will test excludes and testExcludes...
+ </description>
+
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.2</version>
+ <type>jar</type>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>@project.version@</version>
+ <executions>
+ <execution>
+ <id>extras</id>
+ <goals>
+ <goal>compile-extras</goal>
+ </goals>
+ <configuration>
+ <copyOutput>false</copyOutput>
+ <sourceRoots>
+ <sourceRoot>src/main/extras</sourceRoot>
+ </sourceRoots>
+ <outputDirectory>${project.build.directory}/extra-classes</outputDirectory>
+ </configuration>
+ </execution>
+ <execution>
+ <id>test-extras</id>
+ <goals>
+ <goal>compile-test-extras</goal>
+ </goals>
+ <configuration>
+ <copyOutput>false</copyOutput>
+ <sourceRoots>
+ <sourceRoot>src/test/extras</sourceRoot>
+ </sourceRoots>
+ <outputDirectory>${project.build.directory}/extra-test-classes</outputDirectory>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/pom.xml
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+public class PersonTwo
+{
+ private String name;
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/extras/org/apache/maven/it0055/PersonTwo.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/Person.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/Person.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/Person.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/Person.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+public class Person
+{
+ private String name;
+
+ public void setName( String name )
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+}
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/main/java/org/apache/maven/it0055/Person.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+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/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/extras/org/apache/maven/it0055/PersonTwoTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/PersonTest.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/PersonTest.java?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/PersonTest.java (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/PersonTest.java Fri May 21 22:31:28 2010
@@ -0,0 +1,16 @@
+package org.apache.maven.it0055;
+
+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/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/src/test/java/org/apache/maven/it0055/PersonTest.java
------------------------------------------------------------------------------
svn:eol-style = native
Added: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/verify.bsh
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/verify.bsh?rev=947206&view=auto
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/verify.bsh (added)
+++ maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/verify.bsh Fri May 21 22:31:28 2010
@@ -0,0 +1,63 @@
+import java.io.*;
+import java.util.*;
+import java.util.regex.*;
+
+try
+{
+ File targetDir = new File( basedir, "target" );
+
+ File mainClass = new File( targetDir, "classes/org/apache/maven/it0055/Person.class" );
+ System.out.println( "Checking for existence of: " + mainClass );
+ if ( !mainClass.isFile() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraMainClassOrigin = new File( targetDir, "extra-classes/org/apache/maven/it0055/PersonTwo.class" );
+ System.out.println( "Checking for existence of: " + extraMainClassOrigin );
+ if ( !extraMainClassOrigin.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraMainClass = new File( targetDir, "classes/org/apache/maven/it0055/PersonTwo.class" );
+ System.out.println( "Checking for absence of: " + extraMainClass );
+ if ( extraMainClass.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File testClass = new File( targetDir, "test-classes/org/apache/maven/it0055/PersonTest.class" );
+ System.out.println( "Checking for existence of: " + testClass );
+ if ( !testClass.isFile() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraTestClassOrigin = new File( targetDir, "extra-test-classes/org/apache/maven/it0055/PersonTwoTest.class" );
+ System.out.println( "Checking for existence of: " + extraTestClassOrigin );
+ if ( !extraTestClassOrigin.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+
+ File extraTestClass = new File( targetDir, "test-classes/org/apache/maven/it0055/PersonTwoTest.class" );
+ System.out.println( "Checking for absence of: " + extraTestClass );
+ if ( extraTestClass.exists() )
+ {
+ System.err.println( "FAILED!" );
+ return false;
+ }
+}
+catch( Throwable t )
+{
+ t.printStackTrace();
+ return false;
+}
+
+return true;
Propchange: maven/plugins/trunk/maven-compiler-plugin/src/it/extras/without-copy/verify.bsh
------------------------------------------------------------------------------
svn:eol-style = native
Modified: maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileExtrasMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileExtrasMojo.java?rev=947206&r1=947205&r2=947206&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileExtrasMojo.java (original)
+++ maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileExtrasMojo.java Fri May 21 22:31:28 2010
@@ -19,7 +19,7 @@ package org.apache.maven.plugin;
* under the License.
*/
-import static org.codehaus.plexus.util.FileUtils.copyDirectory;
+import static org.codehaus.plexus.util.FileUtils.copyDirectoryStructure;
import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
@@ -154,7 +154,8 @@ public class CompileExtrasMojo
{
try
{
- copyDirectory( outputDirectory, mainOutputDirectory );
+ mainOutputDirectory.mkdirs();
+ copyDirectoryStructure( outputDirectory, mainOutputDirectory );
}
catch ( final IOException e )
{
Modified: maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileTestExtrasMojo.java
URL: http://svn.apache.org/viewvc/maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileTestExtrasMojo.java?rev=947206&r1=947205&r2=947206&view=diff
==============================================================================
--- maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileTestExtrasMojo.java (original)
+++ maven/plugins/trunk/maven-compiler-plugin/src/main/java/org/apache/maven/plugin/CompileTestExtrasMojo.java Fri May 21 22:31:28 2010
@@ -19,7 +19,7 @@ package org.apache.maven.plugin;
* under the License.
*/
-import static org.codehaus.plexus.util.FileUtils.copyDirectory;
+import static org.codehaus.plexus.util.FileUtils.copyDirectoryStructure;
import org.codehaus.plexus.compiler.util.scan.SimpleSourceInclusionScanner;
import org.codehaus.plexus.compiler.util.scan.SourceInclusionScanner;
@@ -168,7 +168,8 @@ public class CompileTestExtrasMojo
{
try
{
- copyDirectory( outputDirectory, testOutputDirectory );
+ testOutputDirectory.mkdirs();
+ copyDirectoryStructure( outputDirectory, testOutputDirectory );
}
catch ( final IOException e )
{