Maven malheurs: maven-propre-plugin ne trouve pas dans le référentiel
Soupir.
À l'aide de maven 2.2.1, et tout à coup il ne peut pas résoudre le maven-propre-plugin. Et vraiment, comment fou est-il qu'un outil de construction nécessite un plugin pour "nettoyer"?
J'ai essayé de synchroniser mon .m2 répertoire à partir d'une autre machine qui fonctionne bien, et j'obtiens les mêmes résultats.
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
Mon pom ressemble à ceci:
<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>
Vous devez vous connecter pour publier un commentaire.
si vous lisez attentivement votre erreur, vous pouvez y trouver la réponse:
vous n'avez pas accès en écriture sur ce répertoire (ou l'utilisateur de l'exécution de maven ne)
Aussi j'ai été confrontée au même problème.
Mais j'ai trouvé que c'était le paramètre de proxy qui sont utilisés pour notre intranet, je n'ai pas mis en Setting.xml.
Après mettre, il a été boom boom...
J'imagine que vous avez une config ou un problème de réseau qui est l'arrêt de maven à partir d'arriver sur le net.
J'ai enlevé le
.m2/
arborescence de répertoire. J'ai ensuite fait unemvn clean
sur mon projet et téléchargé à nouveau le tout.Retrait
.m2
dossier est une option. Vous pouvez également mettre à jour votre maven version 3.x de sorte qu'il peut résoudre vos plugins maven.