-
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;
[JENKINS-42302] maven-shade-plugin uses a temporary project file "dependency-reduced-pom.xml" that is deleted when "withMaven()" collects the artifacts
Assignee | Original: Alvaro Lobato [ alobato ] | New: Cyrille Le Clerc [ cleclerc ] |
Description |
Original:
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. https://github.com/apache/maven-plugins/blob/3964d2a2c3b5d2c3b73b8685755e772cfabeea40/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java {code:java} @Mojo( name = "shade", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.RUNTIME ) 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} |
New:
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. https://github.com/apache/maven-plugins/blob/3964d2a2c3b5d2c3b73b8685755e772cfabeea40/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java {code:java} @Mojo( name = "shade", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.RUNTIME ) 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} |
Description |
Original:
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. https://github.com/apache/maven-plugins/blob/3964d2a2c3b5d2c3b73b8685755e772cfabeea40/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java {code:java} @Mojo( name = "shade", defaultPhase = LifecyclePhase.PACKAGE, threadSafe = true, requiresDependencyResolution = ResolutionScope.RUNTIME ) 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} |
New:
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. https://github.com/apache/maven-plugins/blob/3964d2a2c3b5d2c3b73b8685755e772cfabeea40/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java {code} 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} |
Description |
Original:
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. https://github.com/apache/maven-plugins/blob/3964d2a2c3b5d2c3b73b8685755e772cfabeea40/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java {code} 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} |
New:
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. https://github.com/apache/maven-plugins/blob/3964d2a2c3b5d2c3b73b8685755e772cfabeea40/maven-shade-plugin/src/main/java/org/apache/maven/plugins/shade/mojo/ShadeMojo.java {code} 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} |
Resolution | New: Fixed [ 1 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
Status | Original: Resolved [ 5 ] | New: Closed [ 6 ] |
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”.