maven - How to configure Hudson to point to local repository instead of central one? -
i'm novice in hudson , need automation in building project. after installing hudson-3.0.1, tried building 1 of projects manually. keep getting error.
error: failed parse poms
org.apache.maven.project.projectbuildingexception: problems encountered while processing poms:
[fatal] non-resolvable parent pom: not find artifact com.bnpparibas.parent:bnpparibas-parent:pom:1.0.1 in central (http://repo1.maven.org/maven2) , 'parent.relativepath' points @ wrong local pom @ line 41, column 10
i understand looking artifact in central repository rather in local. don't know how configure hudson refer local repository. google searches didn't yeild useful information. can me on this?
redefine "central" repository in 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 pom
<repository> <id>localrepo</id> <name>libs-release</name> <url>http://localaddress[:localport]/artifactory/libs-release</url> </repository>
or if have artifacts in local repo (.m2/repository/) run compilation in off-line mode:
mvn -o clean install
Comments
Post a Comment