Removing restrictions on adding pluginArtifacts to the test classpath in surefire, since they should go behind the classpath elements from the project...also adding system scope handling to the artifact facotry, so transitive dependencies on system-scoped deps are handled correctly.

git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@312958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
John Dennis Casey 2005-10-11 21:20:13 +00:00
parent 32841e4e03
commit 28e2b08266
3 changed files with 10 additions and 5 deletions

View File

@ -127,6 +127,11 @@ public class DefaultArtifactFactory
// added to retain compile scope. Remove if you want compile inherited as runtime
desiredScope = Artifact.SCOPE_COMPILE;
}
else if ( Artifact.SCOPE_SYSTEM.equals( scope ) )
{
// system scopes come through unchanged...
desiredScope = Artifact.SCOPE_SYSTEM;
}
if ( Artifact.SCOPE_TEST.equals( inheritedScope ) )
{

View File

@ -163,7 +163,7 @@ public class ResourcesMojo
private void initializeFiltering()
throws MojoExecutionException
{
filterProperties = new Properties();
filterProperties = new Properties( System.getProperties() );
for ( Iterator i = filters.iterator(); i.hasNext(); )
{
String filtersfile = (String) i.next();

View File

@ -272,12 +272,12 @@ public class SurefirePlugin
{
Artifact artifact = (Artifact) i.next();
if ( "junit".equals( artifact.getArtifactId() ) || "surefire".equals( artifact.getArtifactId() ) )
{
getLog().debug( artifact.getFile().getAbsolutePath() );
// if ( "junit".equals( artifact.getArtifactId() ) || "surefire".equals( artifact.getArtifactId() ) )
// {
getLog().debug( "Adding to surefire test classpath: " + artifact.getFile().getAbsolutePath() );
surefireBooter.addClassPathUrl( artifact.getFile().getAbsolutePath() );
}
// }
}
addReporters(surefireBooter);