核心:  通过 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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. oracle创建包后执行报错:object omgmig.test_package is invalid.

    今天学习了一下oracle的包的写法,然后碰到这么个问题.包声明和包主体都正确,但是就是执行报错:object omgmig.test_package is invalid. 这是会报错的sql,看起 ...

  4. 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 ...

  5. 单元测试 报错 org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.example.xxx' 解决

    1.前言 很奇怪 ,单元测试正常执行,但是结束后会报错 org.junit.runners.model.InvalidTestClassError: Invalid test class 'com.e ...

  6. 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 ...

  7. 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 ...

  8. maven文件报错(pom.xml或者jar包缺失)解决方法

    相信很多朋友在myeclipse上把maven配置好了,但是新建maven项目的时候会报错,下面我来总结以下我遇到的问题. 新建完maven项目后,pom.xml报错 1.报错的原因:很多时候我们在下 ...

  9. maven项目 报错 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    ssm的项目如果在mapper.xml  mapper接口 配置没问题的情况下  项目依然报org.apache.ibatis.binding.BindingException: Invalid bo ...

随机推荐

  1. taro router

    taro router https://nervjs.github.io/taro/docs/router.html bug import Taro, { Component, Config } fr ...

  2. TypeScript 3.7 RC & Optional Chaining

    TypeScript 3.7 RC & Optional Chaining https://devblogs.microsoft.com/typescript/announcing-types ...

  3. APC体育公司重视“女性经济 ”深度挖掘女性市场

    据消费者追踪服务调查数据显示,从2020年1月到8月,a private company体育公司(公司编号:08703733)品牌下的女性运动服装的在线销售额较上一年增长了77%. 女性市场已然成为A ...

  4. CURTIS SAVANAH:数字经济=智能基础设施+海量数据+新生业态

    前不久,Datahero Inc公司(公司编号:20141166945)创始人CURTIS SAVANAH在会议上表示,要构建数字经济的愿景,需要智能基础设施.海量数据和全新新生业态. 他在演讲中说到 ...

  5. Linux零拷贝技术

    本文转载自Linux零拷贝技术 导语 本文讲解 Linux 的零拷贝技术,云计算是一门很庞大的技术学科,融合了很多技术,Linux 算是比较基础的技术,所以,学好 Linux 对于云计算的学习会有比较 ...

  6. Charles 抓取https 包

    1.  Recording Settings中 include 添加 host , port端口为443 2.  SSL Proxying Settings 选中 Enable SSL Proxyin ...

  7. JUnit5学习之七:参数化测试(Parameterized Tests)进阶

    欢迎访问我的GitHub https://github.com/zq2599/blog_demos 内容:所有原创文章分类汇总及配套源码,涉及Java.Docker.Kubernetes.DevOPS ...

  8. 剑指 Offer 43. 1~n 整数中 1 出现的次数 + 数位模拟 + 思维

    剑指 Offer 43. 1-n 整数中 1 出现的次数 Offer_43 题目描述 题解分析 java代码 package com.walegarrett.offer; /** * @Author ...

  9. 爬虫入门到放弃系列05:从程序模块设计到代理IP池

    前言 上篇文章吧啦吧啦讲了一些有的没的,现在还是回到主题写点技术相关的.本篇文章作为基础爬虫知识的最后一篇,将以爬虫程序的模块设计来完结. 在我漫(liang)长(nian)的爬虫开发生涯中,我通常将 ...

  10. Java方法:练习,控制台简易计算器

    可以更改计算个数的简易计算器 package com.zdz.method; import java.util.Scanner; public class Operator { public stat ...