将本地jar包添加到本地maven仓库并pom引入

定位到jar包所在目录,运行maven命令:

mvn install:install-file -DgroupId=com.addJarTomaven -DartifactId=groovy -Dversion=1.0.0 -Dpackaging=jar -Dfile=groovy-all-2.4.3.jar

DgroupId为自定义的groupId,DartifactId为自定义的artifactId,Dversion为自定义的version,对应pom。
成功会显示build success

pom引入:


            com.addJarTomaven
            groovy
            1.0.0
        

你可能感兴趣的:(将本地jar包添加到本地maven仓库并pom引入)