• 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,解决问题
  • 相关阅读:
    ubuntu+VS code+launch.json+task.json
    C++——运行时类型识别RTTI
    C++——模板
    C++——class类和struct结构体的唯一区别
    C++——右值引用
    C++——智能指针
    身份证号码格式检测
    PHP获取图片主题颜色
    PHP 压缩图片质量
    redis3.2装完后 其它机子访问爆protocol error, got 'n' as reply type byte
  • 原文地址:https://www.cnblogs.com/yb38156/p/14917664.html
Copyright © 2020-2023  润新知