Tuesday, April 12, 2011

Hudson becomes Jenkins - compling plugins for Jenkins

When trying to compile the Cobertura plug-in, I noticed that the code has sufficiently changed to rely on the new Jenkins naming conventions. In order to compile these plugins, your ~/.m2/settings.xml must also be changed. You don't need to remove all the <repository > tags. In fact, you can just add the maven.jenkins-ci.org repository to the rest of the ones listed within the repositories.
<repositories>

       <repository>
         <id>maven.jenkins-ci.org</id> 
         <url>http://maven.jenkins-ci.org/content/groups/artifacts/</url> 
       </repository> 
     </repositories>

So your diff for your /.m2/settings.xml could look like:
~/.m2$ diff settings.xml.orig settings.xml
7c7
<    <id>hudson</id>
---
>    <id>jenkins<</id>
29a30,33
>     <repository> 
>              <id>maven.jenkins-ci.org</id> 
>              <url>http://maven.jenkins-ci.org/content/groups/artifacts/</url>
>           </repository> 
35c39
<     <activeProfile>hudson</activeProfile>
---
>     <activeprofile>jenkins</activeProfile>
39c43
<     <pluginGroup>org.jvnet.hudson.tools</pluginGroup>
---
>     <plugingroup>org.jenkins-ci.tools</pluginGroup>
Just run 'mvn' and it should download from the maven.jenkins-ci.org site!

No comments:

Post a Comment