Maven 依赖离线Jar包

Maven 引入离线Jar包

  • 第一种方法讲Jar包安装到本地Maven仓库
mvn install:install-file -Dfile=jar包的位置 -DgroupId=groupId -DartifactId=artifactId -Dversion=version -Dpackaging=jar

  • 第二种方法讲jar包放在Lib文件夹
        <dependency>
            <groupId>test</groupId>
            <artifactId>jar-test</artifactId>
            <version>1.0.0</version>
            <scope>system</scope>
            <systemPath>${pom.basedir}/src/main/lib/XXX.jar</systemPath>
        </dependency>

posted @ 2021-02-24 15:41  ynsocool  阅读(569)  评论(0)    收藏  举报