Setting up artifactory, hudson, sonar

Today I added hudson and sonar next to our existing artifactory setup.

Nothing special really. All three tomcat instances on a single host. Some important notes:

  • hudson has incredibly ugly UI (though still usable enough) but great features; automatic maven installation and nice spring context refreshing after configuration changes
  • sonar isn’t quite as administrable as I had guesses from it’s sleek UI; LDAP authentication costs money, but then again; it isn’t that useful, once you use it through hudson sonar plugin you really don’t need user accounts (if in intranet)

Sonar setting up was the most difficult job. I just copy-pasted common maven2 settings.xml which included artifactory mirroring of all repositories. However, sonar has a built-in nexus repository, documentation of which wasn’t so easily found. It all comes down to this:

Don’t mirror the sonar repo.

As in: <mirrorOf>*,!sonar</mirrorOf>; don’t waste your time trying with !localhost or !myhostname.

The closing tip, have a small (even temporary project) you send through hudson to sonar — not your behemoth that’ll take the first 10 minutes to build, forever to test.


One Comment

  1. nk69
    Posted 2011-07-22 at 20:50 | Permalink | Reply


    I am trying to set up Sonar. I have hudson and artifactory all configured. When I run the build, and run post soanr execution, I get
    Unable to get resource ‘org.codehaus.sonar:sonar-update-center:pom:1.1’

    [INFO] Can not execute Sonar
    Embedded error: Unable to get dependency information: Unable to read the metadata file for artifact ‘org.codehaus.sonar:sonar-update-center-common:jar’: Cannot find parent: org.codehaus.sonar:sonar-update-center for project: null:sonar-update-center-common:jar:null for project null:sonar-update-center-common:jar:null

    Do I have to configure a remote repository in artifactory with the Sonar jar/pom needed?
    Do I have to do anything extra to set up sonar dependencies?


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: