配置倉庫組後,下載報錯:
1 required artifact is missing.
for artifact:
org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.1
from the specified remote repositories:
Nexus (http://172.16.60.71:8181/nexus/content/groups/public , releases=true, snapshots=false)
原因:主要原因是配置nexus裏面的 Public Repositories 順序和條件出錯,導致不能下載構件。
解決方法:下邊這個圖中是正確的配置順序
講解:左邊(Ordered Group Repositories)的是正在使用的定義好的倉庫組,右邊(Available Repositories)是可選的。下載構件的順序是先在本地releases找,如果沒有再在snapshots裏找,再3rd party,最後是本地機子都沒有構件就到遠程(外網)提供的網站下載構件。以此類推