将本地jar包安装到本地jar仓库中,一条简单的命令就可以实现。
命令格式: mvn install:install-file -Dfile={jar路径} -DgroupId={groupId 值} -DartifactId={artifactId值} -Dversion={版本号} -Dpackaging=jar -DlocalRepositoryPath={m2home path值,本地maven repo路径}
e.g. 安装mom4j-1.01.jar包:
mvn install:install-file -Dfile=D:\githubRepo\John\mom4j-1.01.jar\
-DgroupId=mom4j -DartifactId=mom4j -Dversion=1.01 -Dpackaging=jar\
-DlocalRepositoryPath=D:\githubRepo\M2_HOME

maven 构建图

本文介绍如何使用Maven命令将本地的jar包安装到Maven本地仓库中。通过一条简单的命令即可完成整个过程,并提供了具体的命令示例。

1万+

被折叠的 条评论
为什么被折叠?



