Multi-war skin wars w760> into ear package and deployment in jboss 7.3 (jboss-eap-6.2)

I am trying to deploy ear package in jboss 7.3 (jboss-eap-6.2) with skinnywars, no luck so far. Ear codes several spring-bot wars and jars.

For clarity, I created one simple ear project with 2 little w760 -boot-wars and I got the same results, skinnywars is false and then it works.

Process:

  • I did a fresh install of jboss-eap-6.2 (which will work offline)
  • I created a parent pom.xml for the main project with spring-boot-starter-parent and dependent commands for modules (
  • I created two simple spring projects web1.war and web2.war with nothing more than thymeleaf index page on each one. (every war deployed on the server works fine)
  • I created ear pom.xml with generic dependencies (for the skinny part) and maven-ear-plugin configuration for skinnywars.
  • Packing and installation work in order (projector weight is about 12MB,
  • Copied the .ear file to standalone / deployments and the server is not running any of the spring boot apps ...

What am I missing?

Parent 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>

      

Web1.war pom.xml 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>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>

      

Web2.war project (the same web1):

<?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>

      

Finally, an in-ear microphone with the maven-ear-plugin skinnywars configuration:

<?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>

      

As I mentioned earlier, if I change true to false, the ear package works fine on the app server ...

I've tried so many different maven-war-plugin and maven-ear-plugin configurations without any problem ...

Updated: This is jboss log output, it seems like it will load the web1 and web2 context, but neither of the two spring-boot applications start ....

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)

      

Updated: I pushed the sample code to github - > guilu / spring-boot-ear-skinny-war to see if someone would get and run the project in the jboss-eap-6.2 standalone server.

+2


source to share





All Articles