Arquillian + JSFUnit in CI Server

Goal

We want to automate a test written in JSFUnit with Arquillian support in our CI server which may have already running application server instances

Description

We have a Java application in which the implementation of the tests has been made using JSFUnit + Arquillian. This project is a Maven project and we want to integrate it in our CI infrastructure (a Jenkins server) where, for some reason, there are instances of the same type of application server we are intending to run our application on, with potentially conflicting configurations, such as listening ports

How to

The demo project is a Web application (deployed as a .war file), implemented in a Maven multimodule project, with the following child modules:

  • db – module containing liquibase changesets to deal with the database upgrading process
  • tests – module containing the integration tests (where we will include our class LoginIntegrationTest
  • web – module containing the application code (where we will include our Login class and all related facelets

The target class for the implementation of the test is the Login class, responsible for the implementation of the authentication in the application (most code was not included for simplicity and demonstration reasons):

package myproject.web.auth;

import javax.ejb.Stateful;
import javax.enterprise.context.SessionScoped;
import javax.inject.Named;
...

@SessionScoped
@Stateful
@Named("login")
public class Login implements Serializable {
    ...
    public String login() {
        // all the logic related to the authentication and loading the user's roles
    }
    ...
}

Notice that we are using CDI (Weld) in the implementation of the class and that we have defined a named component for the class Login named login which is how we will refer to the bean, through expression language, in our facelets pages.

The implementation of an integrated test for the previous class could be implemented in a class named LoginIntegrationTest, such as the one that follows (notice that, in this recipe, I am mostly interested in how to automate the test in a CI environment, not in the details of the test):

package myproject.test.web.auth;

import java.io.File;
import java.io.IOException;

import junit.framework.Assert;

import org.jboss.arquillian.container.test.api.Deployment;
import org.jboss.arquillian.junit.Arquillian;
import org.jboss.arquillian.persistence.Cleanup;
import org.jboss.arquillian.persistence.CleanupStrategy;
import org.jboss.arquillian.persistence.TestExecutionPhase;
import org.jboss.arquillian.persistence.UsingDataSet;
import org.jboss.jsfunit.api.InitialPage;
import org.jboss.jsfunit.jsfsession.JSFClientSession;
import org.jboss.jsfunit.jsfsession.JSFServerSession;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.junit.Test;
import org.junit.runner.RunWith;

import myproject.test.DeploymentConfiguration;

@RunWith(Arquillian.class)
@UsingDataSet("login.db.xml")
public class LoginIntegrationTest {

    @Deployment
    public static WebArchive createDeployment() {
        final WebArchive war = DeploymentConfiguration.createCDIDeployment();
        // Add xhtml specific files
        war.addAsWebResource(new File("../web/src/main/webapp/login.xhtml"));
        war.addAsWebResource(new File("../web/src/main/webapp/protected/home.xhtml"), 
                             "protected/home.xhtml");
        return war;
    }

    @Test
    @InitialPage("/login.jsf")
    @Cleanup(phase = TestExecutionPhase.AFTER, strategy = CleanupStrategy.USED_ROWS_ONLY)
    public void testSuccessfulLogin(JSFServerSession server, JSFClientSession client) throws IOException {
        // Test navigation to initial viewID
        Assert.assertEquals("/login.xhtml", server.getCurrentViewID());

        //Set data to form:
        client.setValue("login:username", "admin");
        client.setValue("login:password", "admin");

        //Submit form:
        client.click("login:loginButton");

        //The new page should be "/protected/home.xhtml":
        Assert.assertEquals("/protected/home.xhtml", server.getCurrentViewID());
    }

    @Test
    @InitialPage("/login.jsf")
    @Cleanup(phase = TestExecutionPhase.AFTER, strategy = CleanupStrategy.USED_ROWS_ONLY)
    public void testUnsuccessfulLogin(JSFServerSession server, JSFClientSession client) throws IOException {
        // Test navigation to initial viewID
        Assert.assertEquals("/login.xhtml", server.getCurrentViewID());

        //Set data to form:
        client.setValue("login:username", "dummy");
        client.setValue("login:password", "admin");

        //Submit form:
        client.click("login:loginButton");

        //The new page should still be "/login.xhtml":
        Assert.assertEquals("/login.xhtml", server.getCurrentViewID());
    }
}

In the previous class, we start by defining the class as a class that will run in the context of Arquillian, through the use of @RunWith(Arquillian.class). Next, and because our login class performs its authentication against a database, we will use DBUnit to setup an in-memory database to run our tests against. This is accomplished, through the specification of @UsingDataSet("login.db.xml").

Next, we specify how our test application should be deployed, i.e., the structure of the .war file we will deploy for our tests (@Deployment). The implementation of our deployment method uses the base definition of the DeploymentConfiguration helper class, whose code follows, with additional files added that are specific to the test we want to run:

package myproject.test;

import java.io.File;

import org.jboss.shrinkwrap.api.ArchivePaths;
import org.jboss.shrinkwrap.api.ShrinkWrap;
import org.jboss.shrinkwrap.api.asset.EmptyAsset;
import org.jboss.shrinkwrap.api.importer.ZipImporter;
import org.jboss.shrinkwrap.api.spec.WebArchive;
import org.jboss.shrinkwrap.resolver.api.maven.Maven;

public class DeploymentConfiguration {

    private static final String MYPROJECT_WAR_NAME = "myprojecttest.war";

    private static final String APPLICATION_PACKAGE = "myproject";

    private static WebArchive war;

    public static final String WEB_BUNDLE_SRC = "../web/src/main/resources";

    public static final String WEBAPP_SRC = "../web/src/main/webapp";

    public static WebArchive createCDIDeployment() {

        // load dependencies from pom.xml in web module
        final File[] libs = Maven.resolver().loadPomFromFile("../web/pom.xml").
                                             importRuntimeDependencies().asFile();

        war = ShrinkWrap.create(WebArchive.class, MYPROJECT_WAR_NAME);
        // Add all myproject package and subpackages classes
        war.addPackages(true, APPLICATION_PACKAGE);
        // Enable CDI
        war.addAsWebInfResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
        // Add persistence.xml
        war.addAsResource("META-INF/persistence.xml");
        // Add maven dependencies
        war.addAsLibraries(libs);
        // Add JSF configuration field
        war.addAsWebInfResource(new File(WEBAPP_SRC + 
        "/WEB-INF/faces-config.xml"), "faces-config.xml");
        // Add deployment descriptor
        war.addAsWebInfResource(new File(WEBAPP_SRC + 
        "/WEB-INF/web.xml"), "web.xml");

        // Add xhtml common files
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/WEB-INF/templates/default.xhtml"), "WEB-INF/templates/default.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/WEB-INF/templates/menu.xhtml"), "WEB-INF/templates/menu.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/WEB-INF/templates/create_template.xhtml"), "WEB-INF/templates/create_template.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/WEB-INF/templates/search_template.xhtml"), "WEB-INF/templates/search_template.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/template_parts/text_field.xhtml"), "template_parts/text_field.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/template_parts/password_field.xhtml"), "template_parts/password_field.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + "/error.xhtml"), "error.xhtml");
        war.addAsWebResource(new File(WEBAPP_SRC + "/timeout.xhtml"), "timeout.xhtml");
        // Add resource bundle files
        war.addAsWebResource(new File(WEB_BUNDLE_SRC + 
        "/myproject_pt.properties"), "WEB-INF/classes/myproject_pt.properties");
        war.addAsWebResource(new File(WEB_BUNDLE_SRC + 
        "/myproject_en.properties"), "WEB-INF/classes/myproject_en.properties");
        // Add CSS files
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/resources/css/screen.css"), "resources/css/screen.css");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/resources/css/m.screen.css"), "resources/css/m.screen.css");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/resources/css/theme.css"), "resources/css/theme.css");
        // Add Javascript files
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/resources/js/myproject.js"), "resources/js/myproject.js");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/resources/js/app.js"), "resources/js/app.js");
        war.addAsWebResource(new File(WEBAPP_SRC + 
        "/resources/js/jquery-1.6.4.js"), "resources/js/jquery-1.6.4.js");
        return war;
    }
}

