Maven upload jar package command

Maven project upload jar package
Today is mainly to record a knowledge point of maven upload jar package, 100% applicable, not much nonsense, directly on the command:

上传已有jar包到本地仓库
mvn install:install-file -Dfile=C:\Users\Lenovo\Desktop\xxx.jar -DgroupId=com.alibaba -DartifactId=common -Dversion=1.1.21 -Dpackaging=jar
上传已有jar包到私服仓库
mvn deploy:deploy-file -DgroupId=com.alibaba -DartifactId=common -Dversion=1.0 -Dpackaging=jar -Dfile=C:\Users\Lenovo\Desktop\xxx.jar -Durl=私服仓库地址 -DrepositoryId= 提交的版本

If BUILD SUCCESS appears as shown above, the import is successful

Property analysis:
-Dfile: the absolute path of the local jar package -DgroupId:
the groupid of the
jar package
-DartifactId: the artifactId of the jar package -Dversion: the version number of the jar package
-DrepositoryId: the submitted version
-Durl: the address of the private server warehouse

I hope it will be useful to everyone. If you have any questions, please point it out, thank you.

Guess you like

Origin blog.csdn.net/xaiobaicai/article/details/111833439