Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Maven 如何为spring boot多模块项目创建.EAR文件?_Maven_Spring Boot_Pom.xml_Multi Module - Fatal编程技术网

Maven 如何为spring boot多模块项目创建.EAR文件?

Maven 如何为spring boot多模块项目创建.EAR文件?,maven,spring-boot,pom.xml,multi-module,Maven,Spring Boot,Pom.xml,Multi Module,我已经创建了SpringBoot多模块web项目,其中有一个父项目和两个子项目。它具有以下结构 Parent Project (Packaging type : POM) -First Child Project (web Project and Packaging type : Jar) -Second Child Project(Packaging type : Jar) 为了为maven spring boot多模块项目创建ear文件,我创建了单独的包,包类型为ear,之

我已经创建了SpringBoot多模块web项目,其中有一个父项目和两个子项目。它具有以下结构

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

为了为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等。

为ear@Jens是的,你的回答对我有帮助。