mirror of https://github.com/apache/maven.git
utilise more sensible surefire directory battery
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@219867 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
cfb51d7036
commit
d56d3de13d
|
@ -54,7 +54,7 @@ public class SurefirePlugin
|
||||||
/**
|
/**
|
||||||
* @parameter expression="${maven.test.failure.ignore}"
|
* @parameter expression="${maven.test.failure.ignore}"
|
||||||
*/
|
*/
|
||||||
private boolean testFailureIgnore = false;
|
private boolean testFailureIgnore;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @parameter expression="${basedir}"
|
* @parameter expression="${basedir}"
|
||||||
|
@ -66,13 +66,13 @@ public class SurefirePlugin
|
||||||
* @parameter expression="${project.build.outputDirectory}"
|
* @parameter expression="${project.build.outputDirectory}"
|
||||||
* @required
|
* @required
|
||||||
*/
|
*/
|
||||||
private String classesDirectory;
|
private File classesDirectory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @parameter expression="${project.build.testOutputDirectory}"
|
* @parameter expression="${project.build.testOutputDirectory}"
|
||||||
* @required
|
* @required
|
||||||
*/
|
*/
|
||||||
private String testClassesDirectory;
|
private File testClassesDirectory;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @parameter expression="${project.testClasspathElements}"
|
* @parameter expression="${project.testClasspathElements}"
|
||||||
|
@ -190,7 +190,7 @@ public class SurefirePlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
surefireBooter.addBattery( "org.codehaus.surefire.battery.DirectoryBattery",
|
surefireBooter.addBattery( "org.codehaus.surefire.battery.DirectoryBattery",
|
||||||
new Object[]{basedir, includes, excludes} );
|
new Object[]{testClassesDirectory, includes, excludes} );
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------
|
// ----------------------------------------------------------------------
|
||||||
|
@ -212,9 +212,9 @@ public class SurefirePlugin
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
surefireBooter.addClassPathUrl( new File( classesDirectory ).getPath() );
|
surefireBooter.addClassPathUrl( classesDirectory.getPath() );
|
||||||
|
|
||||||
surefireBooter.addClassPathUrl( new File( testClassesDirectory ).getPath() );
|
surefireBooter.addClassPathUrl( testClassesDirectory.getPath() );
|
||||||
|
|
||||||
for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
|
for ( Iterator i = pluginArtifacts.iterator(); i.hasNext(); )
|
||||||
{
|
{
|
||||||
|
@ -231,7 +231,7 @@ public class SurefirePlugin
|
||||||
|
|
||||||
surefireBooter.addReport( "org.codehaus.surefire.report.FileReporter" );
|
surefireBooter.addReport( "org.codehaus.surefire.report.FileReporter" );
|
||||||
|
|
||||||
boolean success = false;
|
boolean success;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
success = surefireBooter.run();
|
success = surefireBooter.run();
|
||||||
|
@ -259,7 +259,7 @@ public class SurefirePlugin
|
||||||
|
|
||||||
protected String[] split( String str, String separator, int max )
|
protected String[] split( String str, String separator, int max )
|
||||||
{
|
{
|
||||||
StringTokenizer tok = null;
|
StringTokenizer tok;
|
||||||
if ( separator == null )
|
if ( separator == null )
|
||||||
{
|
{
|
||||||
// Null separator means we're using StringTokenizer's default
|
// Null separator means we're using StringTokenizer's default
|
||||||
|
@ -279,7 +279,7 @@ public class SurefirePlugin
|
||||||
|
|
||||||
String[] list = new String[listSize];
|
String[] list = new String[listSize];
|
||||||
int i = 0;
|
int i = 0;
|
||||||
int lastTokenBegin = 0;
|
int lastTokenBegin;
|
||||||
int lastTokenEnd = 0;
|
int lastTokenEnd = 0;
|
||||||
while ( tok.hasMoreTokens() )
|
while ( tok.hasMoreTokens() )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue