maven项目依赖中报错Plugin ‘org.apache.maven.plugins:maven-compiler-plugin:’ not found

时间:2020-11-23 17:00:37   收藏:0   阅读:1930

技术分享图片

 

 我的解决方案,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>

最后替换成公司私有的仓库地址就可以了。

 

仅此记录一下遇到的问题~

 

原文:https://www.cnblogs.com/zhlblogs/p/14024911.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!