flyway maven找不到oracle.jdbc.OracleDriver

问题描述 投票:0回答:1

我正在尝试使用以下maven插件配置和以下命令从maven运行flyway:mvn -Dflyway.configFiles = / myfolder / flyway.conf flyway:info

<plugin>
    <groupId>org.flywaydb</groupId>
    <artifactId>flyway-maven-plugin</artifactId>
    <version>6.3.2</version>
    <dependencies>
        <dependency>
            <groupId>org.flywaydb</groupId>
            <artifactId>flyway-core</artifactId>
            <version>6.3.2</version>
        </dependency>
        <dependency>
            <groupId>com.oracle.jdbc</groupId>
            <artifactId>ojdbc8</artifactId>
            <version>18.3.0.0</version>
        </dependency>
    </dependencies>
</plugin>

但是我得到以下异常:谁能帮我解决这个问题。我在任何地方都找不到关于类似问题的讨论。

[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:5.2.4:info (default-cli) on project tms: org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver => Check whether the jar file is present -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.flywaydb:flyway-maven-plugin:5.2.4:info (default-cli) on project tms: org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver => Check whether the jar file is present

org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.flywaydb:flyway-maven-plugin:5.2.4:info (default-cli) on project tms: org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver => Check whether the jar file is present

Caused by: org.apache.maven.plugin.MojoExecutionException: org.flywaydb.core.api.FlywayException: Unable to instantiate JDBC driver: oracle.jdbc.OracleDriver => Check whether the jar file is present


oracle maven flyway ojdbc
1个回答
0
投票

OJDBC依赖关系不在Maven中央存储库中,而在http://maven.icm.edu.pl/artifactory/repo/存储库中。您必须在Maven settings.xml文件中配置此存储库

© www.soinside.com 2019 - 2024. All rights reserved.