您的位置:首页 > 其它

将下载好的jar包安装到本地maven仓库

2016-06-22 17:55 162 查看
这个功能一般很少使用,但是使用起来也还是很方便,这里使用主要是一些在公共仓库中没有的jar包,比如oracle数据库驱动。

以 spring-context-support-3.1.0.RELEASE.jar 为例,在 @3图中已经给出这个 jar 包的 groupId,artifactId,version信息,

手动安装的时候这些信息不要改,否则 Maven 项目移植的话,jar 包下载就会失败。顺便把这信息帖下面,方便对照:


<dependency>


    <groupId>org.springframework</groupId>


    <artifactId>spring-context-support</artifactId>


    <version>3.1.0.RELEASE</version>


</dependency>

Maven 安装 JAR 包的命令是:


mvn install:install-file -Dfile=jar包的位置 -DgroupId=上面的groupId -DartifactId=上面的artifactId -Dversion=上面的version -Dpackaging=jar
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: