一、背景

在A模块中引入B模块,C服务引入A模块但是B模块没有传递进来。

二、排查

使用mvn clean install -Dmaven.test.skip=true查看打包日志信息,通过搜索A模块名称,出现如下警告信息:

[WARING] The POM for A:jar:0.0.1-SNAPSHOT is invalid, transitive dependencies(if any)will not be available, enable debug logging for more details

查看jar依赖树,执行如下命令:
mvn -X dependency:tree>tree.txt

WARNING] The POM for com.ksyun.dc:meta-source:jar:0.0.1-SNAPSHOT is invalid, transitive dependencies (if any) will not be available: 2 problems were encountered while building the effective model for A:jar:0.0.1-SNAPSHOT[ERROR] 'dependencies.dependency.systemPath' for com.oracle:ojdbc6:jar must specify an absolute path but is ${project.basedir}/lib/ojdbc6-11.2.0.4.0.jar @[ERROR] 'dependencies.dependency.systemPath' for com.ali:oceanbase:jar must specify an absolute path but is ${project.basedir}/lib/oceanbase-client-1.1.5.jar @

显示引入本地jar时需要使用绝对路径,而非相对路径。