加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

java – Maven woes:在存储库中找不到maven-clean-plugin

发布时间:2020-12-15 02:56:50 所属栏目:Java 来源:网络整理
导读:叹. 使用maven 2.2.1,突然间它无法解析maven-clean-plugin.真的,构建工具需要一个“干净”的插件是多么疯狂? 我尝试从另一台运行良好的机器同步我的.m2目录,并得到相同的结果. taproot:~/$mvn clean package -DskipTests[INFO] Scanning for projects...[IN
叹.

使用maven 2.2.1,突然间它无法解析maven-clean-plugin.真的,构建工具需要一个“干净”的插件是多么疯狂?

我尝试从另一台运行良好的机器同步我的.m2目录,并得到相同的结果.

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看起来像这样:

<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>

解决方法

如果你仔细阅读了你的错误,你可以在那里找到答案:
Specified destination directory cannot be created:
 /Users/armhold/.m2/repository/org/apache/maven/plugins/maven-clean-plugin/2.2

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

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读