1.在maven/conf/setting.xml中:
在<servers>中加入
<server>
<id>internal</id>
<username>username</username>
<password>password</password>
</server>
2.maven命令
mvn deploy:deploy-file -Durl=仓库url -DrepositoryId=internal -Dfile=test.jar -DgroupId=com.ce.test -DartifactId=test -Dversion=1.0.0 -Dpackaging=jar -DgeneratePom=true
mvn deploy:deploy-file -DgroupId=com.huiqu.common.tools -DartifactId=huiqu-common-tools -Dversion=1.0.0-SNAPSHOT -Dpackaging=jar -Dfile=D:WorkProjectALiYunGitHuiQu_Payhuiqu-common-tools argethuiqu-common-tools.jar -Durl=file://D:LocalRepositorymaven_repository -DrepositoryId=zhaoyb