将自己私有的jar包添加到本地Mvn仓库

 
  1. mvn install:install-file

  2. -DgroupId=包名

  3. -DartifactId=项目名

  4. -Dversion=版本号

  5. -Dpackaging=jar

  6. -Dfile=jar文件所在路径


以kettle-core.jar为例:

1、将kettle-core.jar文件放在“D:\JAR_LIB”目录下(该目录任意)

2、执行命令: 

 
  1. mvn install:install-file -Dfile=D:\JAR_LIB\kettle-core.jar -DgroupId=org.pentaho -DartifactId=kettle-core -Dversion=4.4.0 -Dpackaging=jar  -DgeneratePom=true -DcreateChecksum=true

这样maven向本地仓库导入 kettle-core.jar 包就成功了。

3.在项目的pom.xml文件中增加如下配置:

 
  1. <dependency>

  2.       <groupId>org.pentaho</groupId>

  3.       <artifactId>kettle-core</artifactId>

  4.       <version>4.4.0</version>

  5. </dependency>





来自为知笔记(Wiz)



转载于:https://my.oschina.net/u/1986568/blog/498976

猜你喜欢

转载自blog.csdn.net/weixin_33722405/article/details/92164292