手动添加jar包到本地仓库
添加为 system scope 依赖
使用 Nexus 仓库管理器
cmd命令
一、引入本地maven 库
mvn install:install-file -Dfile=lucene-queryparser-4.6.1.jar -DgroupId=org.apache.lucene -DartifactId=lucene-queryparser -Dversion=4.6.1 -Dpackaging=jar
在pom.xml中添加如下配置
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-hdfs</artifactId>
<version>2.2.0</version>
</dependency>
二、怎么在pom.xml中添加项目中libs下的jar呢,而不是从本地仓库中添加?
说明:这种方式引入的jar包在打包时不会被包含在war、jar 包中。 适合个人使用
<dependency>
<groupId>htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.21-OSGi</version>
<scope>system</scope>
<systemPath>${project.basedir}/libs/htmlunit-2.21-OSGi.jar</systemPath>
</dependency>
三、 使用Nexus仓库管理工具
最好的方式当然是建立自己的私有云仓库了,怎么安装?戳这里
https://my.oschina.net/u/3655450/blog/1833699
https://zhuanlan.zhihu.com/p/78803457
网友评论