Search code examples
eclipsemavendriverm2eclipse

Manually downloaded Oracle driver but still getting Missing artifact com.oracle:ojdbc6:jar:11.2.0.3:compile


I have followed as mentioned in this article Find Oracle JDBC driver in Maven repository.

I have manually downloaded Oracle driver to maven\repo\com\oracle\ojdbc6\11.2.0.3 and added the following in pom.xml

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc6</artifactId>
    <version>11.2.0.3</version>
</dependency>

However I am still getting the following error

Missing artifact com.oracle:ojdbc6:jar:11.2.0.3:compile

What I am doing wrong and how can I resolve this issue?

Thanks


Solution

  • Issue can be resolved by doing the following steps

    • Run the below from the folder where ojdbc6.jar is copied

      mvn install:install-file -DgroupId=com. oracle -DartifactId=ojdbc6 -Dversion=11.2.0.3 -Dpackaging=jar -Dfile=ojdbc6.jar -DgeneratePom=true

    • Run the below from workspace

      mvn -U clean