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 ...
随机推荐
- TypeScript Generics
TypeScript Generics https://www.typescriptlang.org/docs/handbook/generics.html 泛型 1 Generic Interfac ...
- js 位掩码
原文 定义掩码 const mask0 = parseInt("00000001", 2); const mask1 = parseInt("00000010" ...
- Flutter: 使用相机拍照
文档 camera import 'dart:io'; import 'package:camera/camera.dart'; import 'package:flutter/material.da ...
- [转]ORB特征提取-----FAST角点检测
转载地址:https://blog.csdn.net/maweifei/article/details/62887831 (一)ORB特征点提取算法的简介 Oriented FAST and Rota ...
- js获取数字数组最大值的几种方式
原生Math.max方法 Math.max 方法不能接收数组,可以使用ES6的...将数组打散 const arr = [111, 12, 111, 34, 2, 5, 76]; console.lo ...
- Mysql训练:两个表中使用 Select 语句会导致产生 笛卡尔乘积 ,两个表的前后顺序决定查询之后的表顺序
力扣:超过经理收入的员工 Employee 表包含所有员工,他们的经理也属于员工.每个员工都有一个 Id,此外还有一列对应员工的经理的 Id. +----+-------+--------+----- ...
- Ch1-What is DAX?
What is DAX? 数据分析表达式 (DAX) 是在 Analysis Services.Power BI 以及 Excel 中的 Power Pivot 使用的公式表达式语言.在第一版Powe ...
- 如何使用 Github Actions 自动抓取每日必应壁纸?
如何白嫖 Github 服务器自动抓取必应搜索的每日壁纸呢? 如果你访问过必应搜索网站,那么你一定会被搜索页面的壁纸吸引,必应搜索的壁纸每日不同,自动更换,十分精美.这篇文章会介绍如何一步步分析出必应 ...
- MySQL之九---分布式架构(Mycat/DBLE)
MyCAT基础架构图 双主双从结构 MyCAT基础架构准备 准备环境 环境准备: 两台虚拟机 db01 db02 每台创建四个mysql实例:3307 3308 3309 3310 删除历史环境 p ...
- Java实现文件的读写
需求:实现基本的读写 package com.sbx.io; import java.io.File; import java.io.FileReader; import java.io.FileWr ...