将外部jar包打入本地maven仓库

来源:互联网 发布:女装搭配整套的淘宝店 编辑:程序博客网 时间:2024/06/14 00:41

pom.xml

<dependency>
        <groupId>comlib.ognl</groupId>
          <artifactId>Ognl</artifactId>
          <version>1.0</version>
    </dependency>


cmd命令

mvn install:install-file -Dfile=D:\appcode\Ognl-1.0.jar -DgroupId=comlib.ognl -DartifactId=Ognl -Dversion=1.0-Dpackaging=jar

Dfile是jar包所在的位置

Dgroupid是<groupId>中的内容

DartifactId是<artifactId>中的内容

Dversion是<version>中的内容

0 0