您的位置:首页 > 数据库 > Oracle

maven oracle jdbc jar

2016-03-17 16:44 337 查看
1.problem describe:

  when your dependency jar about oracle use code like this:

<!-- oracle-connector -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc14</artifactId>
<version>${oracle.connector.version}</version>
</dependency>

you will not really get jar through maven, because you don't have permission to get the jar.

2. sulution:

you can get the jar from some web site, and then install it to you local maven repository.

now i put my jar to D:ojdbc14.jar



3. Follow up

may be you will meet the problem(not support oracle driver 1.0), it says that your oracle jdbc version not support your environment.

ojdbc6 support JDK6, JDBC4.0.

import the jar to your local maven repository



you can set the dependency like this:

<!-- oracle-connector -->
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.2.0.1.0</version>
</dependency>

ok, the problem fixed.
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: