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>

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

 

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

 

posted on 2020-11-23 15:51  永不宕机  阅读(16887)  评论(0编辑  收藏  举报

导航