We are using Wildfly 8.0.0 Final but are in the process of moving to Wildfly 8.2. We are using Arquillian to run our unit tests in the container. I have noticed that Arquillian always seems to use the Wildfly standalone.xml.
It would be useful to be able to tell Arquillian what configuration to use when starting Wildfly. Wildfly comes with several different configuration files. It would be useful to have able to have Arquillian run wildfly with a specific configuration or even tell Arquillian what configuration to use for a test.
We use the Wildfly CLI to configure wildfly properties. This configuration is stored in the configuration file. If we could specify which configuration to use in starting Wildfly for a test we could then test our different configurations. This seems reasonable, but I haven't found a way to do this.
The Wildfly configuration file is specified by the startup parameter, --server-config.
As John wrote, you can. Adding an example of /arquillian.xml
:
(This is for WFly 10.x but it's been the same since AS 7 I think.)
<arquillian xmlns="http://jboss.org/schema/arquillian"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://jboss.org/schema/arquillian
http://jboss.org/schema/arquillian/arquillian_1_0.xsd">
<container qualifier="jbossas-managed" default="true">
<configuration>
<property name="jbossHome">target/wildfly-10.1.0.Final</property>
<property name="serverConfig">standalone-full.xml</property>
<property name="javaVmArguments">-Xms64m -Xmx2048m -Dorg.jboss.resolver.warning=true -Djboss.socket.binding.port-offset=100</property>
<property name="managementPort">10090</property>
<!--<property name="javaVmArguments">-Xms64m -Xmx2048m -Dorg.jboss.resolver.warning=true -agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=y</property>-->
</configuration>
</container>
</arquillian>