maven 手动安装本地jar包

maven 手动安装jar包

1、需要知道groupId、artifactId、version
通过 cmd命令行执行 mvn install:install-file ,比如安装 ojdbc14-10.2.0.2.0.jar如下;

mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.2.0 -Dpackaging=jar -Dfile=E:\oracle\ojdbc14-10.2.0.2.0.jar



C:\Users\Administrator>mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc14 -Dversion=10.2.0.2.0 -Dpackaging=jar -Dfile=E:\oracle\ojdbc1
4-10.2.0.2.0.jar
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Maven Stub Project (No POM) 1
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-install-plugin:2.3.1:install-file (default-cli) @ standalone-pom ---
[INFO] Installing E:\oracle\ojdbc14-10.2.0.2.0.jar to E:\maven3\repository\com\oracle\ojdbc14\10.2.0.2.0\ojdbc14-10.2.0.2.0.jar
[INFO] Installing C:\Users\ADMINI~1\AppData\Local\Temp\mvninstall61240.pom to E:\maven3\repository\com\oracle\ojdbc14\10.2.0.2.0\ojdbc14-10.2.0.2.0.po
m
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.173s
[INFO] Finished at: Fri Aug 22 12:00:30 CST 2014
[INFO] Final Memory: 2M/4M
[INFO] ------------------------------------------------------------------------

你可能感兴趣的:(maven3)