1、安装jar到本地maven仓库
mvn install:install-file -Dfile=D:\jcifs-1.3.17.jar -DgroupId=jcifs -DartifactId=jcifs -Dversion=1.3.17 -Dpackaging=jar
2、安装jar到nexus
mvn deploy:deploy-file -DgroupId=com.microsoft.sqlserver -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar -Dfile=/Users/zhiqsyr/dev/sqljdbc4-4.0.jar -Durl=http://localhost:8081/repository/maven-third-party/ -DrepositoryId=nexus
注意-DrepositoryId是指settings.xml中server的id
当-DrepositoryId赋值错误时,报出如下异常:
信息: I/O exception (java.net.SocketException) caught when processing request to {}->http://localhost:8081: Broken pipe