maven安装和上传jar

maven安装jar包

mvn install:install-file
-Dfile=/home/chenxu49/javaworkspace/LQ/ojdbc6.jar
-DgroupId=org.oracle
-DartifactId=ojdbc6
-Dversion=11.2.0.1.0
-Dpackaging=jar

maven上传nexus jar包

mvn deploy:deploy-file
-DgroupId=org.oracle
-DartifactId=ojdbc6
-Dversion=11.2.0.1.0
-Dpackaging=jar
-Dfile=/home/chenxu49/javaworkspace/LQ/ojdbc6.jar
-Durl=http://10.124.210.40:8081/repository/maven/
-DrepositoryId=thirdparty

一行上传

mvn deploy:deploy-file -DgroupId=org.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -Dfile=/home/chenxu49/javaworkspace/novcs/LQ/ojdbc6.jar -Durl=http://10.124.210.40:8081/repository/maven-releases -DrepositoryId=nexus-releases

其中Durl 是上传nexus的仓库地址。
DrepositoryId是你在maven的setting.xml文件里配置的server的ID,这样才知道你上传的nexus的账号和密码

<server>
  <id>nexus-releases</id>
  <username>admin</username>
  <password>admin123</password>
</server>

猜你喜欢

转载自blog.csdn.net/gezilan/article/details/82736176