0
votes

Edit>> Declaimer : This is not repeated question..

Hi Guys i am new to maven and i am trying to make an application which interact with oracle database but getting "Missing artifact com.oracle.jdbc:ojdbc6:jar:11.2.0.3" error. I have tried

Step1:

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

Step2:

and in POM.xml

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

After then i am getting build successful in cmd

enter image description here

Step3:

besides this i have also made changes in windows>preference>maven>installation and usersettings..

I have already wasted 3 days in this only. Please help to resolve this. Please let me know if you want any other information.

1
no duplicates here...in C:\Users\Hp\.m2\repository\oracle\ojdbc6\11.2.0.3 and no downloaded jars here.....navis1692
Did you tried what was mentioned in same post. And it says possible duplicate, not exact duplicate. That is for your reference.Ravi
was trying the same post since 2 days but not able to resolve. in that post build is successful and i am not moving after that...navis1692
I don't understand what you're asking. If your build is successful, then you don't have the error anymore. So what is the problem?JB Nizet

1 Answers

0
votes

In Step 1, you have loaded the JAR into your local repo with a different groupId to the one that you are using as the dependency in Step 2. Look carefully at the -DgroupId parameter.