diff --git a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java index 4d5a74162d..be3240fbe0 100644 --- a/maven-project/src/main/java/org/apache/maven/project/MavenProject.java +++ b/maven-project/src/main/java/org/apache/maven/project/MavenProject.java @@ -1663,7 +1663,9 @@ public class MavenProject at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:115) at org.apache.maven.cli.MavenCli.main(MavenCli.java:256) */ - return ArtifactUtils.copyArtifact(attached); + Artifact resultArtifact=ArtifactUtils.copyArtifact(attached); + resultArtifact.setScope(pluginArtifact.getScope()); + return resultArtifact; } } }