maven 使用本地包的两种方式

一般使用一些已经下来的好的lib 需要使用maven 统一管理

方式一

  • pom文件增加 依赖
<dependency>
    <groupId>org.pentaho</groupId>
    <artifactId>pentaho-encryption-support</artifactId>
    <version>9.3.0.0-428</version>
</dependency>
  • 将文件放入 项目的resourse/lib
  • 直接安装到到 maven 仓库
mvn install:install-file -Dfile=D:\1\pentaho-encryption-support-9.3.0.0-428.jar -DgroupId=pentaho-kettle -DartifactId=pentaho-encryption-support -Dversion=9.3.0.0-428 -Dpackaging=jar

方式二

  • pom文件增加 依赖
<dependency>
    <groupId>org.pentaho</groupId>
    <artifactId>pentaho-encryption-support</artifactId>
    <version>9.3.0.0-428</version>
   <scope>system</scope>
   <systemPath>${project.basedir}/src/main/resources/lib/pentaho-encryption-support-9.3.0.0-428.jar</systemPath>
</dependency>
  • 将文件放入 项目的resourse/lib
posted @ 2023-01-12 11:20  vx_guanchaoguo0  阅读(239)  评论(0编辑  收藏  举报