美文网首页
springboot 打包外部引入的jar包

springboot 打包外部引入的jar包

作者: 写代码的杰西 | 来源:发表于2022-08-01 16:44 被阅读0次

    pom.xml


    image.png

    外部目录
    引入dependency, groupid 和artifactid 和version都是自己补充的 ,可以随便写,尽量和jar包一致

    <dependency>
                <groupId>com.huawei</groupId>
                <artifactId>mqttv3</artifactId>
                <scope>system</scope>
                <version>1.2.1</version>
                <systemPath>${pom.basedir}/libs/org.eclipse.paho.client.mqttv3-1.2.1.jar</systemPath>
            </dependency>
    
    

    build =》plugins下添加这个

    <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <includeSystemScope>true</includeSystemScope>
                    </configuration>
                </plugin>
    

    然后打包就可以了

    相关文章

      网友评论

          本文标题:springboot 打包外部引入的jar包

          本文链接:https://www.haomeiwen.com/subject/gfprwrtx.html