一、运行环境
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
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.0.RELEASE</version>
</parent>
<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.0</version>
<optional>true</optional>
</dependency>
二、问题排查
从git上拉下来的代码,刚开始是MyBatisConfigurer配置类的两个包导不进来
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
所以将问题定位在mybatis-spring–boot-starter的包上,怀疑是包损坏了,删除包之后重新下载,仍出现上述情况。排除jar损坏的原因。
[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
最后看到了“兵工厂三剑客”这位博主的博客按着他的处理问题的流程,通过打印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:MavenRepositoryorgmybatismybatis-parent28mybatis-parent-28.pom: processing instruction can not have PITarget with reserved xml name (position: END_TA
G seen ...</profiles>rnrn</project>rn<?xml ... @1096:7) @ E:MavenRepositoryorgmybatismybatis-parent28mybatis-parent-28.pom, line 1096, column 7
注:[FATAL] 这个输出的消息等级更加严格译为致命的,是比error等级还要高的异常
附加知识点:log4j定义了8个级别的log(除去OFF和ALL,可以说分为6个级别),优先级从高到低依次为:OFF、FATAL、ERROR、WARN、INFO、DEBUG、TRACE、 ALL。
三、解决方案
最终将问题定位到 E:MavenRepositoryorgmybatismybatis-parent28mybatis-parent-28.pom, line 1096, column 7这个文件上
原文地址:https://blog.csdn.net/m0_73761022/article/details/128673121
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。
如若转载,请注明出处:http://www.7code.cn/show_25794.html
如若内容造成侵权/违法违规/事实不符,请联系代码007邮箱:suwngjj01@126.com进行投诉反馈,一经查实,立即删除!