Author: olamy
Date: Fri May 11 16:46:01 2012
New Revision: 1337277

URL: http://svn.apache.org/viewvc?rev=1337277&view=rev
Log:
prevent write files in scm tree during tests

Modified:
    maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/pom.xml
    
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java

Modified: 
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/pom.xml?rev=1337277&r1=1337276&r2=1337277&view=diff
==============================================================================
--- maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/pom.xml 
(original)
+++ maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/pom.xml Fri 
May 11 16:46:01 2012
@@ -76,4 +76,18 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+          <systemPropertyVariables>
+            <filePath>${project.build.directory}</filePath>
+          </systemPropertyVariables>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
 </project>

Modified: 
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java
URL: 
http://svn.apache.org/viewvc/maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java?rev=1337277&r1=1337276&r2=1337277&view=diff
==============================================================================
--- 
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java
 (original)
+++ 
maven/plugin-tools/branches/MPLUGIN-189/maven-plugin-tools-java/src/test/java/org/apache/maven/tools/plugin/extractor/java/JavaMojoDescriptorExtractorTest.java
 Fri May 11 16:46:01 2012
@@ -20,6 +20,7 @@ package org.apache.maven.tools.plugin.ex
  */
 
 import junit.framework.TestCase;
+import org.apache.maven.model.Build;
 import org.apache.maven.model.Model;
 import org.apache.maven.plugin.descriptor.MojoDescriptor;
 import org.apache.maven.plugin.descriptor.Parameter;
@@ -77,6 +78,13 @@ public class JavaMojoDescriptorExtractor
         model.setArtifactId( "maven-unitTesting-plugin" );
 
         MavenProject project = new MavenProject( model );
+        project.setBuild( new Build(){
+            @Override
+            public String getOutputDirectory()
+            {
+                return System.getProperty( "filePath" );
+            }
+        });
 
         project.setFile( new File( root, "pom.xml" ) );
         project.addCompileSourceRoot( new File( root, directory ).getPath() );


Reply via email to