Skinny wars将多个spring boot wars集成到一个ear包中,并部署到jboss 7.3(jboss-eap-6.2)

Skinny wars将多个spring boot wars集成到一个ear包中,并部署到jboss 7.3(jboss-eap-6.2),jboss,war,spring-boot,ear,skinny-war,Jboss,War,Spring Boot,Ear,Skinny War,我正在尝试将ear包部署到带有skinnywars的jboss 7.3(jboss-eap-6.2)中,但到目前为止运气不佳。ear conatins有多个春季战靴战和罐子 为了清晰起见,我创建了一个简单的ear项目,有两个小的spring boot wars,我得到了相同的结果,skinnywars变为false,然后它工作了 过程: 我重新安装了jboss-eap-6.2(将以独立模式运行) 我已经为主项目创建了一个父pom.xml,其中包含spring boot starter父项目和模

我正在尝试将ear包部署到带有skinnywars的jboss 7.3(jboss-eap-6.2)中,但到目前为止运气不佳。ear conatins有多个春季战靴战和罐子

为了清晰起见,我创建了一个简单的ear项目,有两个小的spring boot wars,我得到了相同的结果,skinnywars变为false,然后它工作了

过程:

  • 我重新安装了jboss-eap-6.2(将以独立模式运行)
  • 我已经为主项目创建了一个父pom.xml,其中包含spring boot starter父项目和模块的DependenciesManagement(
  • 我创建了两个简单的web1.war和web2.war spring引导项目,每个项目上都只有一个索引页(部署到服务器上的每个war都运行得非常好)
  • 我已经创建了一个ear pom.xml,其中包含常见的依赖项(对于skinny部分)和用于skinnywars的maven ear插件配置
  • 包装和安装工程正常(ear项目重量约12Mb
  • 已将.ear文件复制到standalone/deployments,服务器不会启动两个spring引导应用程序
我错过了什么

父pom.xml

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<groupId>org.springframework</groupId>
<artifactId>skinny</artifactId>
<packaging>pom</packaging>
<version>1.0</version>

<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.1.9.RELEASE</version>
</parent>


<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<version>1.1.9.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
<version>1.1.9.RELEASE</version>
</dependency>
</dependencies>
</dependencyManagement>

<modules>
<module>web1</module>
<module>web2</module>
<module>ear</module>
</modules>
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
<version>2.3.2</version>
</plugin>
</plugins>
</build>

</project>
更新:我将示例代码推送到github->以查看是否有人在独立的jboss-eap-6.2服务器上部署并运行了该项目

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>web1</artifactId>
<version>0.1.0</version>
<packaging>war</packaging>

<parent>
<groupId>org.springframework</groupId>
<artifactId>skinny</artifactId>
<version>1.0</version>
</parent>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>

<properties>
<start-class>hello.Application</start-class>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<finalName>web1</finalName>
</build>

</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<artifactId>web2</artifactId>
<version>0.1.0</version>
<packaging>war</packaging>

<parent>
<groupId>org.springframework</groupId>
<artifactId>skinny</artifactId>
<version>1.0</version>
</parent>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>

<properties>
<start-class>hello.Application</start-class>
</properties>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
<finalName>web2</finalName>
</build>

</project>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<parent>
<artifactId>skinny</artifactId>
<groupId>org.springframework</groupId>
<version>1.0</version>
</parent>

<modelVersion>4.0.0</modelVersion>
<name>ear</name>
<artifactId>ear</artifactId>
<packaging>ear</packaging>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>web1</artifactId>
<version>0.1.0</version>
<type>war</type>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>web2</artifactId>
<version>0.1.0</version>
<type>war</type>
</dependency>
<!-- to get skinnywars the ear project has the common dependencies -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<skinnyWars>true</skinnyWars>
<defaultJavaBundleDir>lib</defaultJavaBundleDir>
<modules>
<webModule>
<groupId>org.springframework</groupId>
<artifactId>web1</artifactId>
<contextRoot>/web1</contextRoot>
</webModule>
<webModule>
<groupId>org.springframework</groupId>
<artifactId>web2</artifactId>
<contextRoot>/web2</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>
</plugins>
</build>

</project>
07:59:28,780 INFO  [org.jboss.modules] (main) JBoss Modules version 1.3.0.Final-redhat-2
    07:59:29,054 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.4.GA-redhat-1
    07:59:29,158 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015899: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) iniciando
    07:59:30,233 INFO  [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.7.GA-redhat-1
    07:59:30,236 INFO  [org.jboss.as.server] (Controller Boot Thread) JBAS015888: Creando el servicio de administración http utilizando el enlace de socket (management-http)
    07:59:30,241 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.7.GA-redhat-1
    07:59:30,249 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 3.2.18.GA-redhat-1
    07:59:30,363 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 29) JBAS010280: Activando el sub-sistema Infinispan.
    07:59:30,369 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 42) JBAS013171: Activando el sub-sistema de seguridad
    07:59:30,374 INFO  [org.jboss.as.jsf] (ServerService Thread Pool -- 35) JBAS012605: Se activaron las siguientes implementaciones JSF: [main, 1.2]
    07:59:30,387 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 37) JBAS011800: Activando el sub-sistema de nombrado
    07:59:30,389 INFO  [org.jboss.as.security] (MSC service thread 1-6) JBAS013170: Versión PicketBox actual=4.0.19.SP2-redhat-1
    07:59:30,460 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 46) JBAS015537: Activando WebServices Extension
    07:59:30,472 INFO  [org.jboss.as.connector.logging] (MSC service thread 1-3) JBAS010408: Iniciando JCA sub-sistema (IronJacamar 1.0.23.Final-redhat-1)
    07:59:30,502 INFO  [org.jboss.as.naming] (MSC service thread 1-7) JBAS011802: Iniciando el servicio de nombrado
    07:59:30,508 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-7) JBAS015400: Sesión de correo enlazada [java:jboss/mail/Default]
    07:59:30,672 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Implementación del controlador que cumple con los requerimientos de JDBC class oracle.jdbc.OracleDriver (versión 12.1)
    07:59:30,694 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 25) JBAS010403: Implementación del controlador que cumple con los requerimientos de JDBC class org.h2.Driver (versión 1.3)
    07:59:31,085 INFO  [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003001: Coyote HTTP/1.1 initializing on : http-/127.0.0.1:8080
    07:59:31,100 INFO  [org.apache.coyote.http11] (MSC service thread 1-4) JBWEB003000: Coyote HTTP/1.1 starting on: http-/127.0.0.1:8080
    07:59:31,332 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-4) JBAS010400: Fuente de datos enlazados [java:jboss/datasources/ExampleDS]
    07:59:31,333 INFO  [org.jboss.ws.common.management] (MSC service thread 1-8) JBWS022052: Starting JBoss Web Services - Stack CXF Server 4.2.3.Final-redhat-1
    07:59:31,359 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-4) JBAS015012: Inició FileSystemDeploymentService para el directorio /usr/local/Cellar/jboss/6.2.0/standalone/deployments
    07:59:31,371 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-6) JBAS015876: Iniciando la implementación de ear-1.0.ear" (runtime-name: "ear-1.0.ear")
    07:59:31,371 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Iniciando la implementación de bm-ds.xml" (runtime-name: "bm-ds.xml")
    07:59:31,371 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Iniciando la implementación de bddbm-ds.xml" (runtime-name: "bddbm-ds.xml")
    07:59:31,371 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-5) JBAS015876: Iniciando la implementación de bddjira4-ds.xml" (runtime-name: "bddjira4-ds.xml")
    07:59:31,372 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-3) JBAS015876: Iniciando la implementación de jira-ds.xml" (runtime-name: "jira-ds.xml")
    07:59:31,379 INFO  [org.jboss.as.remoting] (MSC service thread 1-4) JBAS017100: Escuchando en 127.0.0.1:9999
    07:59:31,379 INFO  [org.jboss.as.remoting] (MSC service thread 1-1) JBAS017100: Escuchando en 127.0.0.1:4447
    07:59:31,567 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/bddjiraDS]
    07:59:31,567 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-7) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/bddbmDS]
    07:59:31,568 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/jiraDS]
    07:59:31,568 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Fuente de datos enlazados [java:jboss/datasource/ubmDS]
    07:59:33,118 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-7) JBAS015876: Iniciando la implementación de null" (runtime-name: "web1-0.1.0.war")
    07:59:33,118 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015876: Iniciando la implementación de null" (runtime-name: "web2-0.1.0.war")
    07:59:33,414 INFO  [org.jboss.web] (ServerService Thread Pool -- 51) JBAS018210: Registrar el contexto web: /web2
    07:59:33,414 INFO  [org.jboss.web] (ServerService Thread Pool -- 48) JBAS018210: Registrar el contexto web: /web1
    07:59:33,595 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "jira-ds.xml" (runtime-name : "jira-ds.xml")
    07:59:33,595 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "ear-1.0.ear" (runtime-name : "ear-1.0.ear")
    07:59:33,596 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "bm-ds.xml" (runtime-name : "bm-ds.xml")
    07:59:33,596 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "bddjira4-ds.xml" (runtime-name : "bddjira4-ds.xml")
    07:59:33,596 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 26) JBAS018559: Implementado "bddbm-ds.xml" (runtime-name : "bddbm-ds.xml")
    07:59:33,605 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Interfaz de administración http escuchando en http://127.0.0.1:9990/management
    07:59:33,606 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Consola de administración escuchando en http://127.0.0.1:9990
    07:59:33,606 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss EAP 6.2.0.GA (AS 7.3.0.Final-redhat-14) inició en 5229ms - Inició 352 de 425 servicios (72 servicios son pasivos o por demanda)