Genero ejemplo de inicio rápido predeterminado de Maven y tipo mvn checkstyle:checkstyle
, siempre trato de usar la última versión de SNAPSHOT
. Probablemente esté mal en mi servidor Nexus, pero ¿cómo puedo configurar la versión del complemento en la línea de comando en Maven 2, como 2.5
para el estilo de control en lugar de 2.6-SNAPSHOT
?Establecer la versión del complemento en la línea de comandos en 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
supongo que podría ser mvn checkstyle:2.5:checkstyle
, por desgracia no lo es.
Seguramente si configuro la dependencia de compilación en pom.xml
, funcionará, pero quiero ver cómo funciona la línea de comandos.
Si escribo en el artefacto completo, funciona org.apache.maven.plugins MVN: maven-Checkstyle-plugin: 2.5 : checkstyle –