运维开发网

打包jar包时 如何将外部依赖包含进去

运维开发网 https://www.qedev.com 2020-10-20 08:20 出处:51CTO 作者:fhspringcloud
本地依赖 <!-- modbus -->         <dependency>             <groupId>com.infiniteautomation</groupId>             <artifactId>modbus4j</artifactId>             <versio

本地依赖

 <!-- modbus -->
        <dependency>
            <groupId>com.infiniteautomation</groupId>
            <artifactId>modbus4j</artifactId>
            <version>${modbus4j.version}</version>
            <scope>system</scope>
            <systemPath>${project.basedir}/lib/modbus/modbus4j-3.0.5.jar</systemPath>
        </dependency>

声明打包时包含本地jar包

<!-- 打包时包含本地包 java项目www.fhadmin.org-->
            <resource>
                <directory>lib</directory>
                <targetPath>BOOT-INF/lib/</targetPath>
                <includes>
                    <include>**/*.jar</include>
                </includes>
            </resource>
<!-- 读取resource文件夹下的所有文件-->
            <resource>
                <directory>src/main/resources</directory>
                <includes>
                    <include>**/*.*</include>
                </includes>
            </resource>

 

扫码领视频副本.gif

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号