Reputation: 2290
I want to integrate flyway with maven and oracle db. At first I want to make a simple test if there are simple migrations possible, so I made a build part of pom file as the following (as described in flyway official page):
<build>
<plugins>
<plugin>
<groupId>org.flywaydb</groupId>
<artifactId>flyway-maven-plugin</artifactId>
<version>4.2.0</version>
<configuration>
<url>jdbc:oracle:thin:@localhost:1521:XE</url>
<user>test</user>
<password>test</password>
<schemas>
<schema>TEST</schema>
</schemas>
</configuration>
<dependencies>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
But when I'm trying to run flyway:migrate or flyway:info goal, I'm getting the following error, which I do not know with what is connected..
[ERROR] Failed to execute goal org.flywaydb:flyway-maven-plugin:4.2.0:info (default-cli) on project gwm-admin: Execution default-cli of goal org.flywaydb:flyway-maven-plugin:4.2.0:info failed: Plugin org.fl
ywaydb:flyway-maven-plugin:4.2.0 or one of its dependencies could not be resolved: Could not transfer artifact com.oracle:ojdbc14:jar:10.2.0.4.0 from/to flyway-repo-private (s3://flyway-repo/release): Canno
t access s3://flyway-repo/release with type default using the available connector factories: BasicRepositoryConnectorFactory: Cannot access s3://flyway-repo/release using the registered transporter factorie
s: WagonTransporterFactory: java.util.NoSuchElementException
[ERROR] role: org.apache.maven.wagon.Wagon
[ERROR] roleHint: s3
[ERROR] -> [Help 1]
Upvotes: 0
Views: 1399
Reputation: 19
use this code:
<properties>
<maven.compiler.source> java version </maven.compiler.source>
<maven.compiler.target> java version </maven.compiler.target>
</properties>
<dependencies>
<!-- Fly way -->
<dependency>
<groupId>com.googlecode.flyway</groupId>
<artifactId>flyway-core</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>10.2.0.4.0</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
(...)
</plugin>
</plugins>
</build>
Upvotes: 0
Reputation: 2290
As wrote @Arkadiusz Łukasiewicz in comment, oracle jdbc driver need to be added manually. More informations about could be found here : mkyong post
On the other hand, after the driver was added I got another error which can be resolved by moving a dependency out of plugin part into main dependencies of pom.xml file
Upvotes: 1