2

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

Community
  • 1
  • 1
Jacob
  • 14,463
  • 65
  • 207
  • 320
  • Did you install it in your repository using mvn install:install-file ? – Brian Agnew Nov 30 '12 at 10:43
  • @BrianAgnew Yes I did and after running that I have the following files in the same directory where I have copied jar file. `1) ojdbc6-11.2.0.3.jar.lastUpdated 2) ojdbc6-11.2.0.3.pom 3) _maven.repositories` – Jacob Nov 30 '12 at 10:46
  • Maybe that helps: Rightclick on your project -> Maven -> Update Project... – jens-na Nov 30 '12 at 10:52
  • I do not have `Update Project`, instead I have `Update Dependencies, Update Snapshots and Update Project Configuration` I tried all those but same error still persists. – Jacob Nov 30 '12 at 10:56

1 Answers1

4

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

Jacob
  • 14,463
  • 65
  • 207
  • 320