Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Integration with Maven with RTC 4.0.2 (Team concert plugin)

Our current setup is that we use invoke ant to trigger build.xml file whenever we run a build from Jenkins or RTC, but now we would like to implement the Ant build.xml that we have into maven pom.xml Does anyone have an idea how to implement this? 

0 votes


Accepted answer

Permanent link
You can use the antrun plugin in your POM to run Ant scripts, but I generally discourage people from doing that.

Given that you seem hung up on preserving your old Ant build.xml, what's your motivation for using Maven?
chung Lin selected this answer as the correct answer

1 vote

Comments

Thanks for the answer Jeff! The reason why we want to use antrun is because the pom file we are working with is already very complex already so we don't want to further complicate with our integration.   :)

I obviously don't know your situation, but it sounds like you are setting yourself up for failure.

Maven & Ant are very different tools: one is not better than the other, they are just different. It sounds like you are trying to migrate from Ant to Maven, yet you don't want to adopt the "Maven way" to do things: if so that's a recipe for disaster. Successful use of Maven requires bending your will to how things are done in the Maven world. It means decomposing your build.xml and translating it into configuration for the appropriate Maven plugins.

Antrun has it's place, but I always recommend to people that they only use it for situations where there no available mojo that does what they need.


2 other answers

Permanent link
You can't really map an Ant build.xml to a Maven pom.xml.  Ant is procedural and Maven is declarative.  Here's a short overview ... http://stackoverflow.com/questions/603189/differences-between-ant-and-maven.

You really need to start simple with http://maven.apache.org/ and build up a pom.xml until all aspects of your build are covered.

1 vote

Comments

 Is it possible to call ant task within maven? Would that still work with RTC?

Looks like Jeff's got you covered for the Ant run plugin.  I hope to demonstrate how to do this soon with a blog post.  You'll probably solve your problem before I get to it, but I will track my progress here, Update Jenkin plugin self-host build with progress, compile and test results using build toolkit Ant tasks ... then write a blog post or article. (289698)


Permanent link
Maven does not use build.xml files. Perhaps you meant pom.xml ?

0 votes

Comments

Yes, sorry about the confusion. What I meant is that how do I implement the Ant build.xml that we have into maven pom.xml. 


Thanks
Chung 

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,121
× 562
× 63
× 45

Question asked: Dec 11 '13, 3:08 p.m.

Question was seen: 6,579 times

Last updated: Dec 13 '13, 11:11 a.m.

Confirmation Cancel Confirm