<!--
  ~ JBoss, Home of Professional Open Source
  ~ Copyright 2011, Red Hat, Inc. and/or its affiliates, and individual contributors
  ~ by the @authors tag. See the copyright.txt in the distribution for a
  ~ full listing of individual contributors.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->
<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>
        <artifactId>hibernate-validator-parent</artifactId>
        <groupId>org.hibernate</groupId>
        <version>4.3.3.Final</version>
        <relativePath>../pom.xml</relativePath>
    </parent>

    <artifactId>hibernate-validator-distribution</artifactId>

    <name>Hibernate Validator Distribution</name>
    <description>Builds the distribution bundles</description>

    <properties>
        <!-- Skip artifact deployment -->
        <maven.deploy.skip>true</maven.deploy.skip>
    </properties>

    <dependencies>
        <!-- The modules to include in the distribution. Any non-optional dependencies will
                     automatically be included as well -->
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator-annotation-processor</artifactId>
        </dependency>

        <!-- Need to list out optional dependencies here again in order to include them via assembly dependency set -->
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate.javax.persistence</groupId>
            <artifactId>hibernate-jpa-2.0-api</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <configuration>
                    <sourcepath>
                        ${basedir}/../engine/src/main/java;
                        ${basedir}/../engine/target/generated-sources;
                        ${basedir}/../annotation-processor/src/main/java
                    </sourcepath>
                    <links>
                        <link>http://docs.oracle.com/javase/6/docs/api</link>
                        <link>http://docs.jboss.org/hibernate/stable/beanvalidation/api</link>
                    </links>
                    <packagesheader>Hibernate Validator Packages</packagesheader>
                    <doctitle>Hibernate Validator ${project.version}</doctitle>
                    <windowtitle>Hibernate Validator ${project.version}</windowtitle>
                    <groups>
                        <group>
                            <title>Validator Packages</title>
                            <packages>org.hibernate.validator*</packages>
                        </group>
                        <group>
                            <title>Annotation Processor Packages</title>
                            <packages>org.hibernate.validator.ap*</packages>
                        </group>
                    </groups>
                </configuration>
                <executions>
                    <execution>
                        <id>aggregate-javadoc</id>
                        <phase>install</phase>
                        <goals>
                            <goal>javadoc</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <configuration>
                    <descriptors>
                        <descriptor>${basedir}/src/main/assembly/dist.xml</descriptor>
                    </descriptors>
                    <finalName>hibernate-validator-${project.version}</finalName>
                    <tarLongFileMode>gnu</tarLongFileMode>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>install</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
</project>

