[[How_the_server_is_built_and_configured_for_testsuite_modules]]
= How the WildFly is built and configured for testsuite modules.

Refer to <<Shortened_Maven_Run_Overview,Shortened Maven Run Overview>> to see the
mentioned build steps.

\1) AS instance is copied from `${jboss.dist`} to
`testsuite/target/jbossas`. +
Defaults to AS which is built by the project (
`build/target/jboss-as-*`).

2)

*testsuite/pom.xml:*

from $\{jboss.home} to $\{basedir}/target/jbossas +
phase generate-test-resources: resource-plugin, goal copy-resources

*testsuite/integration/pom.xml:*

phase process-test-resources: antrun-plugin:

[source,xml,options="nowrap"]
----
<ant antfile="$\{basedir}/src/test/scripts/basic-integration-build.xml">
    <target name="build-basic-integration"/>
    <target name="build-basic-integration-jts"/>
</ant>
----

Which invokes

[source,xml,options="nowrap"]
----
<target name="build-basic-integration" description="Builds server configuration for basic-integration tests">
      <build-server-config name="jbossas"/>
----

Which invokes

[source,xml,options="nowrap"]
----
<!-- Copy the base distribution. -->
<!-- We exclude modules and bundles as they are read-only and we locate the via sys props. -->
<copy todir="@{output.dir}/@{name}">
    <fileset dir="@{jboss.dist}">
        <exclude name="**/modules/**"/>
        <exclude name="**/bundles/**"/>
    </fileset>
</copy>
 
<!-- overwrite with configs from test-configs and apply property filtering -->
<copy todir="@{output.dir}/@{name}" overwrite="true" failonerror="false">
    <fileset dir="@{test.configs.dir}/@{name}"/>
    <filterset begintoken="${" endtoken="}">
        <filter token="node0" value="${node0}"/>
        <filter token="node1" value="${node1}"/>
        <filter token="udpGroup" value="${udpGroup}"/>
        <filter-elements/>
    </filterset>
</copy>
----

[[arquillian-config-file-location]]
== Arquillian config file location

[source,options="nowrap"]
----
-Darquillian.xml=some-file-or-classpath-resource.xml
----
