<!--
  ~ Hibernate Validator, declare and validate application constraints
  ~
  ~ License: Apache License, Version 2.0
  ~ See the license.txt file in the root directory or <http://www.apache.org/licenses/LICENSE-2.0>.
  -->
<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>5.3.6.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>
        <maven.javadoc.skip>false</maven.javadoc.skip>
        <javadoc.additional.param></javadoc.additional.param>
    </properties>

    <dependencies>
        <!-- The modules to include in the distribution. Any non-optional/provided 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-cdi</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator-annotation-processor</artifactId>
        </dependency>

        <dependency>
            <groupId>javax.el</groupId>
            <artifactId>javax.el-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>javax.el</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.1-api</artifactId>
        </dependency>
        <dependency>
            <groupId>joda-time</groupId>
            <artifactId>joda-time</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jsoup</groupId>
            <artifactId>jsoup</artifactId>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.paranamer</groupId>
            <artifactId>paranamer</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.enterprise</groupId>
            <artifactId>cdi-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.spec.javax.interceptor</groupId>
            <artifactId>jboss-interceptors-api_1.2_spec</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.logging</groupId>
            <artifactId>jboss-logging-annotations</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}/../cdi/src/main/java;
                        ${basedir}/../annotation-processor/src/main/java
                    </sourcepath>
                    <links>
                        <link>http://docs.oracle.com/javase/6/docs/api</link>
                        <link>http://docs.oracle.com/javaee/7/api</link>
                        <link>http://docs.jboss.org/hibernate/stable/beanvalidation/api</link>
                        <link>http://docs.jboss.org/cdi/api/1.1-PFD</link>
                    </links>
                    <tags>
                        <tag>
                            <name>hv.experimental</name>
                            <placement>a</placement>
                            <head>Experimental</head>
                        </tag>
                    </tags>
                    <packagesheader>Hibernate Validator Packages</packagesheader>
                    <doctitle>Hibernate Validator ${project.version}</doctitle>
                    <windowtitle>Hibernate Validator ${project.version}</windowtitle>
                    <overview>${basedir}/../engine/src/main/java/org/hibernate/validator/overview.html</overview>
                    <groups>
                        <group>
                            <title>Validator Packages</title>
                            <packages>org.hibernate.validator*</packages>
                        </group>
                        <group>
                            <title>Validator Portable Extension Packages</title>
                            <packages>org.hibernate.validator.cdi:org.hibernate.validator.internal.cdi*</packages>
                        </group>
                        <group>
                            <title>Annotation Processor Packages</title>
                            <packages>org.hibernate.validator.ap*</packages>
                        </group>
                    </groups>
                    <additionalparam>${javadoc.additional.param}</additionalparam>
                </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>
    <profiles>
    <profile>
            <id>jdk9</id>
            <activation>
                <jdk>9</jdk>
            </activation>
            <properties>
                <javadoc.additional.param>--add-modules=${maven-javadoc-plugin.jigsaw.modules}</javadoc.additional.param>
            </properties>
        </profile>
    </profiles>
</project>
