Maven Snapshot Dependencies Trigger

I have such project structure,  many child-modules(war) depends on middle-module(war) which depends on core-module(war and jar). Project builds with maven. I want to do such thing  when somebody commits to core-module and to one of the child modules, TeamCity must start building core-module and queue all of the child-modules(including middle).  I configured Maven Snapshot Dependencies Trigger(Do not trigger a build if currently running builds can produce snapshot dependencies is on) and VCS trigger in the build configuration. But in fact when somebody commits to several modules in one time,
TC starts building core and child modules in parallel ( I have 3 build agents) instead of queueing middle-module and then build childs in parallel.
I went to the Maven2 tab , and saw that in child-module "related build configurations" I got only middle-module dependency but no core-module. I think it is because core-module produces war(packaging) and jar file(by plugin containing only classes) and child-modules uses only jar file as dependency of core and war file dependency of the middle. I think the best way is to use only war-packaging but it is impossible for now.

I'm using TeamCity Enterprise  6.5.5 (build 18087)

Can TC resolve such conflicts or maybe I'm doing something wrong?


1 comment
Comment actions Permalink

Hi Anton,

Maven Snapshot Dependencies Trigger monitors only direct dependencies. As well as Maven 2 tab shows only build configurations producing direct dependencies.

I guess TeamCity snapshots dependencies would suit your need better. Define snapshot dependency links between your configurations and enable option "Trigger on changes in snapshot dependencies" in the VCS trigger in all dependent configurations.

Don't forget to disable Maven Snapshot Dependencies Trigger to avoid unnecessary builds.


Please sign in to leave a comment.