• Maven 父子工程出现 [ERROR] 'dependencies.dependency.version' for xxxjar is missing. 问题


    问题原因是,子工程(Sub1)所继承的父工程(Main)也继承了它的父工程(Parent),需要在(Main)这个父工程中pom.xml配置中,增加

    relativePath:

        <parent>
            <groupId>cn.corpdata.framework</groupId>
            <artifactId>framework-parent</artifactId>
            <version>0.0.1-SNAPSHOT</version>
            <relativePath>../framework-parent/pom.xml</relativePath>
        </parent>

    测试Maven工程的报错如下:

    [ERROR] 'dependencies.dependency.version' for mysql:mysql-connector-java:jar is missing. @ cn.corpdata.framework:framework-dao:[unknown-version], /Users/admin/Documents/workspace-sts-3.8.4.RELEASE/framework-main/framework-dao/pom.xml, line 19, column 15
    [ERROR] 'dependencies.dependency.version' for commons-dbcp:commons-dbcp:jar is missing. @ cn.corpdata.framework:framework-dao:[unknown-version], /Users/admin/Documents/workspace-sts-3.8.4.RELEASE/framework-main/framework-dao/pom.xml, line 25, column 15
    [ERROR] 'dependencies.dependency.version' for org.springframework:spring-context:jar is missing. @ cn.corpdata.framework:framework-dao:[unknown-version], /Users/admin/Documents/workspace-sts-3.8.4.RELEASE/framework-main/framework-dao/pom.xml, line 31, column 15
    [ERROR] 'dependencies.dependency.version' for org.mybatis:mybatis:jar is missing. @ cn.corpdata.framework:framework-dao:[unknown-version], /Users/admin/Documents/workspace-sts-3.8.4.RELEASE/framework-main/framework-dao/pom.xml, line 37, column 15

    [ERROR] 

    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.

    [ERROR] Re-run Maven using the -X switch to enable full debug logging.

    [ERROR] 

    [ERROR] For more information about the errors and possible solutions, please read the following articles:

    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

  • 相关阅读:
    闭包问题小总结
    git常用命令总结
    数组对象方法的使用
    JS截取URL参数
    CSS清除浮动&内容居中&文字溢出
    网址大全
    any more
    下载网页视频
    下载无损音乐
    "前端" 宝藏网站
  • 原文地址:https://www.cnblogs.com/zealon/p/7190868.html
Copyright © 2020-2023  润新知