maven编译问题之 -The POM for XXX is invalid, transitive dependencies (if any) will not be available

article/2025/9/19 21:33:39

问题一: 把父工程tao-parent install 到maven本地仓后,接着install tao-common工程,然后报错

报错信息如下:

[WARNING] The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.4.2 is invalid, transitive dependencies (if any) will not be available,enable debug logging for more details

错误信息意思是 com.fasterxml.jackson.core:jackson-databind:jar:2.4.2 这个jar包的POM文件无效,依赖传递不可用;

解决办法:在install 时,使用调试模式, install -X ,将控制台的信息拷贝出来,查找[WARNING]信息,可以看到如下错误提示:

[WARNING] The POM for com.fasterxml.jackson.core:jackson-databind:jar:2.4.2 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for com.fasterxml.jackson.core:jackson-databind:2.4.2

[FATAL] Non-parseable POM D:\apache-maven-3.5.2\Maven\com\fasterxml\jackson\jackson-parent\2.4\jackson-parent-2.4.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...</build>\n\n</project>\n<?xml ... @180:7)  @ D:\apache-maven-3.5.2\Maven\com\fasterxml\jackson\jackson-parent\2.4\jackson-parent-2.4.pom, line 180, column 7

提示信息指向了 D:\apache-maven-3.5.2\Maven\com\fasterxml\jackson\jackson-parent\2.4\目录下的  jackson-parent-2.4.pom文件

找到该POM文件 180行,看到有提示信息,将jackson-parent\2.4目录下的所有文件删除,然后重新使用install命令把tao-common打包到本地maven仓正常,正常仓库下的文件如下,这个 jackson-parent-2.4.pom文件和之前的 jackson-parent-2.4.pom文件的内容也不相同 !

问题二:上面问题解决后,install tao-manager时,报如下告警信息:

[WARNING] The POM for org.mybatis:mybatis-spring:jar:1.2.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details

[WARNING] The POM for commons-logging:commons-logging:jar:1.2 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details 

 选中项目,右键->run as ,选择maven build ...,然后在对话框中的Goals项填入" dependency:tree",再在"debug output"打上勾,并将此项启动的名字改为"showDependency-tree",然后点击Run按钮, 获取maven依赖关系,执行后,将控制台的调试信息拷贝出来,查找FATAL级别的,如下:

[WARNING] The POM for org.mybatis:mybatis-spring:jar:1.2.2 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.mybatis:mybatis-spring:1.2.2
[FATAL] Non-parseable POM D:\apache-maven-3.5.2\Maven\org\mybatis\mybatis-parent\20\mybatis-parent-20.pom: only whitespace content allowed before start tag and not o (position: START_DOCUMENT seen o... @1:1) @ D:\apache-maven-3.5.2\Maven\org\mybatis\mybatis-parent\20\mybatis-parent-20.pom, line 1, column 1

[WARNING] The POM for commons-logging:commons-logging:jar:1.2 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for commons-logging:commons-logging:1.2

[FATAL] Non-parseable POM D:\apache-maven-3.5.2\Maven\org\apache\commons\commons-parent\34\commons-parent-34.pom: start tag not allowed in epilog but got p (position: END_TAG seen ...</properties>\r\n\r\n</project>\r\n              <p... @1387:17)  @ D:\apache-maven-3.5.2\Maven\org\apache\commons\commons-parent\34\commons-parent-34.pom, line 1387, column 17

[WARNING] The POM for commons-logging:commons-logging:jar:1.2 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for commons-logging:commons-logging:1.2

[FATAL] Non-parseable POM D:\apache-maven-3.5.2\Maven\org\apache\commons\commons-parent\34\commons-parent-34.pom: start tag not allowed in epilog but got p (position: END_TAG seen ...</properties>\r\n\r\n</project>\r\n              <p... @1387:17)  @ D:\apache-maven-3.5.2\Maven\org\apache\commons\commons-parent\34\commons-parent-34.pom, line 1387, column 17

 可以得知D:\apache-maven-3.5.2\Maven\org\apache\commons\commons-parent\34\路径下的 commons-parent-34.pom文件

D:\apache-maven-3.5.2\Maven\org\mybatis\mybatis-parent\20路径下的  mybatis-parent-20.pom文件损坏。删除后更新maven仓库,然后install正常

