maven安装 maven上传jar包到库里面

maven的安装与配置:http://pansanday.blog.163.com/blog/static/381662802012727103454743/

maven上传jar包到库里面:

将私有的jar包或者maven(http://maven.apache.org)找不到匹配的jar包,导入到本地库中:

mvn install:install-file -Dfile=d:/Downloads/apache-activemq-5.5.0/lib/activemq-core-5.5.0.jar -DgroupId=org.apache.activemq -DartifactId=activemq-core -Dversion=5.5.0 -Dpackaging=jar

解析:

mvn install:install-file  -Dfile=外部包的路径

                 -DgroupId=外部包的groupId  

                 -DartifactId=外部包的artifactId 

                 -Dversion=外部包的版本号  

                 -Dpackaging=jar

记住这是本地库!!!

下面是上传到远程库中:

pom.xml中加上:

<distributionManagement>
		<snapshotRepository>
			<id>nexus-snapshots</id>
			<name>Snapshots</name>
			<url>**********************************</url>
		</snapshotRepository>
		<repository>
			<id>nexus-release</id>
			<name>Releases</name>
			<url>**********************************</url>
		</repository>
	</distributionManagement>

 maven安装目录下的settings.xml中的servers加上:

<server>
    	<id>nexus-release</id>
    	<username>***********</username>
    	<password**********</password>
    </server>
    <server>
    	<id>nexus-snapshots</id>
    	<username>**********</username>
    	<password>*********</password>
    </server>

 然后右击运行项目,输入clean  deploy

OK!

转载于:https://www.cnblogs.com/I-will-be-different/p/3893951.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值