-
Bug
-
Resolution: Fixed
-
Minor
-
None
maven-shade-plugin uses a temporary project file "dependency-reduced-pom.xml" instead of "pom.xml" and deletes this temporary file "dependency-reduced-pom.xml" at the end of the build.
When withMaven() processes the build report, the file basedir/dependency-reduced-pom.xml no longer exist.
public class ShadeMojo extends AbstractMojo implements Contextualizable { /** * Flag whether to generate a simplified POM for the shaded artifact. If set to <code>true</code>, dependencies that * have been included into the uber JAR will be removed from the <code><dependencies></code> section of the * generated POM. The reduced POM will be named <code>dependency-reduced-pom.xml</code> and is stored into the same * directory as the shaded artifact. Unless you also specify dependencyReducedPomLocation, the plugin will create a * temporary file named <code>dependency-reduced-pom.xml</code> in the project basedir. */ @Parameter( defaultValue = "true" ) 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. * * @since 1.7 */ @Parameter( defaultValue = "${basedir}/dependency-reduced-pom.xml" ) private File dependencyReducedPomLocation;
Code changed in jenkins
User: Cyrille Le Clerc
Path:
maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/AbstractMavenEventHandler.java
http://jenkins-ci.org/commit/pipeline-maven-plugin/510a7d0e43349b8e930194636742f8a225c08bad
Log:
JENKINS-42302tweak Maven project file handling in case of maven-shade-plugin usage.Ignore temporary project file "dependency-reduced-pom.xml" and use "pom.xml”.