After the definition of the deployment structure, we state which methods will contain our test cases implementation through the annotation @Test. Additionally, and because we are using JSFUnit together with DBUnit, we specify the JSFUnit annotation @InitialPage("/login.jsf") which states what is the initial page that the test starts in. Additionally, through the specification of @Cleanup(phase = TestExecutionPhase.AFTER, strategy = CleanupStrategy.USED_ROWS_ONLY), we tell DBUnit to delete the created rows to run the test upon completion.

Finally, our test methods contain a specific signature to JSFUnit that will make it possible to setup a JSF request for our tests execution (JSFServerSession server, JSFClientSession client).

Now, we still need to define the appropriate settings in the pom.xml of the test module, listed below (the most relevant parts for this recipe have been marked in bold. However, and because some of you may want to try the code yourself, one – at least, almost – complete pom.xml definition file could be very handy):

<?xml version="1.0"?>
<project
        xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
        xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
        <modelVersion>4.0.0</modelVersion>
        <parent>
                <artifactId>myproject</artifactId>
                <groupId>mycompany</groupId>
                <version>1.0.0-SNAPSHOT</version>
        </parent>
        <artifactId>myproject-tests</artifactId>
        <name>mycompany.myproject-tests</name>
        <properties>
                <version.jsfunit>2.0.0.Beta2</version.jsfunit>
                <!-- Specification of the default ports to avoid collisions to already 
                        running JBoss instances -->
                <port.management-native>19999</port.management-native>
                <port.management-http>19990</port.management-http>
                <port.management-https>19443</port.management-https>
                <port.ajp>8309</port.ajp>
                <port.http>8380</port.http>
                <port.https>8743</port.https>
                <port.osgi-http>8390</port.osgi-http>
                <port.remoting>4747</port.remoting>
                <port.txn-recovery-environment>5012</port.txn-recovery-environment>
                <port.txn-status-manager>5013</port.txn-status-manager>
        </properties>
        <build>
                <resources>
                        <resource>
                                <directory>${project.basedir}/src/main/resources</directory>
                                <filtering>true</filtering>
                        </resource>
                </resources>
                <testResources>
                        <testResource>
                                <directory>${project.basedir}/src/test/resources</directory>
                                <filtering>true</filtering>
                        </testResource>
                </testResources>
                <plugins>
                        <!-- 
                             other plugins definitions, such as the maven compiler
                             plugin not shown... 
                         -->
                        <plugin>
                                <artifactId>maven-surefire-plugin</artifactId>
                                <version>2.4.3</version>
                                <configuration>
                                        <skip>true</skip>
                                </configuration>
                        </plugin>
                        <plugin>
                                <groupId>org.apache.maven.plugins</groupId>
                                <artifactId>maven-resources-plugin</artifactId>
                                <version>2.6</version>
                                <configuration>
                                        <escapeString>\</escapeString>
                                        <delimiters>
                                                <!-- to keep the default behavior -->
                                                <delimiter>${*}</delimiter>
                                                <!-- to add Ant-like tokens style -->
                                                <delimiter>@</delimiter>
                                        </delimiters>
                                </configuration>
                        </plugin>
                </plugins>
        </build>
        <profiles>
                <profile>
                        <id>jbossas-managed</id>
                        <activation>
                                <activeByDefault>false</activeByDefault>
                        </activation>
                        <dependencies>
                                <dependency>
                                        <groupId>org.jboss.spec</groupId>
                                        <artifactId>jboss-javaee-6.0</artifactId>
                                        <version>1.0.0.Final</version>
                                        <type>pom</type>
                                        <scope>provided</scope>
                                </dependency>
                                <dependency>
                                        <groupId>org.jboss.as</groupId>
                                        <artifactId>
                                          jboss-as-arquillian-container-managed
                                        </artifactId>
                                        <version>7.1.1.Final</version>
                                        <scope>test</scope>
                                </dependency>
                                <dependency>
                                        <groupId>org.jboss.arquillian.protocol</groupId>
                                        <artifactId>arquillian-protocol-servlet</artifactId>
                                        <scope>test</scope>
                                </dependency>
                        </dependencies>
                        <build>
                                <plugins>
                                        <plugin>
                                                <artifactId>maven-surefire-plugin</artifactId>
                                                <version>2.4.3</version>
                                                <configuration>
                                                        <skip>false</skip>
                                                </configuration>
                                        </plugin>
                                        <plugin>
                                                <artifactId>maven-dependency-plugin</artifactId>
                                                <executions>
                                                        <execution>
                                                                <id>unpack</id>
                                                                <phase>process-test-classes
                                                                </phase>
                                                                <goals>
                                                                        <goal>unpack</goal>
                                                                </goals>
                                                                <configuration>
                                                                        <artifactItems>
                                                                                <artifactItem>
                                                                                        <groupId>org.jboss.as</groupId>
                                                                                        <artifactId>jboss-as-dist</artifactId>
                                                                                        <version>7.1.1.Final</version>
                                                                                        <type>zip</type>
                                                                                        <overWrite>false</overWrite>
                                                                                        <outputDirectory>target</outputDirectory>
                                                                                </artifactItem>
                                                                        </artifactItems>
                                                                </configuration>
                                                        </execution>
                                                </executions>
                                        </plugin>
                                </plugins>
                        </build>
                </profile>

                <!-- This profile will run the tests in the remote jboss we configure -->
                <profile>
                        <id>jbossas-remote</id>
                        <activation>
                                <activeByDefault>false</activeByDefault>
                        </activation>
                        <dependencies>
                                <dependency>
                                        <groupId>org.jboss.spec</groupId>
                                        <artifactId>jboss-javaee-6.0</artifactId>
                                        <version>1.0.0.Final</version>
                                        <type>pom</type>
                                        <scope>provided</scope>
                                </dependency>
                                <dependency>
                                        <groupId>org.jboss.as</groupId>
                                        <artifactId>jboss-as-arquillian-container-remote</artifactId>
                                        <version>7.1.1.Final</version>
                                        <scope>test</scope>
                                </dependency>
                                <dependency>
                                        <groupId>org.jboss.arquillian.protocol</groupId>
                                        <artifactId>arquillian-protocol-servlet</artifactId>
                                        <scope>test</scope>
                                </dependency>
                        </dependencies>
                        <build>
                                <plugins>
                                        <plugin>
                                                <artifactId>maven-surefire-plugin</artifactId>
                                                <version>2.4.3</version>
                                                <configuration>
                                                        <skip>false</skip>
                                                </configuration>
                                        </plugin>
                                </plugins>
                        </build>
                </profile>
        </profiles>
        <dependencyManagement>
                <dependencies>
                        <dependency>
                                <groupId>org.jboss.shrinkwrap.resolver</groupId>
                                <artifactId>shrinkwrap-resolver-bom</artifactId>
                                <version>2.0.0-alpha-6</version>
                                <scope>import</scope>
                                <type>pom</type>
                        </dependency>
                        <!-- Now pull in our server-based unit testing framework -->
                        <dependency>
                                <groupId>org.jboss.arquillian</groupId>
                                <artifactId>arquillian-bom</artifactId>
                                <version>1.0.2.Final</version>
                                <scope>import</scope>
                                <type>pom</type>
                        </dependency>
                        <!-- JBoss distributes a complete set of Java EE 6 APIs including a Bill 
                                of Materials (BOM). A BOM specifies the versions of a "stack" (or a collection) 
                                of artifacts. We use this here so that we always get the correct versions 
                                of artifacts. Here we use the jboss-javaee-web-6.0 stack (you can read this 
                                as the JBoss stack of the Java EE Web Profile 6 APIs) -->
                        <dependency>
                                <groupId>org.jboss.spec</groupId>
                                <artifactId>jboss-javaee-web-6.0</artifactId>
                                <version>${javaee6.web.spec.version}</version>
                                <type>pom</type>
                                <scope>import</scope>
                        </dependency>
                </dependencies>
        </dependencyManagement>
        <dependencies>
                <dependency>
                        <groupId>mycompany</groupId>
                        <artifactId>myproject-web</artifactId>
                        <version>${project.version}</version>
                        <classifier>classes</classifier>
                        <scope>test</scope>
                        <exclusions>
                                <exclusion>
                                        <artifactId>hibernate-core</artifactId>
                                        <groupId>org.hibernate</groupId>
                                </exclusion>
                                <exclusion>
                                        <artifactId>hibernate-search</artifactId>
                                        <groupId>org.hibernate</groupId>
                                </exclusion>
                                <exclusion>
                                        <artifactId>log4j</artifactId>
                                        <groupId>log4j</groupId>
                                </exclusion>
                                <exclusion>
                                        <artifactId>xml-apis</artifactId>
                                        <groupId>xml-apis</groupId>
                                </exclusion>
                                <exclusion>
                                        <artifactId>xmlbeans</artifactId>
                                        <groupId>org.apache.xmlbeans</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>

                <!-- Optional, but highly recommended -->
                <!-- Arquillian allows you to test enterprise code such as EJBs and Transactional(JTA) 
                        JPA from JUnit/TestNG -->
                <dependency>
                        <groupId>org.jboss.arquillian.junit</groupId>
                        <artifactId>arquillian-junit-container</artifactId>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.arquillian.protocol</groupId>
                        <artifactId>arquillian-protocol-servlet</artifactId>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.arquillian.container</groupId>
                        <artifactId>arquillian-container-spi</artifactId>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.shrinkwrap.resolver</groupId>
                        <artifactId>shrinkwrap-resolver-impl-maven</artifactId>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.shrinkwrap.resolver</groupId>
                        <artifactId>shrinkwrap-resolver-api-maven</artifactId>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.shrinkwrap.descriptors</groupId>
                        <artifactId>shrinkwrap-descriptors-spi</artifactId>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.shrinkwrap.descriptors</groupId>
                        <artifactId>shrinkwrap-descriptors-impl</artifactId>
                        <version>1.0.0-beta-1</version>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.arquillian.extension</groupId>
                        <artifactId>arquillian-persistence-impl</artifactId>
                        <version>1.0.0.Alpha4</version>
                </dependency>

                <dependency>
                        <groupId>org.jboss.jsfunit</groupId>
                        <artifactId>jsfunit-arquillian</artifactId>
                        <version>${version.jsfunit}</version>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>org.jboss.jsfunit</groupId>
                        <artifactId>jboss-jsfunit-core</artifactId>
                        <version>${version.jsfunit}</version>
                        <scope>test</scope>
                        <exclusions>
                                <exclusion>
                                        <artifactId>xml-apis</artifactId>
                                        <groupId>xml-apis</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>

                <dependency>
                        <groupId>javax.faces</groupId>
                        <artifactId>jsf-api</artifactId>
                        <scope>provided</scope>
                        <version>${jsf.version}</version>
                </dependency>

                <!-- Import the EJB API, we use provided scope as the API is included in 
                        JBoss -->
                <dependency>
                        <groupId>org.jboss.spec.javax.ejb</groupId>
                        <artifactId>jboss-ejb-api_3.1_spec</artifactId>
                        <scope>test</scope>
                </dependency>

                <!-- Import the JPA API, we use provided scope as the API is included in 
                        JBoss -->
                <dependency>
                        <groupId>org.hibernate.javax.persistence</groupId>
                        <artifactId>hibernate-jpa-2.0-api</artifactId>
                        <scope>provided</scope>
                </dependency>
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-entitymanager</artifactId>
                        <version>${hibernate.version}</version>
                        <scope>provided</scope>
                        <exclusions>
                                <exclusion>
                                        <artifactId>dom4j</artifactId>
                                        <groupId>dom4j</groupId>
                                </exclusion>
                        </exclusions>
                </dependency>
                <dependency>
                        <groupId>org.hibernate</groupId>
                        <artifactId>hibernate-envers</artifactId>
                        <version>${hibernate.version}</version>
                        <scope>test</scope>
                </dependency>

                <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>4.10</version>
                        <type>jar</type>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.dbunit</groupId>
                        <artifactId>dbunit</artifactId>
                        <version>2.4.9</version>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.slf4j</groupId>
                        <artifactId>slf4j-simple</artifactId>
                        <version>1.5.6</version>
                        <type>jar</type>
                        <scope>test</scope>
                </dependency>
                <dependency>
                        <groupId>org.hsqldb</groupId>
                        <artifactId>hsqldb</artifactId>
                        <version>2.2.8</version>
                        <scope>test</scope>
                </dependency>

        </dependencies>
