<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.atlassian.confluence.test</groupId>
        <artifactId>confluence-test-runner</artifactId>
        <version>4.0-m5</version>
    </parent>

    <artifactId>confluence-roundtrip-test</artifactId>

    <name>Confluence Round Trip Test Runner</name>
    <description>This module runs the XHTML roundtrip tests against Confluence.</description>

    <profiles>
        <profile>
            <id>roundtrip</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.cargo</groupId>
                        <artifactId>cargo-maven2-plugin</artifactId>
                        <configuration>
                            <wait>${cargo.wait}</wait>
                            <container>
                                <containerId>tomcat5x</containerId>
                                <zipUrlInstaller>
                                    <url>${tomcat5.url}</url>
                                    <installDir>${cargo.container.zipurlinstaller.installdir}</installDir>
                                </zipUrlInstaller>
                                <output>${project.build.directory}/output.log</output>
                                <log>${project.build.directory}/cargo-log.log</log>
                                <systemProperties>
                                    <confluence.home>${project.build.directory}/confluence-home</confluence.home>
                                </systemProperties>
                            </container>
                            <configuration>
                                <home>${project.build.directory}/tomcat5x/container</home>
                                <properties>
                                    <cargo.servlet.port>${http.port}</cargo.servlet.port>
                                    <cargo.rmi.port>${controller.port}</cargo.rmi.port>
                                    <cargo.jvmargs>${jvm.args}</cargo.jvmargs>
                                </properties>
                                <deployables>
                                    <deployable>
                                        <groupId>com.atlassian.confluence</groupId>
                                        <artifactId>confluence-webapp</artifactId>
                                        <type>war</type>
                                        <properties>
                                            <context>${webappContext}</context>
                                        </properties>
                                        <pingURL>http://localhost:${http.port}/${webappContext}</pingURL>
                                        <pingTimeout>60000</pingTimeout>
                                    </deployable>
                                </deployables>
                            </configuration>
                        </configuration>
                        <executions>
                            <execution>
                                <id>start-container</id>
                                <phase>pre-integration-test</phase>
                                <goals><goal>start</goal></goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>00_setup</id>
                                <goals><goal>test</goal></goals>
                                <configuration>
                                    <skip>false</skip>
                                </configuration>
                            </execution>
                            <execution>
                                <id>run-roundtrip_tests</id>
                                <phase>integration-test</phase>
                                <goals>
                                    <goal>test</goal>
                                </goals>
                                <configuration>
                                    <skip>false</skip>
                                    <includes>
                                        <include>
                                            com/atlassian/confluence/acceptancetest/roundtrip/*AcceptanceTest.java
                                        </include>
                                    </includes>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
