Java 10和liquibase-maven-plugin更新未找到java / sql / Driver

时间:2018-10-02 11:01:23

标签: java maven liquibase

我当前正在将集成测试从Java 8升级到Java10。但是,当我将JAVA_HOME设置为Java 10时运行任何集成测试时,在运行liquibase-maven-plugin更新时出现以下错误被称为:

[ERROR] Failed to execute goal org.liquibase:liquibase-maven-plugin:3.6.2:update (update-schema) on project econiq-rest-it: Execution update-schema of goal org.liquibase:liquibase-maven-plugin:3.6.2:update failed: A required class was missing while executing org.liquibase:liquibase-maven-plugin:3.6.2:update: java/sql/Driver
[ERROR] -----------------------------------------------------
[ERROR] realm =    plugin>org.liquibase:liquibase-maven-plugin:3.6.2
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
[ERROR] urls[0] = file:/C:/Users/sryan/.m2/repository/org/liquibase/liquibase-maven-plugin/3.6.2/liquibase-maven-plugin-3.6.2.jar
[ERROR] urls[1] = file:/C:/Users/sryan/.m2/repository/com/econiq/db/econiq-db-h2/4.0.0-SNAPSHOT/econiq-db-h2-4.0.0-SNAPSHOT.jar
[ERROR] urls[2] = file:/C:/Users/sryan/.m2/repository/com/econiq/db/econiq-db-common/4.0.0-SNAPSHOT/econiq-db-common-4.0.0-SNAPSHOT.jar
[ERROR] urls[3] = file:/C:/Users/sryan/.m2/repository/org/codehaus/plexus/plexus-utils/1.0.4/plexus-utils-1.0.4.jar
[ERROR] urls[4] = file:/C:/Users/sryan/.m2/repository/org/liquibase/liquibase-core/3.6.2/liquibase-core-3.6.2.jar
[ERROR] urls[5] = file:/C:/Users/sryan/.m2/repository/org/yaml/snakeyaml/1.18/snakeyaml-1.18.jar
[ERROR] urls[6] = file:/C:/Users/sryan/.m2/repository/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar
[ERROR] urls[7] = file:/C:/Users/sryan/.m2/repository/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar
[ERROR] Number of foreign imports: 1
[ERROR] import: Entry[import  from realm ClassRealm[project>com.econiq.rest:econiq-rest-it:4.0.0-SNAPSHOT, parent: ClassRealm[maven.api, parent: null]]]
[ERROR]
[ERROR] -----------------------------------------------------
[ERROR] : java.sql.Driver

我知道liquibase确实可以与Java 10一起运行,因为我还有一个单独的pom.xml,它可以启动独立的WildFly 14服务器,并且可以使用liquibase-maven-plugin在任何更新的模式下运行,并且运行良好。完全困惑为什么我将其作为集成测试运行时找不到java.sql.Driver。

我正在使用最新的liquibase-maven-plugin 3.6.2,但我确实看到它正在使用较旧的plexus-utils,因此我想知道是否是较早的plexus-utils引起了该问题。在Java 10中使用liquibase时,其他人有类似的想法吗?

0 个答案:

没有答案