安装Jar包到本地Maven库
有些Jar包MAVNE中央库并没有,例如Oracle数据库驱动是收费Jar,所以MAVEN中央仓库上并没有,我们需要在Oracle网站上下载到本地磁盘,在安装到我们的本地Maven库中。
1、在Oracle网站上下载ojdbc6.jar(11gR2开始带的驱动类,JDK6编译。性能和稳定性都高于class12和ojdbc14),这里是放到D:\下。
2、使用mvninstall:install-file命令安装
-DgroupId=com.oracle
-DartifactId=ojdbc6
-Dversion=11.2.0.4.0
分别对应pom文件中的信息
<dependency> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>11.2.0.4.0</version> </dependency>
D:\workspace64\ssm>mvn install:install-file -DgroupId=com.oracle -DartifactId=oj dbc6 -Dversion=11.2.0.4.0 -Dpackaging=jar -Dfile=D:\ojdbc6.jar [INFO] Scanning for projects... [INFO] [INFO] ------------------------------------------------------------------------ [INFO] Building ssm Maven Webapp 1.0-SNAPSHOT [INFO] ------------------------------------------------------------------------ [INFO] [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ ssm --- [INFO] Installing D:\ojdbc6.jar to D:\work\repository\com\oracle\ojdbc6\11.2.0.4 .0\ojdbc6-11.2.0.4.0.jar [INFO] Installing C:\Users\Admin\AppData\Local\Temp\mvninstall247997583601757201 3.pom to D:\work\repository\com\oracle\ojdbc6\11.2.0.4.0\ojdbc6-11.2.0.4.0.pom [INFO] ------------------------------------------------------------------------ [INFO] BUILD SUCCESS [INFO] ------------------------------------------------------------------------ [INFO] Total time: 0.682 s [INFO] Finished at: 2015-12-08T12:29:40+08:00 [INFO] Final Memory: 6M/180M [INFO] ------------------------------------------------------------------------ D:\workspace64\ssm>
相关推荐
lklong 2020-11-22
oraclemch 2020-11-06
shilukun 2020-10-10
周嘉笙 2020-11-09
iilegend 2020-10-19
EricRay 2020-10-16
zhuzhufxz 2020-09-16
dataminer 2020-08-17
bfcady 2020-08-16
Hody 2020-08-16
FightFourEggs 2020-08-16
数据库设计 2020-08-16
Seandba 2020-08-16
Omega 2020-08-16
zjyzz 2020-08-16
yanghuatong 2020-08-16
ktyl000 2020-08-16
dbasunny 2020-08-16