0

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.

navis1692
  • 298
  • 2
  • 13
  • Possible duplicate of [Maven2: Missing artifact but jars are in place](https://stackoverflow.com/questions/6111408/maven2-missing-artifact-but-jars-are-in-place) – Ravi Dec 30 '17 at 12:28
  • no duplicates here...in C:\Users\Hp\.m2\repository\oracle\ojdbc6\11.2.0.3 and no downloaded jars here..... – navis1692 Dec 30 '17 at 12:33
  • Did you tried what was mentioned in same post. And it says **possible** duplicate, not exact duplicate. That is for your reference. – Ravi Dec 30 '17 at 12:36
  • 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 Dec 30 '17 at 12:44
  • 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 Dec 30 '17 at 12:45
  • in cmd i am getting build successful as you can see in that screenshot but still my odbc jars are not getting downloaded in maven dependency and i am getting the same error in pom.xml which i was getting in start i.e."Missing artifact com.oracle.jdbc:ojdbc6:jar:11.2.0.3" – navis1692 Dec 30 '17 at 12:54

1 Answers1

0

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.

Stephen C
  • 698,415
  • 94
  • 811
  • 1,216
  • yesterday i did what you are trying to say but it didnt worked and today it worked...thank you for reminding this again....its solved – navis1692 Dec 30 '17 at 13:36