Home > front end >  Plugin .url=jdbc:oracle:thin or one of its dependencies could not be resolved - Spring Boot liquibas
Plugin .url=jdbc:oracle:thin or one of its dependencies could not be resolved - Spring Boot liquibas

Time:12-22

I'm currently working in my company developing an API in Spring Boot with an Oracle database, the problem is that we use liquibase to create the database, and when I try to use the command:

mvn liquibase:update -Dliquibase.url="jdbc:oracle:thin:@..." -Dliquibase.username="xxx" -Dliquibase.password="xxx" -Dinterface-user="xxx" -Dtablespace-tablas="xxx" -Dtablespace-indices="xxx" -Dstorage-tablas="xxx" -Dstorage-indices="xxx"

It returns me this error:

Plugin .url=jdbc:oracle:thin or one of its dependencies could not be resolved: Failure to find .url=jdbc:oracle:jar:thin in https://maven.oracle
.com was cached in the local repository, resolution will not be reattempted until the update interval of maven.oracle.com has elapsed or updates are for
ced -> [Help 1]

I think it is related with the dependency ojdbc8 from oracle but I can't figure out how to make it work. I know that all the credentials for the database and everything are correct as I can totally use them to connect to the database with a db manager.

Here is my dependency in pom.xml:

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc8</artifactId>
    <version>19.3</version>
</dependency>

Right now I've tried these things:

  1. Downloading the dependency from maven repo (https://mvnrepository.com/artifact/com.oracle.ojdbc/ojdbc8/19.3.0.0) and installing it locally using the command: mvn install:install-file -Dfile=./ojdbc8.jar -DgroupId=com.oracle -DartifactId=ojdbc8 -Dversion=19.3 -Dpackaging=jar.

This supposedly installed the dependency locally, but still does not work.

  1. Adding the oracle server to the dependency repos in maven config, following this oracle guide (https://docs.oracle.com/middleware/1213/core/MAVEN/config_maven_repo.htm#MAVEN9016)

With this second change I manage to get a different error:

Plugin .url=jdbc:oracle:thin or one of its dependencies could not be resolved: Could not find artifact .url=jdbc:oracle:jar:thin in maven.oracle
.com (https://maven.oracle.com) -> [Help 1]

Could you help me find what am I doing wrong or something that I might be missing? Thanks!

CodePudding user response:

You need to use the follow GAV for downloading the JDBC driver from central maven. Refer to Maven guide for more details

<dependency>
        <groupId>com.oracle.database.jdbc</groupId>
        <artifactId>ojdbc8</artifactId>
        <version>19.3.0.0</version>
    </dependency>

CodePudding user response:

In the end, the main problem was that I was using the embedded console of IntelliJ and It wasn't working that way, I switched to cmd and it worked...

  • Related