How to create .EAR file for spring boot multi module Project?

时间:2017-11-13 06:23:06

标签: maven spring-boot pom.xml multi-module

I have created spring boot multi module web project with one parent project and two child projects. It is having following structure.

Parent Project (Packaging type : POM)
    -First Child Project (web Project and Packaging type : Jar)
    -Second Child Project(Packaging type : Jar)

1 个答案:

答案 0 :(得分: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)

在第四个子模块中,我添加了前三个模块的依赖关系,并在像JBoss等企业应用服务器上部署了这个ear文件。