问题描述
bug:'dependencyManagement.dependencies.dependency.systemPath' for initlssvm:initlssvm:jar refers to a non-existing file ‘D:/.../hebei_stbc/stbc-quartz/stbc-web/src/main/lib/initlssvm.jar:
在dependencyManagement中引入本地第三方jar包报错:原代码如下
:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>xxxx</groupId>
<artifactId>xxxxx</artifactId>
<scope>system</scope>
<systemPath>${project.basedir}/stbc-web/src/main/lib/xxx.jar</systemPath>
</dependency>
</dependencies>
</dependencyManagement>
问题我定位到了,但是不知道啥原因
1 这个是我项目结构
1我的第三方jar包是在最外层的pom中也就是项目更目录下引入的
正常路径来说应该是D:/.../projecName/stbc-web/src/main/lib/xxx.jar
但是程序报错的路径确实D:/.../projecName/stbc-web/stbc-quartz/src/main/lib/xxx.jar
多加了一个模块名称
解决方案:
将dependencyManagement标签去掉,在dependencies中引入即可,如下
<dependencies>
<dependency>
<groupId>xxx</groupId>
<artifactId>xxx</artifactId>
<scope>system</scope>
<systemPath>${project.basedir}/stbc-web/src/main/lib/x xx</systemPath>
</dependency>
</dependencies>