Installer Maven pot avec pompon en dépôt local
J'ai un vieux pot (jsf-api-2.0.2.jar
). Dans ce pot il y a un /META-INF/maven
-Dossier.
Comment puis-je installer le jar dans mon dépôt local?
install:install-file
dit que j'ai besoin de spécifier l'artifactId moi-même. Comment puis-je le forcer à utiliser l'information dans jsf-api-2.0.2.jar!\META-INF\maven\com.sun.faces\jsf-api\pom.xml
?
De sortie:
mvn install:install-file -Dfile=jsf-api-2.0.2.jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.410s
[INFO] Finished at: Sat Feb 01 12:52:34 CET 2014
[INFO] Final Memory: 13M/368M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-install-plugin:2.4:install-file (default cli) on project standalone-pom: The artifact information is incomplete or not valid:
[ERROR] [0] 'groupId' is missing.
[ERROR] [1] 'artifactId' is missing.
[ERROR] [2] 'packaging' is missing.
[ERROR] [3] 'version' is missing.
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
version d'apache-maven-3.1.1
OriginalL'auteur Peter Rader | 2014-02-01
Vous devez vous connecter pour publier un commentaire.
Voir http://maven.apache.org/plugins/maven-install-plugin/examples/custom-pom-installation.html
Juste vous assurer que vous utilisez au moins la version 2.5, qui a introduit cette fonctionnalité.
Et par la voie: l'objectif est
install-file
, installez pas-jarMaven ne sélectionne automatiquement la dernière version, mais a prédéfini des versions pour le commun des plugins, et 3.1.1 probablement encore utilise maven-install-plugin-2.4. Il n'est pas difficile de forcer une autre version.
mvn org.apache.maven.plugins:maven-install-plugin:2.5.1:install-file -Dfile=<path-to-file>
Trop mauvais, plugin installer uniquement le premier artefact whearat
richfaces-ui-3.3.0.GA.jar
contient de multiples artefacts.commentaire travaillé! Dernière version de maven-install-plugin est maintenant 2.5.2, FYI.
OriginalL'auteur Robert Scholte