maven2发布自定义jar

如果repository里面没有需要的jar,或者是自定义的jar,需要发布到repository,则可以使用下面的命令:

mvn install:install-file -Dfile=jsonplugin-0.32.jar -DgroupId=googlecode -DartifactId=googlecode-jsonplugin -Dversion=0.32 -Dpackaging=jar

这里假设需要发布的jar是当前目录下的jsonplugin-0.32.jar,目的repository是D:/system/maven_repo([color=gray]如果要发布到远程服务器,则增加参数如“-DrepositoryId=local -Durl=D:/system/maven_repo ”使用url,如http://192.168.1.111/repo,但是要把前面的-DrepositoryId=local修改为-DrepositoryId=remote,这里未验证[/color])。
最后maven会在D:/system/maven_repo里面生成文件:googlecode\googlecode-jsonplugin\0.32\googlecode-jsonplugin-0.32.jar。

[img]http://www.iteye.com/upload/attachment/130013/f8e2976a-8b96-3ecd-bf92-b08818b2a13a.jpg[/img]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值