<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ JBoss, Home of Professional Open Source.
  ~ Copyright 2014, Red Hat Middleware LLC, and individual contributors
  ~ as indicated by the @author tags. See the copyright.txt file in the
  ~ distribution for a full listing of individual contributors.
  ~
  ~ This is free software; you can redistribute it and/or modify it
  ~ under the terms of the GNU Lesser General Public License as
  ~ published by the Free Software Foundation; either version 2.1 of
  ~ the License, or (at your option) any later version.
  ~
  ~ This software is distributed in the hope that it will be useful,
  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
  ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  ~ Lesser General Public License for more details.
  ~
  ~ You should have received a copy of the GNU Lesser General Public
  ~ License along with this software; if not, write to the Free
  ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
  ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
  -->
<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/xsd/maven-4.0.0.xsd">
    <parent>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-parent</artifactId>
        <version>24</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <groupId>org.jboss.mod_cluster</groupId>
    <artifactId>mod_cluster-parent</artifactId>
    <version>1.4.0.Alpha1</version>
    <packaging>pom</packaging>

    <name>mod_cluster (parent)</name>
    <description>An httpd-based load balancer</description>
    <url>http://jboss.org/mod_cluster</url>

    <scm>
        <connection>scm:git:https://github.com/modcluster/mod_cluster.git</connection>
        <developerConnection>scm:git:https://github.com/modcluster/mod_cluster.git</developerConnection>
        <url>https://github.com/modcluster/mod_cluster</url>
        <tag>1.4.0.Alpha1</tag>
    </scm>

    <repositories>
        <!-- Getting started with JBoss Maven Repositories: https://community.jboss.org/wiki/MavenGettingStarted-Developers -->
        <repository>
            <id>jboss-public-repository-group</id>
            <name>JBoss Public Repository Group</name>
            <url>http://repository.jboss.org/nexus/content/groups/public/</url>
        </repository>
    </repositories>

    <properties>
        <!-- Override default 1.8 target/source in jboss-parent -->
        <maven.compiler.target>1.7</maven.compiler.target>
        <maven.compiler.source>1.7</maven.compiler.source>

        <!-- Dependency versions -->
        <version.jboss-logging>3.3.1.Final</version.jboss-logging>
        <version.jboss-logging-processor>2.0.2.Final</version.jboss-logging-processor>
        <version.tomcat7>7.0.79</version.tomcat7>
        <version.tomcat8>8.0.45</version.tomcat8>
        <version.tomcat85>8.5.20</version.tomcat85>
        <version.tomcat9>9.0.0.M26</version.tomcat9>
        <version.http-client>4.2.3</version.http-client>
        <version.jfreechart>1.0.13</version.jfreechart>
        <version.jcip-annotations>1.0</version.jcip-annotations>
        <version.junit>4.10</version.junit>
        <version.mockito>2.5.2</version.mockito>
        <version.javax.servlet-3.0>1.0.2.Final</version.javax.servlet-3.0>

        <!-- Plugin versions -->
        <version.checkstyle>6.19</version.checkstyle>
        <version.org.wildfly.checkstyle-config>1.0.6.Final</version.org.wildfly.checkstyle-config>
    </properties>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-container-spi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-core</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-container-tomcat</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-container-tomcat</artifactId>
                <type>test-jar</type>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-load-spi</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-demo</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-demo-client</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.mod_cluster</groupId>
                <artifactId>mod_cluster-demo-server</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.spec.javax.servlet</groupId>
                <artifactId>jboss-servlet-api_3.0_spec</artifactId>
                <version>${version.javax.servlet-3.0}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging</artifactId>
                <version>${version.jboss-logging}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.logging</groupId>
                <artifactId>jboss-logging-processor</artifactId>
                <version>${version.jboss-logging-processor}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-catalina</artifactId>
                <version>${version.tomcat7}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-coyote</artifactId>
                <version>${version.tomcat7}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tomcat</groupId>
                <artifactId>tomcat-util</artifactId>
                <version>${version.tomcat7}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${version.http-client}</version>
            </dependency>
            <dependency>
                <groupId>jfree</groupId>
                <artifactId>jfreechart</artifactId>
                <version>${version.jfreechart}</version>
            </dependency>
            <dependency>
                <groupId>net.jcip</groupId>
                <artifactId>jcip-annotations</artifactId>
                <version>${version.jcip-annotations}</version>
            </dependency>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${version.junit}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${version.mockito}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>${basedir}/src/main/resources</directory>
            </resource>
            <resource>
                <directory>${project.build.sourceDirectory}</directory>
                <excludes>
                    <exclude>**/*.java</exclude>
                </excludes>
                <filtering>true</filtering>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-release-plugin</artifactId>
                <configuration>
                    <autoVersionSubmodules>true</autoVersionSubmodules>
                    <tagNameFormat>@{project.version}</tagNameFormat>
                    <!-- After checking the created tag is correct, manually push the changes upstream with the release! -->
                    <pushChanges>false</pushChanges>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>1.3.1</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <configuration>
                        <linkXRef>false</linkXRef>
                        <configLocation>wildfly-checkstyle/checkstyle.xml</configLocation>
                        <consoleOutput>true</consoleOutput>
                        <failsOnError>true</failsOnError>
                        <includeTestSourceDirectory>true</includeTestSourceDirectory>
                        <excludes>**/*$logger.java,**/*$bundle.java</excludes>
                        <useFile />
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>${version.checkstyle}</version>
                            <exclusions>
                                <exclusion>
                                    <groupId>com.sun</groupId>
                                    <artifactId>tools</artifactId>
                                </exclusion>
                            </exclusions>
                        </dependency>
                        <dependency>
                            <groupId>org.wildfly.checkstyle</groupId>
                            <artifactId>wildfly-checkstyle-config</artifactId>
                            <version>${version.org.wildfly.checkstyle-config}</version>
                        </dependency>
                    </dependencies>
                    <executions>
                        <execution>
                            <id>check-style</id>
                            <phase>compile</phase>
                            <goals>
                                <goal>checkstyle</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>default</id>
            <activation>
                <activeByDefault>true</activeByDefault>
            </activation>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>demo</module>
                <module>dist</module>
            </modules>
        </profile>
        <profile>
            <id>jdk9</id>
            <activation>
                <jdk>9</jdk>
            </activation>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>demo</module>
                <module>dist</module>
            </modules>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <version>${version.compiler.plugin}</version>
                        <configuration>
                            <!-- Fork is needed so compiler args can be used -->
                            <fork>true</fork>
                            <compilerArgs>
                                <arg>-J--add-modules</arg>
                                <arg>-Jjava.xml.ws.annotation</arg>
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>TC7</id>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>dist</module>
            </modules>
        </profile>
        <profile>
            <id>TC8</id>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>dist</module>
            </modules>
        </profile>
        <profile>
            <id>TC85</id>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>dist</module>
            </modules>
        </profile>
        <profile>
            <id>TC9</id>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>dist</module>
            </modules>
        </profile>
        <profile>
            <id>dist</id>
            <modules>
                <module>core</module>
                <module>container</module>
                <module>load-spi</module>
                <module>demo</module>
                <module>dist</module>
                <module>docs</module>
            </modules>
        </profile>
    </profiles>
</project>
