不是使用 dependencyManagement
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/>
</parent>
引入 systemPath
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-encryption-support</artifactId>
<version>9.3.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/pentaho-encryption-support-9.3.0.0-428.jar</systemPath>
</dependency>
打包插件 注意需要将 systemPath 加入claspath
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
完整简化配置pom.xml
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.sugon</groupId>
<artifactId>dataExChangePlatform</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>dataExChangePlatform</name>
<description>dataExChangePlatform</description>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<java.version>1.8</java.version>
<mysql.version>8.0.31</mysql.version>
<spring.boot.version>2.1.6.RELEASE</spring.boot.version>
</properties>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.6.RELEASE</version>
<relativePath/>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>${spring.boot.version}</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<version>${mysql.version}</version>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>kettle-core</artifactId>
<version>9.3.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/kettle-core-9.3.0.0.jar</systemPath>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-engine</artifactId>
<systemPath>${project.basedir}/src/main/resources/kettle-engine-9.3.0.0-428.jar</systemPath>
<version>9.3.0.0</version>
<scope>system</scope>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-dbdialog</artifactId>
<version>9.3.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/kettle-dbdialog-9.3.0.0-428.jar</systemPath>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-encryption-support</artifactId>
<version>9.3.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/pentaho-encryption-support-9.3.0.0-428.jar</systemPath>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>pentaho-xul-core</artifactId>
<version>9.3.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/pentaho-xul-core-7.1.0.0-12.jar</systemPath>
</dependency>
<dependency>
<groupId>org.pentaho</groupId>
<artifactId>metastore</artifactId>
<version>9.3.0.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/metastore-9.3.0.0-428.jar</systemPath>
</dependency>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.1.0.7.0</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/ojdbc6-11.1.0.7.0.jar</systemPath>
</dependency>
<dependency>
<groupId>com.oracle.jdbc</groupId>
<artifactId>pentaho-xul-swt</artifactId>
<version>7.1.0.0-12</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/pentaho-xul-swt-7.1.0.0-12.jar</systemPath>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>fastjson</artifactId>
<version>1.2.67_noneautotype2</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.9</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.7.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
<version>2.8.9</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<version>${spring.boot.version}</version>
<configuration>
<fork>true</fork>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>aliyun</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>aliyun-plugin</id>
<url>https://maven.aliyun.com/repository/public</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</project>
标签:spingboot,0.0,boot,maven,pentaho,spring,org,classpath,9.3
From: https://www.cnblogs.com/guanchaoguo/p/17460528.html