sdoca
sdoca

Reputation: 8042

Good Reference for Hudson/Maven/Mercurial Integration

Can anyone provide a good reference (web, book etc.) that explains how to set up Hudson to do builds/releases using Maven/Nexus and Mercurial? I would like to set up our system to do Maven builds in Hudson based on updates to our Mercurial SCM projects which are automatically deployed to our local Nexus server. Some of the project are dependent on others. I can find quite a few references that refer to one part of the equation, but haven't found anything that details all the pieces together.

TIA!!

EDIT

I think what I am looking for initially is more of a general overview of how to use these tools in an integrated manner. And then I can delve into the details. What I'm looking for is how to use Hudson to do/verify builds and based on the results, push the artifacts to the appropriate Maven/Nexus repository (snapshot or not) and also possibly deploy applications from Hudson as well to our pre-prod systems. The fact that I'm using Mercurial is incidental.

Hopefully that clarified and didn't muddy my question...

Upvotes: 2

Views: 1004

Answers (2)

Prasanna Talakanti
Prasanna Talakanti

Reputation: 2394

I wrote a blog which talks about setting up project using Jenkins and maven, If i am right Jenkins is a spin off from Hudson. Try it out it might help

http://prasannatalakanti.blogspot.com/2011/08/continuous-integration-using-open.html

Upvotes: 0

Alexander Pogrebnyak
Alexander Pogrebnyak

Reputation: 45596

I don't know about the books, I did our integration by using Hudson help.

I think, though, that one area is totally not clear out of the box: providing your own version of settings.xml ( that's where you may set custom repository, profiles, etc )

Here are the steps:

  1. Go to Hudson->Manage Hudson->Maven 3 Configuration
  2. Under 'Documents' tab click 'Add'
  3. Change 'Type' drop-down to 'SETTINGS'
  4. Give it a meningful name ( e.g. my-custom-settings )
  5. Cut and paste the WHOLE xml that you would usually put into $HOME/.m2/settings.xml
  6. Hit 'Save' button at the bottom of the screen.

Now you are ready to setup Maven project

  1. Create new job and tie it to your source control
  2. Add 'Invoke Maven 3' build step
  3. Click 'Advanced' button
  4. In expanded list find 'Settings' drop down
  5. Choose 'my-custom-settings'.

With custom settings you can provide deploy credentials, custom profiles, etc.

I really wish Hudson team would have provided similar instructions in their help for Maven build step, instead of links to 'Settings Reference' at maven.apache.org website.

As for mercurial integration, quick search returned this article -> http://www.ashlux.com/wordpress/2010/06/16/triggering-hudson-builds-with-mercurial-hooks/

I am not mercurial expert, but the article is consistent with the setup we used for our SCM integration.

Upvotes: 1

Related Questions