如何将本地的jar包导入到本地的仓库
第一步:首先先到网上仓库中找到你需要的jar包
http://mvnrepository.com/
http://search.maven.org/
http://repository.sonatype.org/content/groups/public/
http://people.apache.org/repo/m2-snapshot-repository/
http://people.apache.org/repo/m2-incubating-repository/
推荐第一个和第三个
第二步:找到之后到本地,打开cmd,输入命令
mvn install:install-file -Dfile=jar包的位置 -DgroupId=网站上显示的groupid -DartifactId=网站上显示的artifactId -Dversion=jar包的版本 -Dpackaging=jar
例如:从maven仓库找到这个包
<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc</artifactId>
<version>6</version>
</dependency>
cmd中的命令就是这样的
mvn install:install-file -Dfile=D:/ojdbc.jar -DgroupId=com.oracle -DartifactId=ojdbc -Dversion=6 -Dpackaging=jar