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.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
maven编译问题之 -The POM for XXX is invalid, transitive dependencies (if any) will not be available相关推荐
- 解决maven 打包报错:The POM for **jar** is invalid, transitive dependencies (if any) will not be available
解决maven 打包问题: The POM for org.javassist:javassist:jar:3.19.0-GA is invalid, transitive dependencies ...
- maven无法下载间接依赖包(The POM for com.demo:demo-common:jar:1.1.22 is invalid, transitive dependencies)
一.起因 A模块依赖B模块,B模块依赖C模块(C模块是其他项目中的jar):A模块需要用到C模块中的类,通过B模块间接依赖了C模块.此时打包A的时候报错,大致意思是,无法编译使用C模块中的类. 给 ...
- 求助:gcc编译报错error: pasting formed ‘,XXX‘, an invalid preprocessing token
/* 有哪位帮忙大神帮忙在不动源码的前提下解决一下gcc编译以下代码报错问题: error: pasting formed ',XXX', an invalid preprocessing token ...
- maven打包失败:the pom for XXX is missing, no dependency information available 问题解决
问题描述:springcloud项目,idea打包pacake.compile时报错,THE POM for ... is missing,no dependency information avai ...
- Maven报错:Non-resolvable parent POM for XXX
这个错误的原因是因为子pom文件的parent relativePath (相对路径)写错 <parent><groupId>XXX</groupId><ar ...
- The POM for xxx is invalid, 的解决方法
mvn -X dependency:tree>tree.txt bug 依赖环境 打印出错误信息 或着依赖的信息. 缺失的包.
- [WARNING] The POM for com.tenyears:base-common:jar:1.0 is invalid, transitive dependen
很明显,引用的模块,缺少架包. 1 运行 mvn -X dependency:tree>tree.txt mvn -X install mvn -X package等等,只要加上-X就能打印详情 ...
- maven编译项目时出现Invalid packaging for parent POM,must be pom but is_jar
今天创建一个新的项目,当用maven编译项目时出现Invalid packaging for parent POM,must be pom but is_jar 经过查找度娘发现,在模块的默认打包方式 ...
- Maven编译时提示:不兼容的类型
在Eclipse中使用Maven编译的时候报错,错误信息如下: xxx不兼容的类型 需要:xxx 找到: java.lang.Object 在pom.xml文件中为Maven指定用JDT来编译(推荐) ...
最新文章
- R语言使用ggplot2包使用geom_violin函数绘制分组小提琴图(自定义分组的填充色)实战
- JDBC-ODBC桥乱码问题解决方案
- cpu java poi 导出_java基于poi导出excel透视表代码实例
- python注释可以辅助程序调试吗_Python 注释
- 【云炬大学生创业基础笔记】第1章第2节关于什么是创客的讨论
- Unable to resolve target 'android-19'
- virtualBox下安装Linux6.4
- 软件工程导论课程主页 :12-13-2
- strcpy用于调用的参数太少_C和汇编如何互相调用?嵌入式工程师必须掌握
- get方法报空指针_C++基础教程之指针拷贝详解
- formdata上传文件_封装一个多文件断点续传、分片上传、秒传、重试机制的组件...
- windows下eclipse模拟运行apk
- python—如何删除(保留)字符串中除字母、数字外的其他元素
- 【C++】模板(函数模板,类模板,模板的特化,模板的分离编译)
- 面试时如何做自我介绍?聪明的应聘者只聚焦1点
- 室外无线AP覆盖解决方案
- python的f是什么意思_Python 字符串前面加u,r,b,f的含义
- c 自动打印的服务器,C-Lodop云打印服务器 x64
- android 仿微信视频压缩上传,iOS视频压缩(仿微信录像)
- [MySQL]-删库后恢复