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

相关文章
相关标签/搜索