java的jar包安装到本地maven

将本地jar包安装到本地mvn仓库中,一条mvn命令就可以搞定!

 1、命令格式: mvn install:install-file -Dfile={jar路径} -DgroupId={groupId 值} -DartifactId={artifactId值} -Dversion={版本号} -Dpackaging=jar  -DlocalRepositoryPath={m2home path值,本地maven repo路径}



2、例子:

mvn install:install-file -DgroupId=com.aspose -DartifactId=aspose-words -Dversion=17.4.1 -Dpackaging=jar -Dfile=E:\temp\aspose-words-17.4.1.jar


mvn install:install-file -Dfile=E:\temp\latex-word-1.0.38.jar -DgroupId=com.latextoword -DartifactId=latex-word -Dversion=1.0.x -Dpackaging=jar

3、显示下面结果表示成功

 

该资源包含以下jar包: commons-codec-1.6.jar commons-logging-1.1.1.jar fluent-hc-4.2.5.jar httpclient-4.2.5.jar httpclient-cache-4.2.5.jar httpcore-4.2.4.jar httpmime-4.2.5.jar import org.apache.http.Header; import org.apache.http.HttpException; import org.apache.http.HttpRequest; import org.apache.http.HttpRequestInterceptor; import org.apache.http.HttpResponse; import org.apache.http.HttpStatus; import org.apache.http.NameValuePair; import org.apache.http.client.entity.UrlEncodedFormEntity; import org.apache.http.client.methods.HttpGet; import org.apache.http.client.methods.HttpPost; import org.apache.http.conn.scheme.Scheme; import org.apache.http.conn.ssl.SSLSocketFactory; import org.apache.http.impl.client.DefaultHttpClient; import org.apache.http.message.BasicNameValuePair; import org.apache.http.params.CoreConnectionPNames; import org.apache.http.protocol.HttpContext; antlr-2.7.7.jar aopalliance.jar asm-3.3.jar asm-commons-3.3.jar asm-tree-3.3.jar aspectjrt.jar aspectjweaver.jar com.springsource.org.aopalliance-1.0.0.jar com.springsource.org.apache.commons.logging-1.1.1.jar com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar commons-fileupload-1.3.1.jar commons-io-2.2.jar commons-lang-2.5.jar commons-lang3-3.2.jar commons-logging-1.1.3.jar dom4j-1.6.1.jar druid-1.0.15.jar fastjson-1.1.37.jar freemarker-2.3.22.jar hibernate-commons-annotations-4.0.1.Final.jar hibernate-core-4.2.0.Final.jar hibernate-jpa-2.0-api-1.0.1.Final.jar jackson-annotations-2.5.0.jar jackson-core-2.5.0.jar jackson-databind-2.5.0.jar javassist-3.11.0.GA.jar javassist-3.15.0-GA.jar jboss-logging-3.1.0.GA.jar jboss-transaction-api_1.1_spec-1.0.0.Final.jar jedis-2.1.0.jar json.jar jsp-api-2.1.jar jstl.jar log4j-1.2.16.jar log4j-api-2.2.jar log4j-core-2.2.jar mybatis-3.3.0.jar mybatis-spring-1.2.3.jar mysql-connector-java-5.1.40-bin.jar og
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值