idea 引入外部jar 无法打包到项目里
1. maven引用外部的jar,在pom.xml添加
1 <dependencies> 2 <!-- 外部依赖库 --> 3 <dependency> 4 <groupId>com.www</groupId> 5 <artifactId>client</artifactId> 6 <version>2.8</version> 7 <scope>system</scope> 8 <systemPath>${project.basedir}/mylib/client.jar</systemPath> 10 </dependency> 11 </dependencies>
2. 项目打包遇到问题,引入的外部jar一直无法打包到项目jar里面;在网上也查询很多解决办法一直不生效,最终在打包插件中添加配置后问题解决
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<!-- 添加配置如下-->
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
作者:風巽千龍

浙公网安备 33010602011771号