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

喜夏-厌秋 提交于 2020-10-21 01:50:24

本地依赖

 <!-- 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>

 


标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!