问题
Can somebody, please, point me to the way of how can I deploy artefacts into the local repository to test deploy scenario? The thing is that we use nexus as remote repository and I wonder if it is possible to deploy my artifacts with custom name and not with names which nexus provide for us.
Thanks in advance!
回答1:
Use the following command
mvn install:install-file -Dfile=myfile.jar -DgroupId=com.example -DartifactId=myartifact -Dversion=0.1 -Dpackaging=jar
myfile.jar
is your artifact and the meaning of -DgroupId
, -DartifactId
etc. is obvious too.
See documentation here.
In case you needed a remote repository as well, see mvn deploy:deploy-file
(here)
来源:https://stackoverflow.com/questions/16948873/maven-deploy-into-local-repository