Logo Questions Linux Laravel Mysql Ubuntu Git Menu

maven deploy into local repository




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!

like image 541
mr.nothing Avatar asked Mar 24 '23 16:03


1 Answers

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)

like image 67
Mifeet Avatar answered Mar 26 '23 04:03