<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd">
    <parent>
        <artifactId>izpack</artifactId>
        <groupId>org.codehaus.izpack</groupId>
        <version>5.2.6</version>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>izpack-test</artifactId>
    <name>IzPack test module</name>

    <dependencies>

        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-compiler</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-panel</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-installer</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-uninstaller</artifactId>
        </dependency>

        <!-- test -->
        <dependency>
            <groupId>org.picocontainer</groupId>
            <artifactId>picocontainer</artifactId>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-compiler</artifactId>
            <classifier>tests</classifier>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-test-common</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>${project.groupId}</groupId>
            <artifactId>izpack-test-listener</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.easytesting</groupId>
            <artifactId>fest-swing</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <!-- copies sources from izpack-dist to test-classes/samples/izpack -->
                        <!-- for IzpackGenerationTest, IzpackInstallationTest               -->
                        <id>Unpack izpack installer files</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeArtifactIds>izpack-dist</includeArtifactIds>
                            <includeClassifiers>sources</includeClassifiers>
                            <excludeTransitive>true</excludeTransitive>
                            <outputDirectory>${project.build.directory}/test-classes/samples/izpack</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>Copy test listeners to samples/event/lib</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <includeArtifactIds>izpack-test-listener</includeArtifactIds>
                            <outputDirectory>${project.build.directory}/test-classes/samples/event/lib</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>Copy test listeners to samples/packaging</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <stripVersion>true</stripVersion>
                            <includeArtifactIds>izpack-test-listener</includeArtifactIds>
                            <outputDirectory>${project.build.directory}/test-classes/samples/packaging</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
