安装Jar包到本地仓库(local repository)

来源:互联网 发布:mac docker lnmp 编辑:程序博客网 时间:2024/06/10 09:01

         将本地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 构建图