maven deploy into local repository

风流意气都作罢 提交于 2021-01-24 12:13:24

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!