【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 FilesJavajdk1.8.0_131injava" -Dmaven.multiModuleProjectDirectory=D:appsideaProjectsspringcloud -Dmaven.home=D:appsapache-maven-3.5.0 -Dclassworlds.conf=D:appsapache-maven-3.5.0inm2.conf -javaagent:D:appsideaIU-2017.3.4libidea_rt.jar=57744:D:appsideaIU-2017.3.4in -Dfile.encoding=UTF-8 -classpath D:appsapache-maven-3.5.0ootplexus-classworlds-2.5.2.jar org.codehaus.classworlds.Launcher -Didea.version=2017.3.4 -s D:appsapache-maven-3.5.0confsettings.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:appsideaProjectsspringcloudpom.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文件中的项目指定打包类型

修改后:

原文地址:https://www.cnblogs.com/sxdcgaq8080/p/9314865.html