maven 手动添加第三方的jar包

使用maven搭建工程时,可能会使用第三方包。

可使用如下方法:

在cmd中输入:

mvn install:install-file -DgroupId=<group-id> -DartifactId=<artifact-id> -Dversion=<version> -Dclassifier=template -Dpackaging=jar -Dfile=<path-to-file>

说明:-Dfile指第三方jar的路径,其它的注意要确保maven命令中groupId、artifactId、version与pom.xml中的配置相同,-Dpackaging表示加载的文件类型

例如:

mvn install:install-file -DgroupId=com.ant -DartifactId=GetApkInfo -Dversion=1.0 -Dclassifier=template -Dpackaging=jar -Dfile=E:/Downloads/package/GetApkInfo.jar

则在pom.xml中

<dependency>
<groupId>com.ant</groupId>
<artifactId>GetApkInfo</artifactId>
<version>1.0</version>
<classifier>template</classifier>
</dependency>

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值