2017-03-23 45 views
1

我正試圖在本地開發機器上構建https://github.com/opendaylight/mdsal.gitMaven從中央倉庫錯誤地構建下載

構建是失敗的:

[INFO] features4-mdsal .................................... SUCCESS [ 1.315 s] 
[INFO] features-mdsal-aggregator .......................... FAILURE [ 0.164 s] 
The reason being: 
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.6:site (generate-site) on project features-mdsal-aggregator: Execution generate-site of goal org.apache.maven.plugins:maven-site-plugin:3.6:site failed: Unable to read local module POM: Some problems were encountered while processing the POMs: 
[ERROR] [ERROR] Unresolveable build extension: Plugin org.apache.karaf.tooling:karaf-maven-plugin:4.0.8-odl or one of its dependencies could not be resolved: Failure to find org.apache.karaf.tooling:karaf-maven-plugin:jar:4.0.8-odl in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced @ 

的原因是,karaf - Maven的插件中:jar:4.0.8-ODL正在嘗試從 https://repo.maven.apache.org/maven2錯誤下載。

其實際存在於https://nexus.opendaylight.org/content/repositories/public/。我已經注意使用建議的url中的正確settings.xml: https://github.com/opendaylight/odlparent/blob/master/settings.xml。 我已將它放在〜/ .m2/settings.xml中

+1

嘗試用「-u」重新構建。同時嘗試擦除您的本地存儲庫並重新構建。 –

+0

你能分享你的'settings.xml'嗎? (或者你只是從給定的鏈接中複製它)? – Mureinik

+0

真正的問題似乎是Maven沒有看到這個依賴關係的額外存儲庫。確實,分享這個settings.xml是因爲你必須在某個地方犯了一個簡單的錯誤。 – Gimby

回答

1

這實際上是Maven站點插件的問題;一旦Karaf 4.0.9發佈,它將被修復。與此同時,您可以使用-Dmaven.site.skip=true在本地構建,以完全避免此問題。