Maven 进阶--- 引用lib下的本地jar

一、文件目录结构

这里写图片描述

二、引用本地jar方法

pom.xml 核心内容

    <dependencies>
        <dependency>
            <groupId>org.xavier</groupId>
            <artifactId>Utils</artifactId>
            <version>1.0</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/src/main/resources/lib/Utils-1.0-jar-with-dependencies.jar</systemPath>
        </dependency>
    </dependencies>

如是操作后,即可将 lib 目录下的 Utils-1.0-jar-with-dependencies.jar 依赖引入当前项目

猜你喜欢

转载自blog.csdn.net/u014430366/article/details/76852954