1. 程式人生 > >Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.7 or one of

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.7 or one of

        今天在新環境部署系統時,發現專案出現故障!由於已經解決了,就不上錯誤圖片了,大致的錯誤資訊如:Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resources-plugin:2.7 or one of ,後來網上看了幾個解決辦法,好像都不行!最後看了一下錯誤的原因,大體知道是啥意思了,就是說maven倉庫裡有一些配置資訊找不到!後來查看了自己的maven庫中的settings.xml檔案中只配置了本地路徑,如下圖所示:

如果本地庫中沒有需要載入的jar包就悲劇了,就出現了錯誤!所以此時還需要設定遠端倉庫!在如下的位置新增程式碼:

然後再eclipse中專案右鍵,如下如操作:

然後問題得以解決!在此附上程式碼:

本地倉庫:

  <!-- 設定本地倉庫位置-->
  <localRepository>D:/maven/maven/repository</localRepository>

 

遠端倉庫:

    <!-- 設定遠端倉庫-->
	 <mirror>
          <id>nextus-aliyun</id>
          <mirrorOf>*</mirrorOf>
          <name>Nexus aliyun</name>
          <url>http://maven.aliyun.com/nexus/content/groups/public</url>
      </mirror>
  </mirrors>

到此整個問題就得以解決了!下面給出網友的幾種解決辦法,你們試試哪個對自己有用吧!