Maven組件經過命令上傳本地和私有倉庫


 安裝本地包到本地倉庫:bash


 

mvn install:install-file -DgroupId=com.xxx -DartifactId=mqtt-server-client -Dversion=1.0.1 -Dpackaging=jar -Dfile=E:\__vdt\MVVP\mqtt-server-client-1.0.1.jar -DpomFile=E:\__vdt\MVVP\pom.xml


 安裝本地包到私有倉庫:
ide


 

mvn deploy:deploy-file -DgroupId=com.xxx -DartifactId=mqtt-server-client -Dversion=1.0.1 -Dpackaging=jar -Dfile=E:\__vdt\MVVP\mqtt-server-client-1.0.1.jar  -Durl=http://host:port/content/repositories/xxx-release/  -DrepositoryId=xxx-releases -DpomFile=E:\__vdt\MVVP\pom.xml



 若是私有倉庫須要認證,在.m2/setting.xml文件中添加服務認證信息url


 

<servers>
		<server>
			<id>xxx-release</id>
			<username>develop</username>
			<password>123456</password>
		</server>
</servers>



 指定的-DpomFile文件能夠從包中提取出來。spa

相關文章
相關標籤/搜索