首页 > IT职业 > IT职场 > Maven安装本地jar
有些时候我们有些jar包在远程仓库无法下载,这时我们可以采用本地安装的形式,进行安装。
mvn install:install-file -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=6.2.0 -Dpackaging=jar -Dfile=ojdbc6.jar
<modelVersion>4.0.0</modelVersion> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>6.2.0</version> <description> POM was created from install:install-file </description>
<dependency> <modelVersion>4.0.0</modelVersion> <groupId>com.oracle</groupId> <artifactId>ojdbc6</artifactId> <version>6.2.0</version> <description> POM was created from install:install-file </description></dependency>
至此在本地仓库就安装了本地提供的jar包
作者:年少时难免轻狂Ho
链接:https://www.jianshu.com/p/b4289ca644c0
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1064/viewspace-2817748/ ,如需转载,请注明出处,否则将追究法律责任。