</project>

We will use Maven’s resource filtering to change some properties at build time in the file standalone.xml, inside tests/src/test/resources, whose content is shown next (basically, it is one standalone.xml from JBoss 7 with some changes to make it possible for the port definitions to be changed appropriately):

<?xml version='1.0' encoding='UTF-8'?>
<server xmlns="urn:jboss:domain:1.2">

  <!-- no changes from a straight standalone.xml file from JBoss 7.2 -->

  <socket-binding-group name="standard-sockets" default-interface="public" 
    port-offset="${jboss.socket.binding.port-offset:0}">
    <socket-binding name="management-native" interface="management" 
      port="\${jboss.management.native.port:@port.management-native@}"/>
    <socket-binding name="management-http" interface="management" 
      port="\${jboss.management.http.port:@port.management-http@}"/>
    <socket-binding name="management-https" interface="management" 
      port="\${jboss.management.https.port:@port.management-https@}"/>
    <socket-binding name="ajp" port="${port.ajp}"/>
    <socket-binding name="http" port="${port.http}"/>
    <socket-binding name="https" port="${port.https}"/>
    <socket-binding name="osgi-http" interface="management" port="${port.osgi-http}"/>
    <socket-binding name="remoting" port="${port.remoting}"/>
    <socket-binding name="txn-recovery-environment" port="${port.txn-recovery-environment}"/>
    <socket-binding name="txn-status-manager" port="${port.txn-status-manager}"/>
    <!-- no changes from a straight standalone.xml file from JBoss 7.2 -->

  </socket-binding-group>
