the original artical is "https://stackoverflow.com/questions/45351672/maven-war-packaging-with-value-war-is-invalid-aggregator-projects-require"
you need to add "dependency" in parent pom.xml file as below:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
<!-- <exclusion>-->
<!-- <groupId>org.springframework.boot</groupId>-->
<!-- <artifactId>spring-boot-starter-tomcat</artifactId>-->
<!-- </exclusion>-->
</exclusions>
</dependency>
In the sub projects, it requires to setup "war" package. but, for shared service package, it is not allowed to set up war package as below:
<!-- <packaging>war</packaging>-->
enhance your applicaiton class now:
// public class EClaimApplication extends SpringBootServletInitializer {
public class EClaimApplication {
public static void main(String[] args) {
// ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(EClaimApplication.class)
// .build().run(args);
SystemArg newArg = SystemArgUtils.getLocation(args);
ConfigurableApplicationContext applicationContext = new SpringApplicationBuilder(EClaimApplication.class)
.properties(
newArg.getArg()
)
.build().run(newArg.getArgs());
}
// @Override
// protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
// return builder.sources(EClaimApplication.class);
// }
}