mvn 报错 - The POM for <name> is invalid, transitive dependencies (if any) will not be available
核心: 通过 mvn dependency:tree -X 分析依赖
解决方案: 解决依赖冲突版本
1. MILGpController 编译突然报错
14:10:28 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.0:compile (default-compile) on project MILCWSGpPortlet: Compilation failure: Compilation failure:
14:10:28 [ERROR] /app/jenkins/workspace/HK-CWS/sit/HK_CWS_DV11/work/workspace/CWSWS_WPS8/MILCWSGpPortlet/src/manulife/hk/cws/portlet/empf/controller/MILGpController.java:[33,38] package manulife.common.framework.http does not exist
14:10:28 [ERROR] /app/jenkins/workspace/HK-CWS/sit/HK_CWS_DV11/work/workspace/CWSWS_WPS8/MILCWSGpPortlet/src/manulife/hk/cws/portlet/empf/controller/MILGpController.java:[163,9] cannot find symbol
14:10:28 [ERROR] symbol: class SessionStoreModel
14:10:28 [ERROR] location: class manulife.hk.cws.portlet.empf.controller.MILGpController
14:10:28 [ERROR] /app/jenkins/workspace/HK-CWS/sit/HK_CWS_DV11/work/workspace/CWSWS_WPS8/MILCWSGpPortlet/src/manulife/hk/cws/portlet/empf/controller/MILGpController.java:[163,47] cannot find symbol
14:10:28 [ERROR] symbol: variable SessionStoreModel
14:10:28 [ERROR] location: class manulife.hk.cws.portlet.empf.controller.MILGpController
14:10:28 [ERROR] -> [Help 1]
14:10:28 [ERROR]
14:10:28 [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
14:10:28 [ERROR] Re-run Maven using the -X switch to enable full debug logging.
14:10:28 [ERROR]
14:10:28 [ERROR] For more information about the errors and possible solutions, please read the following articles:
14:10:28 [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
14:10:28 [ERROR]
14:10:28 [ERROR] After correcting the problems, you can resume the build with the command
14:10:28 [ERROR] mvn <goals> -rf :MILCWSGpPortlet
2.发现一个可疑 WARN:
Downloaded: https://artifactory.ap.manulife.com/artifactory/libs-release/manulife/MILSessionManager/1.0.4-jdk8/MILSessionManager-1.0.4-jdk8.pom (2 KB at 69.3 KB/sec)
11:12:16 [WARNING] The POM for manulife:MILSessionManager:jar:1.0.4-jdk8 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more
3.找寻该依赖
POM.xml 里面没有 MILSessionManager:jar:1.0.4-jdk8 的依赖,应该是间接依赖
4. 分析依赖
通过 mvn dependency:tree -X 分析依赖,发现来自于 MILPortletFramework
5. 发现问题
查看 MILPortletFramework 的依赖,发现依赖于 MILSessionManager:jar:1.0.4-jdk8 版本不一致
- <dependency>
- <groupId>manulife</groupId>
- <artifactId>MILSessionManager</artifactId>
- <version>1.0.1</version>
- </dependency>
再加上查看 WARN,分析是依赖冲突,
6. 解决问题
在 MILGpController 加上依赖后,编译问题解决
- <dependency>
- <groupId>manulife</groupId>
- <artifactId>MILSessionManager</artifactId>
- <version>1.0.4-jdk8</version>
- </dependency>
搜寻到的更多猜测:
原因之一是当依赖父 pom 已过时的 Project 时。 如果在未安装/部署父 pom 的情况下进行更新,则会发生这种情况。要查看是否是这种情况,只需使用 mvndependency:tree -X 运行并搜索确切的错误。
它将提到它错过了您知道的在父pom中的东西,而不是您依赖的工件(例如jar版本)中的东西。
另外,由于 WARN 造成了 jar 被 transitive,也是触发这个的原因。
mvn 报错 - The POM for <name> is invalid, transitive dependencies (if any) will not be available的更多相关文章
- The POM for XXX is invalid, transitive dependencies (if any) will not be available解决方案
今天,某个开发的环境在编译的时候提示警告The POM for XXX is invalid, transitive dependencies (if any) will not be availab ...
- maven编译问题之 -The POM for XXX is invalid, transitive dependencies (if any) will not be available
问题一: 把父工程tao-parent install 到maven本地仓后,接着install tao-common工程,然后报错 报错信息如下: [WARNING] The POM for com ...
- oracle创建包后执行报错:object omgmig.test_package is invalid.
今天学习了一下oracle的包的写法,然后碰到这么个问题.包声明和包主体都正确,但是就是执行报错:object omgmig.test_package is invalid. 这是会报错的sql,看起 ...
- Django报错:OSError: raw write() returned invalid length 4 (should have been between 0 and 2)
在使用Django时Django报错:Django报错:OSError: raw write() returned invalid length 4 (should have been between ...
- 单元测试 报错 org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.example.xxx' 解决
1.前言 很奇怪 ,单元测试正常执行,但是结束后会报错 org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.e ...
- Maven 错误 :The POM for com.xxx:jar:0.0.1-SNAPSHOT is invalid, transitive dependencies (if any) will not be available
一个大的maven 项目,结构是一个根pom,下面几个小的module,包括了appservice-darc,appservice-entity等,其中appservice-darc 依赖了 apps ...
- The POM for com.alibaba:druid:jar:1.2.6 is invalid, transitive dependencies (if any) will not be available
开发环境 IDEA2020.3, jdk1.8.0_231 问题描述 开发中引入了druid-spring-boot-starter最新版本1.2.6,项目install时的时候一直出现警告 The ...
- maven文件报错(pom.xml或者jar包缺失)解决方法
相信很多朋友在myeclipse上把maven配置好了,但是新建maven项目的时候会报错,下面我来总结以下我遇到的问题. 新建完maven项目后,pom.xml报错 1.报错的原因:很多时候我们在下 ...
- maven项目 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
ssm的项目如果在mapper.xml mapper接口 配置没问题的情况下 项目依然报org.apache.ibatis.binding.BindingException: Invalid bo ...
随机推荐
- how to check a var whether is number in js
how to check a var whether is number in js js check var is number Number.isInteger(NaN) false Number ...
- 详解稳定币圣杯USDN
稳定币飞速发展,USDN 一骑绝尘,但因合规问题饱受质疑.合规稳定币作为后来者,奋起直追,亦光耀夺目.而更符合区块链精神的稳定币(抵押其他资产生成稳定币),长期以来只有 Maker 的 DAI 能够在 ...
- 什么是NGK算力挖矿?怎么使用USDN购买算力?
NGK公链项目即将正式上线,NGK项目中重要生态NGK算力挖矿也将启动,正式开启DPOSS挖矿.因为具有低能耗,低搭建费用,高收益等特点,可以想象如果正式上线必将引起行业瞩目. NGK算力挖矿项目为N ...
- 蓝桥杯——试题 算法训练 Yaroslav and Algorithm
试题 算法训练 Yaroslav and Algorithm 资源限制 时间限制:100ms 内存限制:128.0MB 问题描述 (这道题的数据和SPJ已完工,尽情来虐吧!) Yaroslav喜欢算法 ...
- 从微信小程序到鸿蒙js开发【15】——JS调用Java
鸿蒙入门指南,小白速来!0基础学习路线分享,高效学习方法,重点答疑解惑--->[课程入口] 目录:1.新建一个Service Ability2.完善代码逻辑3.JS端远程调用4.<从微信小 ...
- vue:子组件通过调用父组件的方法的方式传参
在本案例中,由于子组件通过调用父组件的方法的方式传参,从而实现修改父组件data中的对象,所以需要啊使用$forceUpdate()进行强制刷新 父组件: provide() { return { s ...
- 微信小程序:单选框radio和复选框CheckBox
单选框radio: 可以通过color属性来修改颜色. 复选框checkbox:
- 翻译:《实用的Python编程》02_05_Collections
目录 | 上一节 (2.4 序列) | 下一节 (2.6 列表推导式) 2.5 collections 模块 collections 模块为数据处理提供了许多有用的对象.本部分简要介绍其中的一些特性. ...
- 身份认证:JSON Web Token
JSON Web Token(JWT)是一种基于JSON的开放标准((RFC 7519),也是目前最流行的跨域认证解决方案. 传统的 cookie 认证方式看起来遵守了 REST 架构的无状态要求,但 ...
- 基于CefSharp开发浏览器(八)浏览器收藏夹栏
一.前言 上一篇文章 基于CefSharp开发(七)浏览器收藏夹菜单 简单实现了部分收藏夹功能 如(添加文件夹.添加收藏.删除.右键菜单部分功能) 后续代码中对MTreeViewItem进行了扩展,增 ...