Hello,
I’m trying to connect my maven for liquibase plugin to my Oracle ATP Database ( 19c).
I had that connection directly from liquibase and it works fine.
but thought properties file for Maven it throws error:
liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: liquibase.exception.DatabaseException: Connection could not be created to jdbc:oracle:thin:@rgatp28_high?TNS_ADMIN=Wallet_RGATP28 with driver oracle.jdbc.OracleDriver. Błąd we-wy: could not resolve the connect identifier "rgatp28_high"
I had the same maven project pom.xml file configured for my local database and it works fine ( so I assume that it’s not Oracle drivers problem?)
My properties file for Maven for Oracle ATP is:
changeLogFile: db/changelog/changelog_version-3.2.h2.sql
url: jdbc:oracle:thin:@rgatp28_high?TNS_ADMIN=Wallet_RGATP28
username:
password:
classpath: ojdbc8.jar
My pom.xml file:
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.1.RELEASE</version>
</parent>
<groupId>net.codejava</groupId>
<artifactId>SalesManager</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>demo</name>
<description>Demo project for Spring Boot</description>
<properties>
<java.version>1.8</java.version>
<liquibase.propertyFile>local.liquibase.properties</liquibase.propertyFile>
</properties>
<profiles>
<profile>
<id>TEST</id>
<properties>
<liquibase.propertyFile>TEST.liquibase.properties</liquibase.propertyFile>
</properties>
</profile>
</profiles>
<dependencies>
<!-- https://mvnrepository.com/artifact/com.oracle.database.jdbc/ojdbc8 -->
<dependency>
<groupId>com.oracle.database.jdbc</groupId>
<artifactId>ojdbc8</artifactId>
<version>21.1.0.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.1.1</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.4.200</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
<!-- Liquibase plugin is used here to run any mvn:liquibase commands within maven -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.3.1</version>
<configuration>
<propertyFile>${liquibase.propertyFile}</propertyFile>
</configuration>
</plugin>
</plugins>
</build>
</project>
P.S I’m trying to figure it out through learning at “Liquibase CI/CD Process” university course"