Loading... ## 1. 问题 在开发项目时,有些jar包是非maven 仓库的第三方jar 包,比如公司内部的SDK或者第三方平台的SDK 等等。在项目开发时,可以通过IDEA的 add as library添加 但是如果使用maven打包项目的时候会提示找不到xxxxx ## 2. 解决 ``` <dependency> <groupId>com.wanlingyun</groupId> <artifactId>EmotionalClassification</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/EmotionalClassification.jar</systemPath> </dependency> <dependency> <groupId>com.wanlingyun</groupId> <artifactId>lfasr-sdk-client</artifactId> <version>2.0.0.1005</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/lfasr-sdk-client-2.0.0.1005-jar-with-dependencies.jar</systemPath> </dependency> <dependency> <groupId>com.wanlingyun</groupId> <artifactId>Msc</artifactId> <version>1.0</version> <scope>system</scope> <systemPath>${project.basedir}/src/main/resources/lib/Msc.jar</systemPath> </dependency> ``` pom文件引入 scope 为 `system` 的依赖 systemPath为jar包所在位置 ${project.basedir} 为项目所在目录 groupId 和 artifactId 随便起 建议遵循规范 方便后续开发人员开发 Last modification:April 25, 2022 © Allow specification reprint Support Appreciate the author AliPayWeChat Like 0 感谢大佬投喂 啾咪~