mirror of
https://github.com/apache/maven.git
synced 2025-03-01 06:09:24 +00:00
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:
parent
32841e4e03
commit
28e2b08266
@ -127,6 +127,11 @@ else if ( Artifact.SCOPE_COMPILE.equals( scope ) && Artifact.SCOPE_COMPILE.equal
|
||||
// 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 ) )
|
||||
{
|
||||
|
@ -163,7 +163,7 @@ protected void copyResources( List resources, String outputDirectory )
|
||||
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();
|
||||
|
@ -272,12 +272,12 @@ public void execute()
|
||||
{
|
||||
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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user