maven項目依賴中報錯Plugin ‘org.apache.maven.plugins:maven-compiler-plugin:’ not found


 

 我的解決方案,maven倉庫中配置的地址不對。我們的項目使用的是私有倉庫地址,我最開始配置的是阿里雲公共的倉庫地址,后來我把阿里雲倉庫注釋掉,此時使用的是默認倉庫地址,這時還是報錯。如下所示:

<mirrors>
    <!-- mirror
     | Specifies a repository mirror site to use instead of a given repository. The repository that
     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
     |
    <mirror>
      <id>mirrorId</id>
      <mirrorOf>repositoryId</mirrorOf>
      <name>Human Readable Name for this Mirror.</name>
      <url>http://my.repository.com/repo/path</url>
    </mirror>
     -->
    <!-- 阿里雲倉庫 -->
      <!--
      <mirror>
          <id>alimaven</id>
          <mirrorOf>central</mirrorOf>
          <name>aliyun maven</name>
          <url>http://maven.aliyun.com/nexus/content/repositories/central/</url>
      </mirror>
      -->
  </mirrors>

最后替換成公司私有的倉庫地址就可以了。

 

僅此記錄一下遇到的問題~

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM