Maven:程序包xxx不存在,找不到符号 transitive dependencies (if any) will not be available, enable debug logging f

今天项目maven打包的时候报错"程序包com.netflix.zuul不存在",但是看项目依赖包目录里是有这个jar包的,导致运行不报错,打包就报错
在这里插入图片描述
注意打包时还有一段警告:

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

大致原因是我们引入的jar包(A)里依赖了别的包(B),但是A包的pom文件失效了,导致依赖包(B)没有引入进来。

解决方式:将本地maven库里的jar包删除,重新maven update一遍,查看maven日志,下载jar包的时候若没有报错,能成功下载完整jar包到本地库的话,问题就能解决。

> sudo mvn clean package [sudo] password for shl: [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.xkhy.tafang:tafang-server:jar:1.0-SNAPSHOT [WARNING] 'dependencies.dependency.systemPath' for com.cca:cca-agent:jar should not point at files within the project directory, ${project.basedir}/lib/cca-agent-0.0.2.jar will be unresolvable by dependent projects @ line 160, column 16 [WARNING] 'dependencies.dependency.systemPath' for com.cca:cca-core:jar should not point at files within the project directory, ${project.basedir}/lib/cca-core-0.0.39.jar will be unresolvable by dependent projects @ line 167, column 25 [WARNING] 'dependencies.dependency.systemPath' for com.cdi-api:cdi-api:jar should not point at files within the project directory, ${project.basedir}/lib/cdi-api-1.0.jar will be unresolvable by dependent projects @ line 174, column 25 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] -------------------< com.xkhy.tafang:tafang-server >-------------------- [INFO] Building tafang-server 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [WARNING] The POM for com.xkhy.tafang:tafang-common:jar:0.0.12 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details / 解读一下警告。
最新发布
05-22
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值