<?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>

    <!--
        The link to the hibernate-validator parent POM only exists out of convenience since we are creating
        this archetype from an existing module of the Hibernate Validator code base.
        If you want to know more about this process check the maven-archetype-plugin documentation
        http://maven.apache.org/archetype/maven-archetype-plugin, epecially the goal create-from-project

        If you want to use this quick-start project as the base for your own application you should remove the
        <parent> entry. See also the other pointers in this pom.
    -->
    <parent>
        <artifactId>hibernate-validator-parent</artifactId>
        <groupId>org.hibernate</groupId>
        <version>4.2.1.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <groupId>com.example</groupId>
    <artifactId>hibernate-validator-quickstart</artifactId>
    <packaging>jar</packaging>
    <name>Hibernate Validator Quickstart</name>

    <!-- When removing the parent project configuration you have to explicitly set the dependencies version -->
    <dependencies>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
            <version>${project.parent.version}</version>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>
        <!--
        Provided dependencies.
        JAXB is needed when running on Java5. In this environment these dependencies have to be added
        On Java6 jaxb is part of the runtime environment
        -->
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.sun.xml.bind</groupId>
            <artifactId>jaxb-impl</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <build>
        <defaultGoal>test</defaultGoal>
        <plugins>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.5</source>
                    <target>1.5</target>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- When removing the parent project configuration this profile can be removed -->
        <profile>
            <id>archetype</id>
            <activation>
                <file>
                    <exists>archetype.properties</exists>
                </file>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-archetype-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <repositories>
        <repository>
            <id>jboss-public-repository</id>
            <url>https://repository.jboss.org/nexus/content/repositories/public</url>
        </repository>
    </repositories>
</project>
