prevent write files in scm tree during tests
git-svn-id: https://svn.apache.org/repos/asf/maven/plugin-tools/branches/MPLUGIN-189@1337277 13f79535-47bb-0310-9956-ffa450edef68master
parent
2eef7a412b
commit
73885abdbc
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ package org.apache.maven.tools.plugin.extractor.java;
|
|||
*/
|
||||
|
||||
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 JavaMojoDescriptorExtractorTest
|
|||
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() );
|
||||
|
|
|
|||
Loading…
Reference in New Issue