一聚教程网:一个值得你收藏的教程网站

最新下载

热门教程

Maven分模块开发执行指令失败问题解决方法

时间:2020-09-27 编辑:袖梨 来源:一聚教程网

本篇文章小编给大家分享一下Maven分模块开发执行指令失败问题解决方法,文章介绍的很详细,小编觉得挺不错的,现在分享给大家供大家参考,有需要的小伙伴们可以来看看。

Maven工程分模块开发完成 父工程配置了 tomcat7插件,运行 run命令

执行run指令时失败,报错信息如下:

D:javaJDK8binjava.exe "-Dmaven.multiModuleProjectDirectory=D:Idea2020IntelliJ IDEA 2020.1MavenProject_parent" -Dmaven.home=D:apache-maven-3.6.3

-Dclassworlds.conf=D:apache-maven-3.6.3binm2.conf "

-Dmaven.ext.class.path=D:Idea2020IntelliJ IDEA 2020.1pluginsmavenlibmaven-event-listener.jar" "

-javaagent:D:Idea2020IntelliJ IDEA 2020.1libidea_rt.jar=50388:D:Idea2020IntelliJ IDEA 2020.1bin"

-Dfile.encoding=UTF-8 -classpath D:apache-maven-3.6.3bootplexus

-classworlds-2.6.0.jar;D:apache-maven-3.6.3bootplexus

-classworlds.license org.codehaus.classworlds.Launcher

-Didea.version2020.1 -s D:apache-maven-3.6.3confsettings.xml

-Dmaven.repo.local=D:apache-maven-3.6.3my_maven_local_repository install

[INFO] Scanning for projects...

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[ERROR] 'modules.module[3]' specifies duplicate child module maven_dao @ line 29, column 17

@

[ERROR] The build could not read 1 project -> [Help 1]

[ERROR]

[ERROR] The project com.idea.maven:MavenProject_parent:1.0-SNAPSHOT (D:Idea2020IntelliJ IDEA 2020.1MavenProject_parentpom.xml) has 1 error

[ERROR] 'modules.module[3]' specifies duplicate child module maven_dao @ line 29, column 17

[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

分析报错原因:

[ERROR] [ERROR] Some problems were encountered while processing the POMs:

[ERROR] 'modules.module[3]' specifies duplicate child module maven_dao @ line 29, column 17

原因: 在父工程的Pom.xml 文件中,指定了重复了子模块 maven_dao


  maven_dao
  maven_service
  maven_web
  maven_dao
 
 pom

解决: 直接将重复的部分删除即可正常运行Maven命令

热门栏目