Using cargo to use the latest WildFly container

I am using java8 in this project I am working on. Unfortunately finding a servlet engine which fully works on Java8 is non-trivial. I was originally using Jetty8 (using the maven plug-in), but this throws exceptions when starting. It does not seem to impact the web application, but I would rather be safe than sorry. When migrating to Jetty9 (and loading using cargo as the maven plug-in does not directly support Jetty9) the container does not start at all.

So I tried WildFly. The current WildFly container uses one of the earlier WildFly version (not the current beta1), which is not good enough. Even beta1 needs a patch for java8. So I built a patched zip and tell cargo to use that zip file as application server.

<plugin>
    <groupId>org.codehaus.cargo</groupId>
    <artifactId>cargo-maven2-plugin</artifactId>
    <version>1.4.5</version>
    <configuration>
        <container>
            <containerId>wildfly8x</containerId>
            <zipUrlInstaller>
                <!--<url>http://download.jboss.org/wildfly/8.0.0.Beta1/wildfly-8.0.0.Beta1.tar.gz</url>-->
                <!--<url>file:///home/joachim/java/wildfly-8.0.0.Beta1/wildfly-8.0.0-beta1-jandex-1.1.0.zip</url>-->
                <url>http://www.progs.be/wildfly-8.0.0-beta1-jandex-1.1.0.zip</url>
                <downloadDir>${project.basedir}/.cargo/downloads</downloadDir>
                <extractDir>${project.basedir}/.cargo/extracts</extractDir>
            </zipUrlInstaller>
            <log>${basedir}/target/cargo.log</log>
            <output>${basedir}/target/wildfly.log</output>
            <dependencies>
                <dependency>
                    <groupId>postgresql</groupId>
                    <artifactId>postgresql</artifactId>
                </dependency>
            </dependencies>
        </container>
 
        <configuration>
            <!--
            <type>existing</type>
            <home>/home/joachim/java/wildfly-8.0.0.Beta1/</home>
            -->
            <properties>
                <cargo.servlet.port>8080</cargo.servlet.port>
                <cargo.logging>high</cargo.logging>
                <cargo.jvmargs>-Denv=test -Dtapestry.execution-mode=development</cargo.jvmargs>
            </properties>
        </configuration>
 
        <deployables>
            <deployable>
                <pingURL>http://localhost:8080/application/index</pingURL>
                <pingTimeout>120000</pingTimeout> <!-- 2 min -->
                <properties>
                    <context>fluxtock</context>
                </properties>
            </deployable>
        </deployables>
    </configuration>
    <executions>
        <execution>
            <id>start-cargo</id>
            <phase>pre-integration-test</phase>
            <goals><goal>start</goal></goals>
        </execution>
        <execution>
            <id>stop-cargo</id>
            <phase>post-integration-test</phase>
            <goals><goal>stop</goal></goals>
        </execution>
    </executions>
</plugin>

Leave a Reply

Your email address will not be published. Required fields are marked *

question razz sad evil exclaim smile redface biggrin surprised eek confused cool lol mad twisted rolleyes wink idea arrow neutral cry mrgreen

*