It's all about the answers!

Ask a question

How to specify maven dependencies in Build Definition?


Eric Benzacar (41912) | asked May 01 '12, 4:27 p.m.
Hi,

I'm somewhat new to RTC and automated builds, but have managed to create my first maven build definition that runs successfully. However, one thing that I cannot seem to figure out how to configure are maven dependencies.

If I have several components that rely on a base component, I would like to automatically trigger builds on all related components if the base component changes/gets rebuilt.

The other CI engines I have used in the past all have this support (ex: Hudson, JetBrains' TeamCity, Atlassian's Bamboo, etc). I can only assume that RTC must have it as well, but I cannot seem to find the configuration for that anywhere.

Can someone point me in the right direction please?

Thanks,

Eric

4 answers



permanent link
Geoffrey Clemm (30.1k33035) | answered May 03 '12, 12:04 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
You would use RTC to kick off, and then capture the results of the Maven build, but you would specify Maven build dependencies in your Maven. For Maven dependencies, see:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html

Cheers,
Geoff

Hi,

I'm somewhat new to RTC and automated builds, but have managed to create my first maven build definition that runs successfully. However, one thing that I cannot seem to figure out how to configure are maven dependencies.

If I have several components that rely on a base component, I would like to automatically trigger builds on all related components if the base component changes/gets rebuilt.

The other CI engines I have used in the past all have this support (ex: Hudson, JetBrains' TeamCity, Atlassian's Bamboo, etc). I can only assume that RTC must have it as well, but I cannot seem to find the configuration for that anywhere.

Can someone point me in the right direction please?

Thanks,

Eric

permanent link
Eric Benzacar (41912) | answered May 03 '12, 10:43 a.m.
You would use RTC to kick off, and then capture the results of the Maven build, but you would specify Maven build dependencies in your Maven. For Maven dependencies, see:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html


Thanks for the reply, but I guess I didn't phrase the question properly. Instead of discussion Maven dependencies, I should probably have referred to build dependencies instead.

If my project depends on other modules/libraries in my build path, I would like the Build Engine to automatically trigger a rebuild of my project of a dependent library gets rebuilt.

For instance, my EAR depends on my WAR and a bunch of JARs. I have structured each module (ie: EAR, WAR, JAR, etc) to be independent maven builds. However, I would like to configure the project such that if my JAR triggers a rebuild, that my WAR and my EAR are automatically rebuilt as well. But if I enable the "Build only if there are changes accepted" option, then the WAR and EAR never get rebuilt, and consequently, my automated build artifacts (ie: the WAR and EAR) are no longer "valid" - ie: they are not based on the latest build of the JAR.

In every other CI system I have seen, there are ways to configure project dependencies to allow for these triggers to initialize.

Is there nothing in RTC that allows for this? Am I forced to use Build Forge instead?

Thanks,

Eric

permanent link
Jirong Hu (1.5k9290258) | answered May 03 '12, 11:04 a.m.
I just started Maven with RTC so I am not an expert in Maven.

The build dependency you've described is implemented in Maven by using Modules.

In the case of RTC integration with Maven, RTC is not doing anything but a scheduler to retrieve the source from RTC.

Jirong

permanent link
Geoffrey Clemm (30.1k33035) | answered May 03 '12, 11:26 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
It's important to distinguish the RTC build component from the JBE (the "Jazz Build Engine"). The RTC component allows you to invoke a variety of build engines, where the JBE is a very simple build engine that is included in RTC. The BuildForge build engine is a much more powerful one, but you have to buy BuildForge to use it.

Since we already are selling a powerful build engine (BuildForge), and since there are a variety of free build engines available that can easily be invoked from the JBE, it wouldn't make sense for us to add that functionality to the JBE itself.

So if you want some functionality not included in the Jazz Build Engine, you would either have the Jazz Build Engine invoke a build system that does provide it (i.e. have the Jazz Build Engine invoke maven) or purchase BuildForge, so you can use the BuildForge build engine.

Cheers,
Geoff

You would use RTC to kick off, and then capture the results of the Maven build, but you would specify Maven build dependencies in your Maven. For Maven dependencies, see:
http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html


Thanks for the reply, but I guess I didn't phrase the question properly. Instead of discussion Maven dependencies, I should probably have referred to build dependencies instead.

If my project depends on other modules/libraries in my build path, I would like the Build Engine to automatically trigger a rebuild of my project of a dependent library gets rebuilt.

For instance, my EAR depends on my WAR and a bunch of JARs. I have structured each module (ie: EAR, WAR, JAR, etc) to be independent maven builds. However, I would like to configure the project such that if my JAR triggers a rebuild, that my WAR and my EAR are automatically rebuilt as well. But if I enable the "Build only if there are changes accepted" option, then the WAR and EAR never get rebuilt, and consequently, my automated build artifacts (ie: the WAR and EAR) are no longer "valid" - ie: they are not based on the latest build of the JAR.

In every other CI system I have seen, there are ways to configure project dependencies to allow for these triggers to initialize.

Is there nothing in RTC that allows for this? Am I forced to use Build Forge instead?

Thanks,

Eric

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.