<!--
/*******************************************************************************
* Copyright (c) 2010 Thales Corporate Services SAS                             *
* Author : Gregory Boissinot                                                   *
*                                                                              *
* Permission is hereby granted, free of charge, to any person obtaining a copy *
* of this software and associated documentation files (the "Software"), to deal*
* in the Software without restriction, including without limitation the rights *
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell    *
* copies of the Software, and to permit persons to whom the Software is        *
* furnished to do so, subject to the following conditions:                     *
*                                                                              *
* The above copyright notice and this permission notice shall be included in   *
* all copies or substantial portions of the Software.                          *
*                                                                              *
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR   *
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,     *
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE  *
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER       *
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,*
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN    *
* THE SOFTWARE.                                                                *
*******************************************************************************/
-->

<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>org.jvnet.hudson.dtkit</groupId>
        <artifactId>dtkit-default</artifactId>
        <version>0.4</version>
    </parent>

    <artifactId>dtkit-default-junit</artifactId>
    <version>0.5</version>
    <packaging>hudsonjar</packaging>
    <name>DTKIT Default JUNIT</name>

    <dependencies>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.google.code.guice</groupId>
            <artifactId>guice</artifactId>
            <version>2.0.1</version>
            <scope>test</scope>
        </dependency>

        <!-- Used for creating the user classes -->
        <dependency>
            <groupId>org.jvnet.hudson.dtkit</groupId>
            <artifactId>dtkit-metrics-api</artifactId>
        </dependency>

        <!-- Used for compiling the generated Hudson classes -->
        <dependency>
            <groupId>org.jvnet.hudson.dtkit</groupId>
            <artifactId>dtkit-metrics-hudson-api</artifactId>
        </dependency>

        <!-- Used for compiling the generated classes -->
        <dependency>
            <groupId>org.jvnet.hudson.main</groupId>
            <artifactId>hudson-core</artifactId>
            <version>${hudson.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- JUNIT MODEL -->
        <dependency>
            <groupId>org.jvnet.hudson.dtkit</groupId>
            <artifactId>dtkit-junit-model</artifactId>
        </dependency>

        <dependency>
            <groupId>xmlunit</groupId>
            <artifactId>xmlunit</artifactId>
            <version>1.3</version>
            <scope>test</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.jvnet.hudson.dtkit</groupId>
                <artifactId>dtkit-hudson-maven-plugin</artifactId>
                <version>${dtkit.plugins.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>generate-hudson</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>

                    <execution>
                        <id>package-hudson</id>
                        <phase>package</phase>
                        <goals>
                            <goal>packager</goal>
                        </goals>
                    </execution>
                </executions>

            </plugin>

            <!-- Execute but with no effect for the first compilation time -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.5</version>
                <configuration>
                    <sources>
                        <source>${project.build.directory}/generated-sources/groovy</source>
                    </sources>
                </configuration>

                <executions>
                    <execution>
                        <id>add-source</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>add-source</goal>
                        </goals>
                        <configuration>
                            <sources>
                                <source>${project.build.directory}/generated-sources/groovy</source>
                            </sources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/*Abstract*</exclude>
                    </excludes>
                </configuration>
            </plugin>

        </plugins>
    </build>
</project>
