iis服务器助手广告广告
返回顶部
首页 > 资讯 > 数据库 >maven报The POM for com.**** is invalid, transitive dependencies (if any) will not be available问题解决
  • 671
分享到

maven报The POM for com.**** is invalid, transitive dependencies (if any) will not be available问题解决

javaintellij-ideaideaspringbootmysqlPoweredby金山文档 2023-09-01 07:09:52 671人浏览 独家记忆
摘要

一、运行环境 spring-boot版本2.3.0 The POM for org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:1.3.0 is invalid, transi

一、运行环境

spring-boot版本2.3.0

The POM for org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:1.3.0 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while

building the effective model for org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.0

   org.springframework.boot   spring-boot-starter-parent   2.3.0.RELEASE

mybatis的版本1.3.0

   org.mybatis.spring.boot   mybatis-spring-boot-starter   1.3.0   true

二、问题排查

git上拉下来的代码,刚开始是MyBatisConfigurer配置类的两个包导不进来

import org.apache.ibatis.session.sqlSessionFactory;import org.mybatis.spring.SqlSessionFactoryBean;

所以将问题定位在mybatis-spring-boot-starter的包上,怀疑是包损坏了,删除包之后重新下载,仍出现上述情况。排除jar损坏的原因。

后来刷新Maven仓库时报了下面的警告

[WARNING]The POM org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:1.3.0 for is invalid, transitive dependencies (if any) will not be available

随后我就去csdn上查找解决方案,都没有很好的得到解决

最后看到了“兵工厂三剑客”这位博主的博客按着他的处理问题的流程,通过打印maven的日志信息

打印日志指令如下:

 mvn -X -U clean package

查看日志发现下面报错信息

[WARNING] The POM for org.mybatis.spring.boot:mybatis-spring-boot-starter:jar:1.3.0 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for org.mybatis.spring.boot:mybatis-spring-boot-starter:1.3.0[FATAL] Non-parseable POM E:\MavenRepository\org\mybatis\mybatis-parent\28\mybatis-parent-28.pom: processing instruction can not have PITarget with reserved xml name (position: END_TAG seen ...\r\n\r\n\r\n

注:[FATAL] 这个输出的消息等级更加严格译为致命的,是比error等级还要高的异常

附加知识点:log4j定义了8个级别的log(除去OFF和ALL,可以说分为6个级别),优先级从高到低依次为:OFF、FATAL、ERROR、WARN、INFO、DEBUG、TRACE、 ALL。

三、解决方案

最终将问题定位到 E:\MavenRepository\org\mybatis\mybatis-parent\28\mybatis-parent-28.pom, line 1096, column 7这个文件上

然后根据路径找到该文件,删除该文所在的文件夹,重启idear,更新maven,问题得到解决。

具体到底时详细那个地方造成异常原因,这个我并没找到,期待那位大佬,能够将深层次的的原因描述一下。

来源地址:https://blog.csdn.net/m0_73761022/article/details/128673121

您可能感兴趣的文档:

--结束END--

本文标题: maven报The POM for com.**** is invalid, transitive dependencies (if any) will not be available问题解决

本文链接: https://www.lsjlt.com/news/387678.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作