0

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

Error shows: Missing artifact com.oracle:ojdbc6:jar:11.2.0.3

all groupId,Version, artifactId is correct in my project this dependency is not works and i was also try to copy jar on local .m2 oracle maven repo but ,this is not still working. how to resolve this kind of errors?

Hongbin Wang
  • 1,186
  • 2
  • 14
  • 34

2 Answers2

-1

add the dependency for it in your pom.xml and when you will do mvn clean install it will do that for you Use the below maven dependency

<dependency>
<groupId>cn.guoyukun.jdbc</groupId>
<artifactId>oracle-ojdbc6</artifactId>
<version>11.2.0.3.0</version>

Kulbhushan Singh
  • 627
  • 4
  • 20
  • And it has nothing to do with your OS maven behaves uniformly evrywhere :) – Kulbhushan Singh Apr 27 '16 at 11:10
  • This will gives this type of [ERROR] Failed to execute goal on project mavenhiber: Could not resolve dependencies for project mavenhiber:mavenhiber:war:0.0.1-SNAPSHOT: Failure to find com.oracle:ojdbc6:jar:11.2.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. – sujit shelar Apr 27 '16 at 11:15
  • @sujitshelar @KulbhushanSingh There is no `cn.guoyukun.jdbc:oracle-ojdbc6` on [Maven Central](http://search.maven.org/#search|ga|1|oracle-ojdbc6). And if it were it'd apparently be a copyright infringement. Did you follow the link given in the first comment to the question? – Gerold Broser Apr 27 '16 at 13:18
  • i have copied the dependency from maven only, still it could be copyright infringement? http://mvnrepository.com/artifact/cn.guoyukun.jdbc/oracle-ojdbc6/11.2.0.3.0 – Kulbhushan Singh Apr 27 '16 at 17:11
  • Maybe not if you don't re-publish it somewhere else. Another serious topic is whether you trust http://www.guoyukun.cn/ enough to use a library which apparently has been re-published by them illegally and of which you (and me) don't know whether it has been tampered with or not. – Gerold Broser Apr 27 '16 at 18:44
  • true.. thanks Gerold – Kulbhushan Singh Apr 28 '16 at 06:10
-1

Copying only the jar to local repo will not help unless you also copy the related pom files. Maven is caching files and if the file was not accessible (e.g. no internet, wrong proxy settings, etc.), maven still remembers it. So remove the cached files (remove whole the particular folder from your .m2 repo) and try to build again. If you have the connection correct and you have also defined the repository where to download the file from, you should be fine.

I'm not sure if this jar file is in maven central, try to add this to your pom.xml or maven settings file.

<repositories>
    <repository>
      <id>codelds</id>
      <url>https://code.lds.org/nexus/content/groups/main-repo</url>
    </repository>
 </repositories>
pepan
  • 678
  • 6
  • 11
  • Cited from the link of the first comment to the question: "_Is that lds.org repository legal? According to this answer it is illegal: http://stackoverflow.com/a/1074971/1415732_" – "_Of course it's "better" to add some arbitrary repo to your project, yeah. Wow, this is wrong on so many levels_". – Gerold Broser Apr 27 '16 at 13:24