默认分类,Java,Maven

Maven命令之--mvn install:install-file

mvn install:install-file:主要是将本地自定义jar安装到maven仓库,然后在pom中可以直接通过dependency的方式来引用。
此命令有如参数:

命令说明
-DgroupId=自定义groupId设置groupId 名
-DartifactId=自定义artifactId设置该包artifactId名
-Dversion=自定义版本1.0.0设置版本号
-Dpackaging=jar设置该包的类型,有如下值:pom、jar、war、maven-plugin。但是一般常用的是jar类型
-Dfile=文件路径设置该jar包文件所在的路径与文件名
mvn install:install-file -DgroupId=com.google.errorprone -DartifactId=javac -Dversion=9+181-r4173-1 -Dpackaging=jar -Dfile=D:\Downloads\javac-9+181-r4173-1.jar

回复

This is just a placeholder img.