zoukankan      html  css  js  c++  java
  • The POM for xxx is invalid, transitive dependencies (if any) will not be available

    mvn打包时提示:

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

    执行:package -X,查看更详细的信息,继续提示

    [WARNING] The POM for commons-lang:commons-lang:jar:2.6 is invalid, transitive dependencies (if any) will not be available: 1 problem was encountered while building the effective model for commons-lang:commons-lang:2.6
    [FATAL] 'parent.artifactId' must be changed, the parent element cannot have the same groupId:artifactId as the project. @ 

    我的springboot版本是2.1.6,查看该版本默认的commons-lang3.version,是这样子:<commons-lang3.version>3.8.1</commons-lang3.version>

    折腾了半天,尝试过删除repository中的org.apache.commons.commons-lang3的jar,maven reimport,无果,尝试删除commons-parent,重新引入,无果

    继续在package -X打印的记过中搜索如下关键词:

    commons-lang:commons-lang:jar:2.6

    发现这个包是

    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.6</version>
    依赖的一个包,一直没注意到commons-lang也是个单独的jar,跟commons-lang3没啥关系
    以上提示信息,是说传递依赖的这个有问题的jar,他的parent.artifactId必须改掉,没有说冲突,所以只是WARNING,一般是下载的时候,pom.xml出问题,导致parent.artifactId错乱
    结合之前拆分模块时候一大堆pom反复挪动,应该就是这个问题点
    删除repository中的D:mavenmaven-repositorycommons-langcommons-lang这个文件夹,重新导入,再次package,解决问题
  • 相关阅读:
    更改PHP配置文件php.ini解决xmlhttp的utf8乱码
    php 单引号 双引号 区别
    zend soap looks like we got no XML document
    使用UltraEdit32编辑器格式化源码功能 XML、Java、C/C++、C#
    php str_replace 单引号 双引号 区别
    PHP将XML文件转换成PHP数组
    简述PHP4和PHP5版本下解析XML文档的操作方法
    HowTo: Fix SimpleXML CDATA problem in php
    XML中 CDATA and PCDATA 的区别
    php 生成xml 的四种方式
  • 原文地址:https://www.cnblogs.com/yb38156/p/14917664.html
Copyright © 2011-2022 走看看