Reputation: 41
I'm a novice in Hudson and need it for automation in building the project. After installing Hudson-3.0.1, i tried building one of the projects manually. I keep getting this error.
ERROR: Failed to parse POMs
org.apache.maven.project.ProjectBuildingException: Some problems were encountered while processing the POMs:
[FATAL] Non-resolvable parent POM: Could not find artifact com.bnpparibas.parent:bnpparibas-parent:pom:1.0.1 in central (http://repo1.maven.org/maven2) and 'parent.relativePath' points at wrong local POM @ line 41, column 10
I understand that it is looking for the artifact in the central repository rather than in my local. I don't know how to configure hudson to refer to local repository. All my google searches didn't yeild much useful information. Can somebody help me on this?
Upvotes: 0
Views: 317
Reputation: 14649
Redefine "central" repository in your pom:
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>libs-release</name>
<url>http://localAddress[:localPort]/artifactory/libs-release</url>
</repository>
<repository>
<snapshots />
<id>snapshots</id>
<name>libs-snapshot</name>
<url>http://localAddress[:localPort]/artifactory/libs-snapshot</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>plugins-release</name>
<url>http://localAddress[:localPort]/artifactory/plugins-release</url>
</pluginRepository>
<pluginRepository>
<snapshots />
<id>snapshots</id>
<name>plugins-snapshot</name>
<url>http://localAddress[:localPort]/artifactory/plugins-snapshot</url>
</pluginRepository>
</pluginRepositories>
Or add more repositories section to your pom
<repository>
<id>localRepo</id>
<name>libs-release</name>
<url>http://localAddress[:localPort]/artifactory/libs-release</url>
</repository>
Or if you have all artifacts in local repo (.m2/repository/) run compilation in off-line mode:
mvn -o clean install
Upvotes: 1