【spring cloud】spring cloud打包最外层项目报错:'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 9, column 13

OK,spring cloud项目,最外层的父级项目在打包的时候,报错如下:

"C:\Program Files\Java\jdk1.8.0_131\bin\java" -Dmaven.multiModuleProjectDirectory=D:\apps\ideaProjects\springcloud -Dmaven.home=D:\apps\apache-maven-3.5.0 -Dclassworlds.conf=D:\apps\apache-maven-3.5.0\bin\m2.conf -javaagent:D:\apps\ideaIU-2017.3.4\lib\idea_rt.jar=57744:D:\apps\ideaIU-2017.3.4\bin -Dfile.encoding=UTF-8 -classpath D:\apps\apache-maven-3.5.0\boot\plexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.3.4 -s D:\apps\apache-maven-3.5.0\conf\settings.xml install
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[ERROR] 'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 9, column 13
 @ 
[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project com.swapping:springcloud:0.0.1-SNAPSHOT (D:\apps\ideaProjects\springcloud\pom.xml) has 1 error
[ERROR]     'packaging' with value 'jar' is invalid. Aggregator projects require 'pom' as packaging. @ line 9, column 13
[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

Process finished with exit code 1

 

 

解决方法:

修改pom.xml文件中的项目指定打包类型

修改后:

 

posted @ 2018-07-15 21:20  Angel挤一挤  阅读(1294)  评论(0编辑  收藏  举报