<?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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>org.hibernate.beanvalidation.tck</groupId>
        <artifactId>beanvalidation-tck-parent</artifactId>
        <version>1.1.2.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>beanvalidation-tck-tests</artifactId>
    <packaging>jar</packaging>

    <name>JSR-349 TCK Test Suite</name>
    <description>JSR-349 TCK test suite</description>

    <dependencies>
        <dependency>
            <groupId>org.testng</groupId>
            <artifactId>testng</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.test-audit</groupId>
            <artifactId>jboss-test-audit-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.arquillian.testng</groupId>
            <artifactId>arquillian-testng-container</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap</groupId>
            <artifactId>shrinkwrap-impl-base</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.shrinkwrap.descriptors</groupId>
            <artifactId>shrinkwrap-descriptors-impl-javaee</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.interceptor</groupId>
            <artifactId>jboss-interceptors-api_1.2_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.ejb</groupId>
            <artifactId>jboss-ejb-api_3.1_spec</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
            <scope>provided</scope>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <executable>java</executable>
                    <arguments>
                        <argument>-classpath</argument>
                        <classpath />
                        <argument>org.hibernate.beanvalidation.tck.util.ArtifactDumper</argument>
                    </arguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <version>2.0.4</version>
                <configuration>
                    <defaultOutputDirectory>${basedir}/target/coverage-report</defaultOutputDirectory>
                    <processors>
                        <processor>org.jboss.test.audit.report.CoverageProcessor</processor>
                    </processors>
                    <compilerArguments>-AauditXml=${basedir}/src/main/resources/tck-audit.xml
                        -AoutputDir=${basedir}/target/coverage-report -source ${java.source.version}
                        -target ${java.target.version}
                    </compilerArguments>
                </configuration>
                <executions>
                    <execution>
                        <id>process</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>process</goal>
                        </goals>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>org.jboss.test-audit</groupId>
                        <artifactId>jboss-test-audit-impl</artifactId>
                        <version>${jboss.test.audit.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.2</version>
                <executions>
                    <execution>
                        <id>attach-artifacts</id>
                        <phase>package</phase>
                        <goals>
                            <goal>attach-artifact</goal>
                        </goals>
                        <configuration>
                            <artifacts>
                                <artifact>
                                    <file>${basedir}/src/main/resources/tck-tests.xml</file>
                                    <type>xml</type>
                                    <classifier>suite</classifier>
                                </artifact>
                                <artifact>
                                    <file>${basedir}/src/main/resources/tck-audit.xml</file>
                                    <type>xml</type>
                                    <classifier>audit</classifier>
                                </artifact>
                                <artifact>
                                    <file>${basedir}/target/coverage-report/coverage-beanvalidation.html</file>
                                    <type>html</type>
                                    <classifier>coverage</classifier>
                                </artifact>
                            </artifacts>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <compilerArgument>-proc:none</compilerArgument>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <properties>
                <createChecksum>true</createChecksum>
            </properties>
        </profile>
    </profiles>
</project>
