jar位置如下图所示:

引用jar包,可以在pom中设置jar包路径
<dependency>
<groupId>examples</groupId>
<artifactId>examples</artifactId>
<version>1.3.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/libs/examples.jar</systemPath>
</dependency>
<dependency>
<groupId>jna</groupId>
<artifactId>jna</artifactId>
<version>1.3.1</version>
<scope>system</scope>
<systemPath>${project.basedir}/src/main/resources/libs/jna.jar</systemPath>
</dependency>
最后,在pom中设置下列属性
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<includeSystemScope>true</includeSystemScope>
</configuration>
</plugin>
</plugins>
</build>
本文详细介绍了如何在Maven项目中配置系统依赖,通过在pom.xml文件中指定本地jar包路径,实现对特定版本库的引用。同时,文章还讲解了如何设置spring-boot-maven-plugin插件以包含系统范围内的依赖。
1418

被折叠的 条评论
为什么被折叠?



