【问题标题】:How to create .EAR file for spring boot multi module Project?如何为 Spring Boot 多模块项目创建 .EAR 文件?
【发布时间】:2018-04-25 18:34:59
【问题描述】:
我创建了一个包含一个父项目和两个子项目的 Spring Boot 多模块 Web 项目。它具有以下结构。
Parent Project (Packaging type : POM)
-First Child Project (web Project and Packaging type : Jar)
-Second Child Project(Packaging type : Jar)
【问题讨论】:
标签:
maven
spring-boot
pom.xml
multi-module
【解决方案1】:
为了为 maven spring boot 多模块项目创建 ear 文件,我创建了带有打包类型 ear 的单独包,然后我将其他模块的依赖项添加到此 ear 模块,以便我的项目结构如下所示。
Parent Project (Packaging type : POM)
-First Child module(web Project and Packaging type : war)
-Second Child module(Packaging type : war)
-Third Child module(Packaging type : jar)
-fourth child module(Packaging type : ear)
在第四个子模块中,我添加了前三个模块的依赖项,并将这个 ear 文件部署在 JBoss 等企业应用服务器上。