加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

[maven]Unabletoaddmoduletothecurrentprojectasitisnotofpackagingtype‘pom‘

(2022-08-16 16:53:01)
分类: springboot
    [INFO] ----------------------------------------------------------------------------
    [INFO] Using following parameters for creating project from Old (1.x) Archetype: maven-archetype-quickstart:1.1
    [INFO] ----------------------------------------------------------------------------
    [INFO] Parameter: basedir, Value: /home/lius/codes/java/maven/springframework/sf
    [INFO] Parameter: package, Value: com.lius.sf
    [INFO] Parameter: groupId, Value: com.lius.sf
    [INFO] Parameter: artifactId, Value: lesson01
    [INFO] Parameter: packageName, Value: com.lius.sf
    [INFO] Parameter: version, Value: 1.0-SNAPSHOT
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  37.226 s
    [INFO] Finished at: 2022-07-07T22:24:01+08:00
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.2.1:generate (default-cli) on project sf: Unable to add module to the current project as it is not of packaging type 'pom' -> [Help 1]
    [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/MojoFailureException

    翻译:Unable to add module to the current project as it is not of packaging type 'pom'

    原因:在maven项目下创建module的前提条件是该maven项目的pom.xml文件的packaging 是pom,而不是jar

    解决方案:将父级maven项目的pom.xml文件的packaging 改为pom即可。
————————————————
版权声明:本文为CSDN博主「木瞳」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_39663113/article/details/125668446

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有