diff --git a/src/it/projects/dep-reduced-pom/pom.xml b/src/it/projects/dep-reduced-pom/pom.xml index 44b5ad9d..bbe2aa0f 100644 --- a/src/it/projects/dep-reduced-pom/pom.xml +++ b/src/it/projects/dep-reduced-pom/pom.xml @@ -73,6 +73,28 @@ under the License. + + org.apache.maven.plugins + maven-enforcer-plugin + 3.0.0 + + + enforce-basedir-is-not-changed + + enforce + + package + + + + basedir + + + + + + + diff --git a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java index c87b31ce..831abbb5 100644 --- a/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java +++ b/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java @@ -251,9 +251,7 @@ public class ShadeMojo extends AbstractMojo { private boolean createDependencyReducedPom; /** - * Where to put the dependency reduced pom. Note: setting a value for this parameter with a directory other than - * ${basedir} will change the value of ${basedir} for all executions that come after the shade execution. This is - * often not what you want. This is considered an open issue with this plugin. + * Where to put the dependency reduced pom. * * @since 1.7 */ @@ -1226,7 +1224,7 @@ private void rewriteDependencyReducedPomIfWeHaveReduction( } } - project.setFile(dependencyReducedPomLocation); + project.setPomFile(dependencyReducedPomLocation); } }