执行命令:
- mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.1.0 -Dpackaging=jar -Dfile=ojdbc14.jar
输出:
- C:\oracle\product\10.2.0\db_1\jdbc\lib>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2
- .0.1.0 -Dpackaging=jar -Dfile=ojdbc14.jar
- [INFO] Scanning for projects...
- [INFO]
- [INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread
- count of 1
- [INFO]
- [INFO] ------------------------------------------------------------------------
- [INFO] Building Maven Stub Project (No POM) 1
- [INFO] ------------------------------------------------------------------------
- [INFO]
- [INFO] --- maven-install-plugin:2.4:install-file (default-cli) @ standalone-pom ---
- Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom
- Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.pom (3 KB at 2
- .2 KB/sec)
- Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom
- Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus/3.1/plexus-3.1.pom (19 KB at 21.1 KB/sec)
- Downloading: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar
- Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/3.0.5/plexus-utils-3.0.5.jar (226 KB at
- 89.4 KB/sec)
- [INFO] Installing C:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar to E:\maven\.m2\repository\com\oracle\ojdbc14\10.2.
- 0.1.0\ojdbc14-10.2.0.1.0.jar
- [INFO] Installing C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\mvninstall2983482348837640036.pom to E:\maven\.m2\repository\com\or
- acle\ojdbc14\10.2.0.1.0\ojdbc14-10.2.0.1.0.pom
- [INFO] ------------------------------------------------------------------------
- [INFO] BUILD SUCCESS
- [INFO] ------------------------------------------------------------------------
- [INFO] Total time: 7.734 s
- [INFO] Finished at: 2014-04-19T20:44:56+08:00
- [INFO] Final Memory: 3M/15M
- [INFO] ------------------------------------------------------------------------
- C:\oracle\product\10.2.0\db_1\jdbc\lib>
这样就添加到maven里去了。
pom文件里:
- <dependency>
- <groupId>com.oracle</groupId>
- <artifactId>ojdbc14</artifactId>
- <version>10.2.0.1.0</version>
- </dependency>