how to create build chain with jbe and maven
4 answers
You can use the requestTeamBuild Ant task to submit the downstream build request, optionally overriding build properties. See the 2nd entry in the Build FAQ for pointers on the Ant tasks:
https://jazz.net/wiki/bin/view/Main/BuildFAQ
I've had difficulty in the past getting Maven to play well with Ant, especially when you need to bring in other libraries of tasks (like the RTC Build toolkit). In the end I found it simpler to use the Maven-Ant plugin to launch an external ant, giving the necessary -f <path to build file> and -lib <build toolkit path> command line args, rather than trying to run the Ant script directly as a configuration in the Maven pom.
You're trying to choreograph two related builds, right?
Use a command-line build definition to drive build A. We use Bash scripts in my project but you could use perl, python, whatever. From within that script, call out to Maven to build project A. Once Maven is done, inspect the return code. Did Maven complete without errors? If so use the Ant-based build toolkit (check the infocenter for details) to request a build of build B. Build A then ends.
Use a command-line build definition to drive build A. We use Bash scripts in my project but you could use perl, python, whatever. From within that script, call out to Maven to build project A. Once Maven is done, inspect the return code. Did Maven complete without errors? If so use the Ant-based build toolkit (check the infocenter for details) to request a build of build B. Build A then ends.