Posts Tagged maven

Failure to find org.jenkins-ci.plugins:plugin

It seems that despite all the hard work of the Jenkins team to ensure a smooth move over to the new name, some of the maven repositories have not been updated just yet.

For me, this manifested in the error

Non-resolvable parent POM: Failure to find org.jenkins-ci.plugins:plugin:pom:1.399

As it turns out, the solution is to edit your user Maven config file, located in %USERPROFILE%\.m2\settings.xml (or ~/.m2/settings.xml on linux) to include URL’s to the repos. The following works like a charm:

<settings>
 <!-- Added Jenkins repositories -->
 <profiles>
   <profile>
     <id>jenkins</id>
     <activation>
       <activeByDefault>true</activeByDefault>
     </activation>
     <repositories>
       <repository>
         <id>java.net-m2-repository</id>
         <url>http://maven.jenkins-ci.org:8081/content/repositories/releases/
         </url>
       </repository>
     </repositories>
     <pluginRepositories>
       <pluginRepository>
         <id>jenkins-m2-repository</id>
         <name>Jenkins Plugin Repository</name>
         <url>http://maven.jenkins-ci.org:8081/content/repositories/releases/</url>
         <layout>default</layout>
       </pluginRepository>
       <pluginRepository>
          <id>maven.jenkins-ci.org</id>
          <url>http://maven.glassfish.org/content/groups/public/</url>
        </pluginRepository>
     </pluginRepositories>
   </profile>
 </profiles>
 <pluginGroups>
   <pluginGroup>org.jenkins-ci.tools</pluginGroup>
 </pluginGroups>
<!-- Hudson plugin group 
   <pluginGroups>
    <pluginGroup>org.jvnet.hudson.tools</pluginGroup>
  </pluginGroups>
-->
</settings>

Shout out to Lubos and Vojtech over on the Jenkins Plugin Tutorial Wiki article for figuring this out!

, ,

6 Comments