I have one SVN repository, with two Java projects: "A", which is a library that produces a .jar file as artifact, and "B", which depends on that artifact. Those two projects are in two different folders within SVN "trunk" directory. So I have set up two projects in TeamCity, one for "A" and one for "B", each of them with its own build configuration.
For each of these build configurations I have set up a VCS trigger: as soon as a file changes in either of the two folders in SVN, that project is build by TeamCity. That part works fine.
Now, since "B" depends on the artifact from "A", which I have defined as dependency in TeamCity, I also want to trigger a new build of "B" after "A" has been successfully build and and generated a new version of the artifact. So I have set up a second trigger for "B", to start a new build in that case. This is also working well.
The issue now is the following: When I check-in files for both projects in one commit, then both build configurations are being triggered because of their respective VCS triggers. However, the build of "B" is triggered two times, once becaues of the VCS trigger, and a second time because of the project dependency trigger. But this is unnecessary, because "B" has been re-built once because of the VCS trigger anyway.
Is there any way in TeamCity 9 for me to define that "B" should only be built once in such a case?