</server>

The first set of properties marked in bold are the ones that contain the default port values to make the application server (JBoss, in this particular case) run. These ports were specified as properties so that, even the default ones should not conflict with others in a target environment, if that is not the case, the user is still able to build the application, specifying new ports for the conflicting ones without any changes in the project’s definition.

We also set the property to skip the tests to true so that the tests are not run on every build of the system. Instead, they will only be executed when we specify one of the testing profiles (jbossas-managed or jbossas-remote). Notice that these are integration/system tests meaning that are not the most appropriate ones for a CI job (they may take a long time to run, meaning that they should be run on specific time intervals or on demand, not on every SCM commit!).

We have also configured maven-resource-plugin to be able to recognize patterns that should not be replaced on the target file standalone.xml and those that should not. In this case, the value \${jboss.management.http.port:@port.management-http@} after replacement, would result in ${jboss.management.native.port:19999}.

And that is all. I am sorry for the long post but, hopefully, it will be helpful as much as it was for me 🙂

Explanations

Not much to say here as all explanations were made in place.

4 comments

  1. Greetings, I do believe your site could possibly be having browser compatibility
    issues. Whenever I take a look at your website in
    Safari, it looks fine but when opening in IE,
    it’s got some overlapping issues. I just wanted to provide you with a quick heads up! Besides that, great site!

    1. Hello. Thank you for the compliment.

      Now, in what regards the compatibility issues, I didn’t know that so, thanks once again for the heads up! I promise you I will take a look at it when I have some spare time… the main problem with it is that I don’t use Windows nor IE… eheh! But that is not an excuse so, I will definitely try to fix it… 🙂

      1. I just took a look at this page in IE 8 and everything was shown as expected. Could you please provide me with more details, namely which version of IE are you using when things don’t appear properly, and which things on which pages?

        Best regards,

        Paulo Zenida

  2. It’s the best time to make some plans for the future and it is time to be happy. I’ve
    read this post and if I could I wish to suggest you few interesting things or advice.
    Perhaps you could write next articles referring to this article.
    I wish to read even more things about it!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s