Je génère un exemple Maven quickstart par défaut, et tapez mvn checkstyle:checkstyle
, il essaie toujours d'utiliser la dernière version SNAPSHOT
. Probablement que c'est faux sur mon serveur Nexus, mais comment puis-je définir la version du plugin sur la ligne de commande dans Maven 2, comme 2.5
pour checkstyle au lieu de 2.6-SNAPSHOT
?Définir la version du plugin sur la ligne de commande dans Maven 2
C:\HelloWorld>mvn checkstyle:checkstyle
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'checkstyle'.
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error building POM (may not be this project's POM).
Project ID: org.apache.maven.plugins:maven-checkstyle-plugin
Reason: Error getting POM for 'org.apache.maven.plugins:maven-checkstyle-plugin' from the repository: Failed to resolve artifact, possibly due to a repository list that is not appropriately equipped for this artifact's metadata.
org.apache.maven.plugins:maven-checkstyle-plugin:pom:2.6-SNAPSHOT
from the specified remote repositories:
nexus (http://localhost:9081/nexus/content/groups/public)
for project org.apache.maven.plugins:maven-checkstyle-plugin
Je pense que cela pourrait être mvn checkstyle:2.5:checkstyle
, malheureusement ce n'est pas. Sûrement si je place la dépendance de construction dans pom.xml
, cela fonctionnera, mais je veux voir comment la ligne de commande peut fonctionner.
Si je tape dans artéfact, il fonctionne mvn org.apache.maven.plugins: maven-plugin-checkstyle: 2.5 : checkstyle –