maven私服无法下载 maven-plugins相关组件

抹茶奶爸0223 发布于 2017/07/27 08:53
阅读 1K+
收藏 0

在idea/eclipse上执行clean、install等命令,会报如下错误信息

[ERROR] Plugin org.apache.maven.plugins:maven-clean-plugin:2.5 or one of its dependencies could not be resolved: Failure to find org.apache.maven.plugins:maven-clean-plugin🏺2.5 in http://.../repository/maven-public/ was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginResolutionException

maven本地库的settings.xml配置如下

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
 <localRepository>D:/software/mavenrepo</localRepository>
  <pluginGroups>
  </pluginGroups>

  <proxies>
   
  </proxies>

  <servers>
    <server>
        <id>nexus-releases</id>
        <username>admin</username>
        <password>admin123</password>
    </server>
    <server>
        <id>nexus-snapshots</id>
        <username>admin</username>
        <password>admin123</password>
    </server>
    <server>
        <id>central</id>
        <username>admin</username>
        <password>admin123</password>
    </server>
  </servers>

  <mirrors>
    <mirror>
      <id>central</id>
      <name></name>
      <url>.../repository/maven-public/</url>
      <mirrorOf>*</mirrorOf>        
    </mirror>
  </mirrors>

  <profiles>
  </profiles>
 </settings>

根据错误提示,应该是私服无法拉取maven-plugins相关组件导致的,怎样设置才能使得私服拉取maven-plugins相关组件

maven版本 3.5.0

nexus版本 nexus-3.4.0-02-win64

maven私服中使用的默认远程仓库

加载中
0
抹茶奶爸0223
抹茶奶爸0223

问题已解决

在settings.xml中配置

  <pluginGroups>
      <pluginGroup>org.apache.maven.plugins</pluginGroup>
  </pluginGroups>

 

返回顶部
顶部