flyway maven 找不到 oracle.jdbc.OracleDriver



我正在尝试使用以下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

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

最新更新