springboot本地jar打包设置流程

如:
<dependency>
<groupId>ctg-ag-sdk-core</groupId>
<artifactId>ctg-ag-sdk-core</artifactId>
<version>2.8</version>
<classifier>core-2.8.0</classifier>
<scope>system</scope>
<systemPath>D:/springboot/wulianwang/libs/ctg-ag-sdk-core-2.8.0-20230508.100604-1.jar</systemPath>
</dependency>


<dependency>
<groupId>ag-sdk-biz</groupId>
<artifactId>ag-sdk-biz</artifactId>
<version>2.8</version>
<classifier>biz-2.8.0</classifier>
<scope>system</scope>
<systemPath>D:/springboot/wulianwang/libs/ag-sdk-biz-43332.tar.gz-20240119.171847-SNAPSHOT.jar</systemPath>
</dependency>

使用 IDEA 的 Maven 工具执行(最简单)

  1. 在 IDEA 中打开项目

  2. 点击右侧 Maven 侧边栏

  3. 点击 Execute Maven Goal 图标(m 字母图标)

  4. 分别粘贴执行以下命令:

text
install:install-file -Dfile=D:/springboot/wulianwang/libs/ctg-ag-sdk-core-2.8.0-20230508.100604-1.jar -DgroupId=ctg-ag-sdk-core -DartifactId=ctg-ag-sdk-core -Dversion=2.8 -Dpackaging=jar
text
install:install-file -Dfile=D:/springboot/wulianwang/libs/ag-sdk-biz-43332.tar.gz-20240119.171847-SNAPSHOT.jar -DgroupId=ag-sdk-biz -DartifactId=ag-sdk-biz -Dversion=2.8 -Dpackaging=jar

安装成功后修改 pom.xml

把这两个依赖的 <scope>system</scope><systemPath> 去掉,改成:

xml
<dependency>
    <groupId>ctg-ag-sdk-core</groupId>
    <artifactId>ctg-ag-sdk-core</artifactId>
    <version>2.8</version>
</dependency>
<dependency>
    <groupId>ag-sdk-biz</groupId>
    <artifactId>ag-sdk-biz</artifactId>
    <version>2.8</version>
</dependency>


posted @ 2026-08-19 09:01  李建彬  阅读(2)  评论(0)    收藏  举报