0
点赞
收藏
分享

微信扫一扫

maven引入本地jar不能打入部署包的问题解决

星巢文化 2022-02-04 阅读 81
mavenjarjava

引入本地包:

<!-- 拼多多 -->
        <dependency>
            <groupId>com.pdd.pop</groupId>
            <artifactId>pos</artifactId>
            <version>20220130</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/pop-sdk-1.12.12-all.jar</systemPath>
        </dependency>
        <dependency>
            <groupId>com.pdd.pop</groupId>
            <artifactId>pos-spirce</artifactId>
            <version>20220130</version>
            <scope>system</scope>
            <systemPath>${basedir}/lib/pop-sdk-1.12.12-all-sources.jar</systemPath>
        </dependency>

打包:maven默认是不会把本地包打进入,这时候就要加个配置

<configuration>
   <includeSystemScope>true</includeSystemScope>
</configuration>

完整的: 

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

相关推荐

0 条评论