经验提升:

1.maven编译问题,有可能是某些需要的文件坏了,删除后右键单击工程名==》maven ==》 update project , 更新 一下maven仓就解决了

2.遇到maven编译问题,可以使用maven调试模式,获取更精确的问题信息,从而快速定位问题  具体步骤是: 右键单击工程名==》run as ==》maven build...(选择带...的这个),

在Goals后面输入clean install -X ,之所以加上clean命令,是为了清除之前打到本地仓的包

3. 如何查lib下的jar来自哪个maven依赖(用于解决jar版本冲突,第三方依赖jar包pom文件损坏问题):

选中项目,右键->run as ,选择maven build ...,然后在对话框中的Goals项填入" dependency:tree",再在"debug output"打上勾,并将此项启动的名字改为"showDependency-tree",然后点击“Debug"/Run按钮, console里面会很详细地显示每个pom里面配置的依赖它们会带来哪些jar文件,以及jar包,pom错误信息 

参考资料:

https://www.cnblogs.com/woshicckk/p/6410477.html 

https://blog.csdn.net/rocklee/article/details/51691617 


http://chatgpt.dhexx.cn/article/4bGUOQMS.shtml

相关文章

Provides transitive vulnerable dependency org.yaml:snakeyaml:1.33

一、错误介绍 新创建了一个springboot3的项目&#xff0c;弹出警告。 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.0.1</version><relativePath/>…

CSS3 Transition

Transition 简介 Transition 可以设置 CSS 属性的过渡效果&#xff0c;它有以下几个属性。 transition-property 用于指定应用过渡属性的名称transition-duration 用于指定这个过渡的持续时间transition-delay 用于指定延迟过渡的时间transition-timing-function 用于指定过渡…

Gradle依赖项学习总结,dependencies、transitive、force、exclude的使用与依赖冲突解决...

http://www.paincker.com/gradle-dependencies https://docs.gradle.org/current/userguide/dependency_management.html http://www.concretepage.com/build-tools/gradle/gradle-exclude-transitive-dependency-example Gradle是一个非常好用的编译工具&#xff0c;特别是继承…

Gradle依赖项之transitive/exclude/force/(+)

