Maven添加本地jar包

在做项目的时候,有时候使用Maven包管理的时候,需要导入添加本地jar包,如何正确的导入添加本地jar包呢,经过多次尝试,记录一下。

首先创建lib文件夹将examples.jar和jna.jar导入进来,然后编写pom.xml文件

com.sun.jnajna1.0.1system${basedir}/lib/jna.jarcom.sun.jna.examplesexamples0.0.1system${basedir}/lib/examples.jarorg.jsonjson1.0.1system${basedir}/lib/json.jar

打包的时候,需要配置

org.springframework.bootspring-boot-maven-plugin2.5.15truetrue


评论 (0)
说点什么吧... (取消回复)