问题一: 把父工程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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. 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 ...

  4. 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 ...

  5. maven编译war包,pom中必须有的几个dependency

    <!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api --> <dependency> ...

  6. Maven Assembly打包提示[WARNING] transitive dependencies if any will not be available

    maven assembly打包出现错误 [WARNING] The POM for com.flink.xxr:0.0.1-SNAPSHOT is invalid, transitive depen ...

  7. [转]maven编译时出现读取XXX时出错invalid LOC header (bad signature)

    maven编译时出现读取XXX时出错invalid LOC header (bad signature) 一.发现问题右击pom.xml,run as —> maven install,会看到c ...

  8. 菜鸟调错(八)—— Maven编译错误:不兼容的类型的解决方案

    泛型在实际的工作中应用非常广泛,关于泛型就不在这里赘述了,感兴趣请戳<重新认识泛型>.项目中用到了如下的泛型: public <T> T query(String sql, R ...

  9. maven编译正常,运行报错:中没有主清单属性

    在pom.xml添加插件 <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId&g ...

随机推荐

  1. 004-unity3d MonoBehaviour脚本方法简介

    一.MonoBehaviour 1.公共方法 CancelInvoke Cancels all Invoke calls on this MonoBehaviour. Invoke Invokes t ...

  2. 应用安全 - 路由器 - D-LINK - 漏洞汇总

    D-Link D-Link DSL-2750B任意命令执行漏洞 CVE-2019-16920 影响范围 DIR- DIR-866L DIR- DHP- CVE-2017-7405 Date 类型 嗅探 ...

  3. 应用安全-Web安全-XSS(跨站攻击)攻防整理

    分类 反射型 存储型 DOM型 XSF(Flash XSS) PDFXSS MHTML协议跨站(MHTML,data) 字符编码(UTF-7 XSS) 富文本编辑器测试 - 输入框 <img S ...

  4. Linq查询语法(1)

    转:http://www.cnblogs.com/ahao214/archive/2013/01/22/2871044.html LINQ的基本格式如下所示:var <变量> = from ...

  5. 如何判断一段程序是由C 编译程序还是由C++编译程序编译的

    以下是在论坛中看到的两种解释: (1)如果是要你的代码在编译时发现编译器类型,就判断_cplusplus或_STDC_宏,通常许多编译器还有其他编译标志宏, #ifdef __cplusplus co ...

  6. 使用NMAP端口扫描代码实现

    Nmap是一个网络连接端扫描软件,用来扫描网上电脑开放的网络连接端.确定哪些服务运行在哪些连接端,并且推断计算机运行哪个操作系统(这是亦称 fingerprinting).其基本功能有三个,一是探测一 ...

  7. 解决在data里面获取一个固定的img值

    正常情况下在data里面申明,在img标签里面通过 :src应用就行了,但是如果是直接申明引用是没效果的: html: <div class="logo"> <i ...

  8. Excel VBA批量处理寸照名字(类模块加FSO版)

    需求:因为处理学生学籍照片,从照相馆拿回来的寸照是按班级整理好,文件名是相机编号的文件.那么处理的话,是这么一个思路,通过Excel表格打印出各班A4照片列表,让学生自行填上照片对应姓名.表格收回来后 ...

  9. log.info()传入多个参数的方法

    不知道项目里用的是啥 ** 版本的 log4j 居然不能传入变长参数 logger.info(String.format("%s %s %s", username, feature ...

  10. 搜索(DFS)---查找最大连通面积

    查找最大的连通面积 695. Max Area of Island (Medium) [[0,0,1,0,0,0,0,1,0,0,0,0,0], [0,0,0,0,0,0,0,1,1,1,0,0,0] ...