MAVEN安装本地jar包

    一般情况下,安装好Maven后,默认的中央仓库(central repository)已经可以正常使用,可以download大部分的jar包,但是有些jar包在中央仓库是找不到的,例如sybase的数据库驱动等,因此我们要手工安装到本地仓库中(local repository)。

  使用的命令是:

mvn install:install-file -Dfile=%_jar% -DgroupId=%_gid% -DartifactId=%_aid% -Dversion=%_ver% -Dpackaging=%_pkg%

   例子:

mvn install:install-file -Dfile=D:/jconn3-3.jar -DgroupId=sybase -DartifactId=jconn3 -Dversion=3 -Dpackaging=jar

  

    本文地址:http://ryan-d.iteye.com/blog/1543545

猜你喜欢

转载自ryan-d.iteye.com/blog/1543545