Unable to add module to the current project as it is not of packaging type 'pom' -
发布时间
阅读量:
阅读量
问题描述
在使用maven-archetype-plugin构建多module项目骨架时的异常栈信息:
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 10.294 s
[INFO] Finished at: 2020-04-26T21:30:39+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-archetype-plugin:3.1.2:generate (default-cli) on project maven-archetype: 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’
原因分析
产生该问题的是因为再构建项目骨架时,默认路径再当前工程目录下面,且当前当前工程目录下面已经有一个pom.xml文件,所以不能再创建了pom文件了。
解决方法
不要在当前目录下面构建项目骨架,找一个新的文件目录,避免目录下面存在pom.xml文件
全部评论 (0)
还没有任何评论哟~
