2013-08-26 35 views
0

我是哈德遜的新手,需要它在構建項目時進行自動化。安裝Hudson-3.0.1之後,我嘗試手動構建其中一個項目。我不斷收到這個錯誤。如何將Hudson配置爲指向本地存儲庫而不是中央存儲庫?

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

據我所知,它正在尋找中央存儲庫中的工件而不是我的本地工件。我不知道如何配置哈德森來引用本地存儲庫。我所有的谷歌搜索都沒有提供很多有用的信息。有人可以幫助我嗎?

回答

1

重新定義 「中央」 資料庫中的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> 

或添加更多存儲庫部分,將POM

<repository> 
     <id>localRepo</id> 
     <name>libs-release</name> 
     <url>http://localAddress[:localPort]/artifactory/libs-release</url> 
    </repository> 

或者,如果你有在本地回購(.m2目錄/庫中的所有文物/ )以離線模式運行編譯:
mvn -o clean install

相關問題