<?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>
        <groupId>org.jboss.resteasy.spring</groupId>
        <artifactId>resteasy-integration-tests-spring</artifactId>
        <version>3.2.0.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>resteasy-integration-tests-spring-inmodule</artifactId>
    <name>RESTEasy Main testsuite: Spring integration tests - In module</name>

    <properties>
        <module.spring.version>3.2.x</module.spring.version>
        <module.spring.slot>main
        </module.spring.slot><!-- beware jbossws spring integration preinstalled in default distribution expects main slot -->
        <module.spring.path>
            ${jboss.home}/modules/system/add-ons/spring/org/springframework/spring/${module.spring.slot}
        </module.spring.path>
    </properties>

    <profiles>
        <!--
        Name:  download
        Descr: Download WildFly
        -->
        <profile>
            <id>download</id>
            <activation>
                <property>
                    <name>!server.home</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.wildfly.plugins</groupId>
                        <artifactId>wildfly-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>server-provisioning</id>
                                <phase>generate-test-resources</phase>
                                <goals>
                                    <goal>provision</goal>
                                </goals>
                                <configuration>
                                    <layers>
                                        <layer>jaxrs</layer>
                                        <layer>resteasy-spring</layer>
                                        <layer>spring</layer>
                                    </layers>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <systemProperties>
                                <property>
                                    <name>java.util.logging.config.file</name>
                                    <value>src/test/resources/logging.properties</value>
                                </property>
                            </systemProperties>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <build>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>arquillian.xml</include>
                </includes>
            </testResource>
            <testResource>
                <directory>src/test/resources</directory>
                <excludes>
                    <exclude>arquillian.xml</exclude>
                </excludes>
            </testResource>
        </testResources>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-core</artifactId>
            <version>${version.resteasy.testsuite}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.resteasy</groupId>
            <artifactId>resteasy-core-spi</artifactId>
            <version>${version.resteasy.testsuite}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>
</project>
