How to use a custom server configuration file for Arquillian

A simple and effective way to use a custom standalone.xml (or its variants) is to pass it via the System Properties contained in javaVmArguments of arquillian.xml.

Here's an example of it:

<container qualifier="jbossas-managed"  default="true" >

  <configuration>

  <property name="jbossHome">${jbossHome}</property>

  <property name="outputToConsole">true</property>

  <property name="allowConnectingToRunningServer">true</property>

  <property name="javaVmArguments">-Xmx512m -XX:MaxPermSize=256m -Djboss.bind.address=${arquillian.localAddress}
                -Dserver-config=${project.basedir}/src/test/resources/test-standalone.xml
            </property>
  </configuration>
  </container>

 

Follow us on Twitter