首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Maven的问题:maven-干净插件在存储库中找不到。

Maven的问题:maven-干净插件在存储库中找不到。
EN

Stack Overflow用户
提问于 2011-02-11 01:24:40
回答 5查看 39.6K关注 0票数 9

叹息.

使用maven 2.2.1,它突然无法解析maven-洁净插件。真的,一个构建工具需要一个插件才能“干净”,这有多疯狂呢?

我试着从另一台工作正常的机器同步我的.m2目录,我得到了相同的结果。

代码语言:javascript
复制
taproot:~/$ mvn clean package -DskipTests
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building CRM Webapp
[INFO]    task-segment: [clean, package]
[INFO] ------------------------------------------------------------------------
Downloading: http://download.java.net/maven/2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository maven.java.net (http://download.java.net/maven/2)
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /Users/armhold/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2
Downloading: http://repository.jboss.org/nexus/content/groups/public-jboss//org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository public jboss (http://repository.jboss.org/nexus/content/groups/public-jboss/)
Downloading: https://repository.jboss.org/nexus/content/repositories/releases//org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[INFO] Unable to find resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' in repository jboss-my-rel (https://repository.jboss.org/nexus/content/repositories/releases/)
Downloading: http://repository.jboss.org/maven2//org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository JBOSS (http://repository.jboss.org/maven2/): Specified destination directory cannot be created: /Users/armhold/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2
Downloading: http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-clean-plugin/2.2/maven-clean-plugin-2.2.pom
[WARNING] Unable to get resource 'org.apache.maven.plugins:maven-clean-plugin:pom:2.2' from repository central (http://repo1.maven.org/maven2): Specified destination directory cannot be created: /Users/armhold/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).


Project ID: org.apache.maven.plugins:maven-clean-plugin

Reason: POM 'org.apache.maven.plugins:maven-clean-plugin' not found in repository: Unable to download the artifact from any repository

  org.apache.maven.plugins:maven-clean-plugin:pom:2.2

from the specified remote repositories:
  jboss-my-rel (https://repository.jboss.org/nexus/content/repositories/releases/),
  central (http://repo1.maven.org/maven2),
  maven.java.net (http://download.java.net/maven/2),
  JBOSS (http://repository.jboss.org/maven2/),
  public jboss (http://repository.jboss.org/nexus/content/groups/public-jboss/)

 for project org.apache.maven.plugins:maven-clean-plugin

我的pom是这样的:

代码语言:javascript
复制
<repositories>
    <repository>
        <id>public jboss</id>
        <url>http://repository.jboss.org/nexus/content/groups/public-jboss/</url>
    </repository>

    <repository>
        <id>jboss-my-rel</id>
        <url>https://repository.jboss.org/nexus/content/repositories/releases/</url>
    </repository>

    <repository>
        <id>JBOSS</id>
        <name>JBoss Repository</name>
        <url>http://repository.jboss.org/maven2/</url>
    </repository>

</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>maven.java.net</id>
        <name>Java.net Maven2 Repository</name>
        <url>http://download.java.net/maven/2</url>
    </pluginRepository>
</pluginRepositories>
EN

回答 5

Stack Overflow用户

回答已采纳

发布于 2011-02-11 01:31:25

如果你仔细阅读你的错误,你可以在那里找到答案:

代码语言:javascript
复制
 Specified destination directory cannot be created:
 /Users/armhold/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2

您没有对该目录的写访问权限(或者运行maven进程的用户没有)

票数 17
EN

Stack Overflow用户

发布于 2011-04-14 05:54:47

同时,我也面临着类似的问题。但是我发现这是代理设置,它用于我们的intranet,我没有将它放入Setting.xml中。放了之后,就变成了爆炸.

代码语言:javascript
复制
    <proxy>
        <id>ABC</id>
        <active>true</active>
        <protocol>http</protocol>
        <username>USER</username>
        <password>Password</password>
        <port>8080</port>
        <host>XXX.net</host>
        <nonProxyHosts>local.net,some.host.com</nonProxyHosts>
    </proxy>
票数 6
EN

Stack Overflow用户

发布于 2011-02-11 01:27:06

我的猜测是,您有一个配置或网络问题,正在阻止maven访问网络。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/4964704

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档