传递(transitive)排除(exclude)强制(force)动态版本() implementation(com.xxx:xxx:1.0.0aar) {transitive truechanging trueforce trueexclude group: com.xxx, module: xxx}强制使用指定版本号 configurations.all {resolutionStrategy {force com.github.bumptech.glid…

mptcp on mininet

这篇文章主要记录mptcp在mininet上的仿真实验。mininet中的网络实验&#xff0c;数据包走的是内核协议栈。这样得出的结果&#xff0c;好处就是实际网络协议栈的性能。缺点就是&#xff0c;要验证新的想法&#xff0c;需要修改内核协议栈。而且关于内核中的数据&#xff0c;比如…

mininet操作

mn:启动mininet sudo mn -- topo single , 3 -- mac -- switch ovsk -- controller remote &#xff08;1&#xff09;--topo:指定openflow网络拓扑&#xff0c;四种类型的openflow网络拓扑&#xff1a;tree&#xff0c;single&#xff0c;linear&#xff0c;minimal ①缺省情…

mininet 主机双网关拓扑设计

这次的拓扑是一个主机拥有两个接口&#xff0c;两个接口分别有不同的网关&#xff0c;拓扑图如下&#xff0c;拓扑可以通过前两篇中提到的miniedit.py去生成&#xff1a; 主要配置指令如下&#xff1a; 截得不全直接看代码吧 #!/usr/bin/pythonfrom mininet.net import Minine…

Mininet笔记-基本命令

命令详解 拓扑构建命令 –topo  单一&#xff08;single&#xff09;拓扑&#xff0c;永远只有一个交换机&#xff0c;主机&#xff08;host&#xff09;可以有N个  线形&#xff08;linear&#xff09;拓扑&#xff0c;可以有多个交换机和主机&#xff0c;每个交换机只连接…

mininet基本操作

mininet是由斯坦福大学基于Linux Container架构开发的一个进程虚拟化网络仿真工具&#xff0c;可以创建一个包含主机&#xff0c;交换机&#xff0c;控制器和链路的虚拟网络&#xff0c;其交换机支持OpenFlow&#xff0c;具备高度灵活的自定义软件定义网络。 在ubuntu系统中安…

mininet编程

代码 区分constructor and object #!/usr/bin/python from mininet.topo import Topo from mininet.net import Mininet from mininet.util import dumpNodeConnections from mininet.log import …

mininet实验部分总结

一、Mininet简介 Mininet是一个可以在有限资源的普通电脑上快速建立大规模SDN原型系统的网络仿真工具。该系统由虚拟的终端节点&#xff08;End-Host&#xff09;、OpenFlow交换机、控制器&#xff08;也支持远程控制器&#xff09;组成&#xff0c;这使得它可以模拟真实网络&…

Mininet应用实践

安装&#xff1a; 参考 &#xff1a; https://www.cnblogs.com/cotyb/p/5042072.html https://blog.csdn.net/Mr_Wanderer/article/details/107028267 https://blog.csdn.net/qq_19696893/article/details/123747960 开启ovsdb-server配置数据库&#xff1a;有两种方式&#x…

【学习笔记】Mininet 入门

【学习笔记】Mininet入门实战 课程介绍 Mininet是由一些虚拟的终端节点、交换机、路由器连接而成的一个网络仿真器&#xff0c;它采用轻量级的虚拟化技术使得系统可以和真实网络相媲美。 Mininet可以很方便地创建一个支持SDN的网络&#xff1a;host就像真实的电脑一样工作&…

【Mininet】基础篇:Mininet创建简单网络拓扑及简单网络拓扑脚本编写

大家好&#xff0c;我是文思月&#xff01; 每文一言&#xff1a;不要假装努力&#xff0c;结果不会陪你演戏&#xff01; 本篇文章&#xff1a; 使用Mininet创建简单的网络拓扑&#xff0c;并创建网络拓扑脚本。 正文如下&#xff1a; 1. 最小网络拓朴 创建最小的网络拓扑…

【Mininet】安装篇:安装Mininet

大家好&#xff0c;我是皮皮猫吖&#xff01; 每文一言&#xff1a;改变你的生活&#xff0c;现在或者从不 本篇文章&#xff1a; 本文是安装 mininet 的简单过程。 正文如下&#xff1a; 一、Mininet的安装 第一步&#xff1a;安装git apt install git 第二步&#xff…

mininet基础

mininet介绍 一、Mininet是什么 Mininet是由斯坦福大学基于Linux Container架构开发的一个进程虚拟化网络仿真工具&#xff0c;可以创建一个包含主机&#xff0c;交换机&#xff0c;控制器和链路的虚拟网络&#xff0c;其交换机支持OpenFlow&#xff0c;具备高度灵活的自定义…

第一讲——mininet的安装和使用

第一讲——mininet的安装和使用 1.调出字符界面。 2.进入root。 3.直接安装git&#xff0c;发现无法安装&#xff0c;原因是没有安装源。 4.更新安装源。 5.再次安装git&#xff0c;发现可以安装。 6.下载mininet。 7.安装mininet。 8.查看mininet安装情况和创建线性网络拓扑。…

距离(distance)算法小结

18种和“距离(distance)”、“相似度(similarity)”相关的量的小结 在计算机人工智能领域&#xff0c;距离(distance)、相似度(similarity)是经常出现的基本概念&#xff0c;它们在自然语言处理、计算机视觉等子领域有重要的应用&#xff0c;而这些概念又大多源于数学领域的度…

概率论 联合分布

作者&#xff1a;Vamei 出处&#xff1a;http://www.cnblogs.com/vamei 欢迎转载&#xff0c;也请保留这段声明。谢谢&#xff01; 我之前一直专注于单一的随机变量及其概率分布。我们自然的会想将以前的结论推广到多个随机变量。联合分布(joint distribution)描述了多个随机变…

推荐 :联合概率和条件概率的区别和联系

联合概率P(A∩B) 两个事件一起&#xff08;或依次&#xff09;发生的概率。 例如&#xff1a;掷硬币的概率是 ⁄₂ 50%&#xff0c;翻转 2 个公平硬币的概率是 ⁄₂ ⁄₂ ⁄₄ 25%&#xff08;这也可以理解为 50% 的 50%&#xff09; P(A ∩ B) P(A) ⋅ P(B) 对于 2 个硬币…