Details
-
Type:
New Feature
-
Status: Closed (View Workflow)
-
Priority:
Minor
-
Resolution: Fixed
-
Component/s: pipeline-maven-plugin
-
Labels:None
-
Similar Issues:
Description
Since JENKINS-44721, pipeline jobs have the ability to be triggered by other pipeline jobs when one of their SNAPSHOT dependencies changes. While this works well already, there is a use case which was supported in the old Maven project type which is not supported any more, and that is the triggering when the parent of an artifact changes. An example scenario would be as follows:
Jenkins project A builds Maven modules a0, a1, a2, and so on. a0 is the parent POM of all a* modules.
Jenkins project B builds Maven modules b0, b1, b2, and so on. b0 is the parent POM of all b* modules. b0 uses a2 as its parent POM.
In the old Maven project, a dependency between A and B would have been established because of the parent dependency between b0 and a2. With the pipeline-maven-plugin, this is currently not the case, so a build of A does not trigger a new build of B.
This behavior could probably be recreated by reading the parent artifact from the POM and declaring it as additional dependency.
Attachments
Issue Links
- links to
Code changed in jenkins
User: Cyrille Le Clerc
Path:
Jenkinsfile
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginDao.java
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2Dao.java
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginNullDao.java
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/DependenciesLister.java
jenkins-plugin/src/main/java/org/jenkinsci/plugins/pipeline/maven/publishers/PipelineGraphPublisher.java
jenkins-plugin/src/main/resources/sql/h2/05_migration.sql
jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/AbstractIntegrationTest.java
jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/DependencyGraphTest.java
jenkins-plugin/src/test/java/org/jenkinsci/plugins/pipeline/maven/dao/PipelineMavenPluginH2DaoTest.java
jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_parent_pom_project/.gitignore
jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_parent_pom_project/pom.xml
jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_parent_pom_project/src/main/java/com/example/MonoModuleMavenApp.java
jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_jar_with_parent_pom_project/src/test/java/com/example/MonoModuleMavenAppTest.java
jenkins-plugin/src/test/resources/org/jenkinsci/plugins/pipeline/maven/test/test_maven_projects/maven_pom_project/pom.xml
maven-spy/src/main/java/org/jenkinsci/plugins/pipeline/maven/eventspy/handler/ProjectStartedExecutionHandler.java
http://jenkins-ci.org/commit/pipeline-maven-plugin/5aba93f4188b0f5e05ef24eb17fb9ab4643d5baf
Log:
JENKINS-46368Trigger downstream pipeline on Maven parent pom changes