diff --git a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java index 7f5c9e24f1..a15e379622 100644 --- a/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java +++ b/maven-core/src/main/java/org/apache/maven/plugin/DefaultPluginManager.java @@ -16,6 +16,7 @@ package org.apache.maven.plugin; */ import java.io.ByteArrayInputStream; +import java.io.File; import java.io.IOException; import java.io.StringReader; import java.util.ArrayList; @@ -382,7 +383,14 @@ public class DefaultPluginManager // This needs to be changed so that the resolver deals with this for ( Dependency d : pluginProject.getDependencies() ) { - pluginArtifacts.add( repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getScope(), d.getType() ) ); + Artifact dependencyArtifact = + repositorySystem.createArtifact( d.getGroupId(), d.getArtifactId(), d.getVersion(), d.getScope(), + d.getType() ); + if ( Artifact.SCOPE_SYSTEM.equals( dependencyArtifact.getScope() ) ) + { + dependencyArtifact.setFile( new File( d.getSystemPath() ) ); + } + pluginArtifacts.add( dependencyArtifact ); } if ( pluginProject != null )