J'utilise le plugin maven-dependency depuis la ligne de commande pour télécharger un seul fichier, mais il finit toujours dans mon dépôt local quand, pour mon cas particulier, je veux qu'il soit téléchargé dans le répertoire en cours. J'utilise la version 2.4 du plugin, qui devrait prendre en charge -Ddestination en tant que site de téléchargement alternatif; Cependant, je ne peux pas le faire fonctionner. Exécution Maven en mode débogage semble indiquer que le paramètre de destination est ignorée ...Le plugin de dépendance Maven ignore la destination
Je me présente comme suit:
M:\>mvn -e -X org.apache.maven.plugins:maven-dependency-plugin:2.4:get \
-Ddestination=M:\test \
-DremoteRepositories=http://nexus-repo:8080/nexus/content/repositories/snapshots \
-Dartifact=com.company.Common:CommonLibs:1.12.0-SNAPSHOT:tar \
-Dtransitive=false
... mais obtenir ce ...
[DEBUG] Configuring mojo 'org.apache.maven.plugins:maven-dependency-plugin:2.4:get' -->
[DEBUG] (f) artifact = com.company.Common:CommonLibs:1.12.0-SNAPSHOT:tar
[DEBUG] (f) localRepository = Repository[local|file://C:\Subversion\LocalMavenRepo]
[DEBUG] (f) packaging = jar
[DEBUG] (f) pomRemoteRepositories = [Repository[central|http://repo1.maven.org/maven2]]
[DEBUG] (f) remoteRepositories = http://nexus-repo:8080/nexus/content/repositories/snapshots
[DEBUG] (f) repositoryId = temp
[DEBUG] (f) transitive = false
[DEBUG] -- end configuration --
[INFO] [dependency:get {execution: default-cli}]
[DEBUG] Skipping disabled repository central
[INFO] snapshot com.company.Common:CommonLibs:1.12.0-SNAPSHOT: checking for updates from temp
[DEBUG] Using Wagon implementation lightweight from default mapping for protocol http
Qu'est-ce que je fais de mal?
+1. Ça marche. – Yanflea
Ah, merci de l'avoir signalé. Je travaillais précédemment sur l'hypothèse que l'expression attendue serait toujours la même que le nom du paramètre. :-) – RCross