We have a maven job Foo with 10 downstream dependencies. In the Job page all the dependencies are noted clearly as well as on the the actual build page. Hower some of the downstream Jobs show with "(none)" instead of their build number and the log of the Foo build shows the "Triggering a new build of xxxx" lines, but only for 7 out of the 10 that should be triggered.

      Jenkins clearly knows about the SNAPSHOT dependency and shows the downstream relationship correctly, yet it 'forgets' to trigger some of the jobs.

      Confirmed with 1.550 and 1.551.

          [JENKINS-21903] Not all maven downstream jobs get triggered

          Stephane Odul added a comment -

          Still present in 1.553. I have a job with 15 downstream projects listed and only 5 are actually triggered.

          Stephane Odul added a comment - Still present in 1.553. I have a job with 15 downstream projects listed and only 5 are actually triggered.

          Stephane Odul added a comment -

          Also present in 1.558

          Stephane Odul added a comment - Also present in 1.558

          I thought this was affecting us as well, but after looking into it a bit it turns out that what was happening triggered by the logic in here https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/AbstractMavenProject.java with the comment "Check to see if any of its upstream dependencies are already building or in queue"

          So we had dependencies A -> C, A -> B, and B -> C (much deeper in practice of course), and after module A deployed, only module B would trigger, and C would only build after B finished. I'm not sure if this is what's happening to you but figured I'd mention it.

          Personally I think it would be nice if this could be disabled via a configuration-- most of the time I'd rather have a few extra wasteful CI builds than wait a long time for the most downstream project to finally build.

          Benjamin Podgursky added a comment - I thought this was affecting us as well, but after looking into it a bit it turns out that what was happening triggered by the logic in here https://github.com/jenkinsci/maven-plugin/blob/master/src/main/java/hudson/maven/AbstractMavenProject.java with the comment "Check to see if any of its upstream dependencies are already building or in queue" So we had dependencies A -> C, A -> B, and B -> C (much deeper in practice of course), and after module A deployed, only module B would trigger, and C would only build after B finished. I'm not sure if this is what's happening to you but figured I'd mention it. Personally I think it would be nice if this could be disabled via a configuration-- most of the time I'd rather have a few extra wasteful CI builds than wait a long time for the most downstream project to finally build.

          Jesse Glick added a comment -

          Linking to a discussion on the list.

          Jesse Glick added a comment - Linking to a discussion on the list.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/AbstractMavenProject.java
          http://jenkins-ci.org/commit/maven-plugin/0ff6a1bad777d16fa2852833bc22243bd7d32e13
          Log:
          [FIXED JENKINS-21903] Unless the user has requested to block when upstream is building, do not skip triggering a downstream build just because an upstream is building.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProject.java http://jenkins-ci.org/commit/maven-plugin/0ff6a1bad777d16fa2852833bc22243bd7d32e13 Log: [FIXED JENKINS-21903] Unless the user has requested to block when upstream is building, do not skip triggering a downstream build just because an upstream is building.

          Code changed in jenkins
          User: Jesse Glick
          Path:
          src/main/java/hudson/maven/AbstractMavenProject.java
          src/main/java/hudson/maven/MavenModuleSet.java
          src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly
          src/main/webapp/blockTriggerWhenBuilding.html
          src/test/java/hudson/maven/MavenModuleSetTest.java
          http://jenkins-ci.org/commit/maven-plugin/8aed1aa0e352d51229daba470d1664488a3441c4
          Log:
          JENKINS-21903 Amending 0ff6a1b with flag blockTriggerWhenBuilding to control the new behavior, rather than overloading blockBuildWhenUpstreamBuilding.
          Allows more detailed control that may be needed in some setups.
          Also preserves the default behavior from older plugin versions to avoid surprises.

          SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jesse Glick Path: src/main/java/hudson/maven/AbstractMavenProject.java src/main/java/hudson/maven/MavenModuleSet.java src/main/resources/hudson/maven/MavenModuleSet/configure-entries.jelly src/main/webapp/blockTriggerWhenBuilding.html src/test/java/hudson/maven/MavenModuleSetTest.java http://jenkins-ci.org/commit/maven-plugin/8aed1aa0e352d51229daba470d1664488a3441c4 Log: JENKINS-21903 Amending 0ff6a1b with flag blockTriggerWhenBuilding to control the new behavior, rather than overloading blockBuildWhenUpstreamBuilding. Allows more detailed control that may be needed in some setups. Also preserves the default behavior from older plugin versions to avoid surprises.

            jglick Jesse Glick
            sodul Stephane Odul
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: