Is there an issue with the oracle dependency?

2019-01-17 03:44发布

When I try to use the oracle dependency -

<dependency>
    <groupId>com.oracle</groupId>
    <artifactId>ojdbc14</artifactId>
    <version>10.2.0.4.0</version>
</dependency>

I receive a compile time build error - "Missing artifact com.oracle:ojdbc14:jar:10.2.0.4.0". This error is displayed when I hover over error marker (left of ) in attached image -

enter image description here

Is there an issue with this dependency or something I'm doing wrong ?

标签: maven maven-3
14条回答
孤傲高冷的网名
2楼-- · 2019-01-17 04:06

Try this working fine in oracle maven dependency

<repositories>
<!-- Repository for ORACLE ojdbc6. -->
<repository>
    <id>codelds</id>
    <url>https://code.lds.org/nexus/content/groups/main-repo</url>
</repository>

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

查看更多
干净又极端
3楼-- · 2019-01-17 04:08

I took the route of manually downloading the oracle ojdb14 jar and pom file, but instead of manually adding them to my local repo, I used maven:

    § mvn install:install-file -Dfile=ojdbc14-10.2.0.2.jar -DpomFile=ojdbc14-10.2.0.2.0.pom

This insured they were correctly installed in my local repo (see http://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html)

查看更多
Root(大扎)
4楼-- · 2019-01-17 04:09

I followed these steps and solved (for version 10.2.0.4.0):

  1. Add dependency with maven to your pom.
  2. Download the missing file that maven can't find
  3. Put the downloaded file into the repository: .m2\repository\com\oracle\ojdbc14\10.2.0.4.0\
  4. Refresh pom.xml and the error message should be gone.
查看更多
干净又极端
5楼-- · 2019-01-17 04:13

Do NOT use stone-age driver and rather the newest 11g one. Which you will deploy to your local Nexus instance.

查看更多
我欲成王,谁敢阻挡
6楼-- · 2019-01-17 04:17

Below should work as per this link which has been updated on Feb, 2016.

<dependency>
 <groupId>com.oracle.jdbc</groupId>
 <artifactId>ojdbc7</artifactId>
 <version>12.1.0.2</version>
</dependency>
查看更多
趁早两清
7楼-- · 2019-01-17 04:18

There is no such artifact in maven central repository: http://repo1.maven.org/maven2/com/oracle/ojdbc14/10.2.0.4.0 (only pom).

I guess due to some licensing issues you must download the file manually from JDBC, SQLJ, Oracle JPublisher and Universal Connection Pool (UCP) download page.

查看更多
登录 后发表回答