欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

Maven 安装 Oracle JDBC驱动 odbcoracle驱动maven安装 

程序员文章站 2024-02-14 18:36:34
...

Oracle 的驱动需要授权下载,Maven不提供,需要我们自己独立安装。

 官方下载的全部驱动  打包下载(2016.8.10)(为什么需要登录再下载,怀疑Jar包中会保存下载人信息)

            http://pan.baidu.com/s/1bIxxKy

 

 

驱动下载地址:
			http://www.oracle.com/technetwork/database/features/jdbc/index-091264.html
------------------------------------------------------------------------
Oracle Database 12c Release 1 (12.1.0.2) drivers 
     Oracle Database 12.1.0.2 JDBC Driver & UCP Downloads
http://www.oracle.com/technetwork/database/features/jdbc/default-2280470.html

JDBC Thin driver from the Oracle database release
 	ojdbc7.jar  -  Certified with JDK7 and JDK 8
	ojdbc6.jar  -  For use with JDK 6; 
	
Universal Connection Pool (UCP) - Universal Connection Pool classes for use with JDK 6 & JDK 7


---------------------------------------------------------------------

Oracle Database 11g Release 2 JDBC Drivers
    Oracle Database 11g Release 2 (11.2.0.4) JDBC Drivers
http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html

 
JDBC Thin for All Platforms
 	ojdbc5.jar  -  Classes for use with JDK 1.5
	ojdbc6.jar  -  with JDK 8, JDK 7 and JDK 6
	


---------------------------------------------------------------------
Oracle Database 10g Release 2 JDBC Drivers 
	Oracle Database 10g Release 2 (10.2.0.5) JDBC Drivers (Unsupported)
	http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-10201-088211.html10g 
	
	 	classes12.jar  -    for use with JDK 1.2 and JDK 1.3
		classes14.jar  -    for use with JDK 1.4 and 1.5
		
------------------------------------------------------------

Maven安装:http://blog.csdn.net/chenzenan/article/details/30239041

cmd切换到每个单独的jar文件夹内运行如下命令(每个文件夹只能执行一条)

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc7 -Dversion=12.1.0.2 -Dpackaging=jar -Dfile=ojdbc7.jar
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=12.1.0.2 -Dpackaging=jar -Dfile=ojdbc6.jar
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.4 -Dpackaging=jar -Dfile=ojdbc6.jar
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc5 -Dversion=11.2.0.4 -Dpackaging=jar -Dfile=ojdbc5.jar
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc12 -Dversion=10.2.0.5 -Dpackaging=jar -Dfile=classes12.jar
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.5 -Dpackaging=jar -Dfile=ojdbc14.jar

 
------------Maven PoM.xml  Oracle 12C------------------------ 
	<!-- oracle-12c jdbc driver for JDK7&8 -->    
	<dependency>      
		<groupId>com.oracle</groupId>      
		<artifactId>ojdbc7</artifactId>      
		<version>12.1.0.2</version>  
	</dependency>  
	
	<!-- oracle-12c jdbc driver for JDK6 -->    
	<dependency>      
		<groupId>com.oracle</groupId>      
		<artifactId>ojdbc6</artifactId>      
		<version>12.1.0.2</version>  
	</dependency> 
  

------------Maven PoM.xml  Oracle 11g------------------------ 
	<!-- oracle-11g jdbc driver for JDK6&7&8 -->    
	<dependency>      
		<groupId>com.oracle</groupId>      
		<artifactId>ojdbc6</artifactId>      
		<version>11.2.0.4</version>  
	</dependency>  
	
	<!-- oracle-11g jdbc driver for JDK1.5 -->    
	<dependency>      
		<groupId>com.oracle</groupId>      
		<artifactId>ojdbc5</artifactId>      
		<version>11.2.0.4</version>  
	</dependency> 
  

------------Maven PoM.xml  Oracle 10g------------------------ 
	<!-- oracle-10g jdbc driver for JDK 1.2 & 1.3 -->    
	<dependency>      
		<groupId>com.oracle</groupId>      
		<artifactId>ojdbc12</artifactId>      
		<version>10.2.0.5</version>  
	</dependency>  
	
	<!-- oracle-10g jdbc driver for JDK 1.4 & 1.5 -->    
	<dependency>      
		<groupId>com.oracle</groupId>      
		<artifactId>ojdbc14</artifactId>      
		<version>10.2.0.5</version>  
	</dependency> 
  
----------------------------------------------------------------------------


另一个需要安装的

mvn install:install-file -Dfile=D:/spymemcached-2.10.3.jar -DgroupId=net.spy -DartifactId=spymemcached -Dversion=2.10.3 -Dpackaging=jar  
mvn install:install-file -Dfile=D:/spymemcached-2.10.3-sources.jar -DgroupId=net.spy -DartifactId=spymemcached -Dversion=2.10.3 -Dpackaging=jar -Dclassifier=sources  
mvn install:install-file -Dfile=D:/spymemcached-2.10.3-javadoc.jar -DgroupId=net.spy -DartifactId=spymemcached -Dversion=2.10.3 -Dpackaging=jar -Dclassifier=javadoc