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