一、安装到本地
mvn install:install-file -Dfile=D:\........\asm-3.3.1.jar -DgroupId=com.test -DartifactId=abcdefg -Dversion=1.0.0 -Dpackaging=jar
说明:
-Dfile 本地Jar路径
-DgroupId:对应groupId
-DartifactId:对应artifactId
-Dversion:版本号
二、上传私服Nenux
安装在本地只能个人使用,上传到私服后其他人可像公有jar包一样直接依赖(maven中需配置该私服),一般私有或第三方Jar都上传在3rd party中,在4中填写group\artifact\version信息,5选择本地jar,点击6、7,即可上传,如图所示,上传成功后在POM中添加依赖:
<dependency>
<groupId>com.test</groupId>
<artifactId>abcdefg</artifactId>
<version>1.0.0</version>
</dependency>