Maven分模塊開發(fā)執(zhí)行指令失敗的問題
Maven工程分模塊開發(fā)完成 父工程配置了 tomcat7插件,運行 run命令

執(zhí)行run指令時失敗,報錯信息如下:
D:\java\JDK8\bin\java.exe "-Dmaven.multiModuleProjectDirectory=D:\Idea2020\IntelliJ IDEA 2020.1\MavenProject_parent" -Dmaven.home=D:\apache-maven-3.6.3
-Dclassworlds.conf=D:\apache-maven-3.6.3\bin\m2.conf "
-Dmaven.ext.class.path=D:\Idea2020\IntelliJ IDEA 2020.1\plugins\maven\lib\maven-event-listener.jar" "
-javaagent:D:\Idea2020\IntelliJ IDEA 2020.1\lib\idea_rt.jar=50388:D:\Idea2020\IntelliJ IDEA 2020.1\bin"
-Dfile.encoding=UTF-8 -classpath D:\apache-maven-3.6.3\boot\plexus
-classworlds-2.6.0.jar;D:\apache-maven-3.6.3\boot\plexus
-classworlds.license org.codehaus.classworlds.Launcher
-Didea.version2020.1 -s D:\apache-maven-3.6.3\conf\settings.xml
-Dmaven.repo.local=D:\apache-maven-3.6.3\my_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:\Idea2020\IntelliJ IDEA 2020.1\MavenProject_parent\pom.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
<modules> <module>maven_dao</module> <module>maven_service</module> <module>maven_web</module> <module>maven_dao</module> </modules> <packaging>pom</packaging>
解決: 直接將重復的部分刪除即可正常運行Maven命令
總結(jié)
到此這篇關于Maven分模塊開發(fā)執(zhí)行指令失敗的問題的文章就介紹到這了,更多相關Maven執(zhí)行指令失敗內(nèi)容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Spring Cloud Gateway 如何修改HTTP響應信息
這篇文章主要介紹了Spring Cloud Gateway 修改HTTP響應信息的方式,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2021-07-07
基于@JsonSerialize和@JsonInclude注解使用方法
這篇文章主要介紹了@JsonSerialize和@JsonInclude注解使用方法,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2021-10-10
Springboot如何同時裝配兩個相同類型數(shù)據(jù)庫
這篇文章主要介紹了Springboot如何同時裝配兩個相同類型數(shù)據(jù)庫,具有很好的參考價值,希望對大家有所幫助。如有錯誤或未考慮完全的地方,望不吝賜教2021-11-11

