<?xml version="1.0" encoding="UTF-8"?>
<!--
  ~ The MIT License (MIT)
  ~
  ~ Copyright (c) 2014-2016 Christian Schudt
  ~
  ~ Permission is hereby granted, free of charge, to any person obtaining a copy
  ~ of this software and associated documentation files (the "Software"), to deal
  ~ in the Software without restriction, including without limitation the rights
  ~ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  ~ copies of the Software, and to permit persons to whom the Software is
  ~ furnished to do so, subject to the following conditions:
  ~
  ~ The above copyright notice and this permission notice shall be included in
  ~ all copies or substantial portions of the Software.
  ~
  ~ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  ~ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  ~ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  ~ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  ~ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  ~ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  ~ THE SOFTWARE.
  -->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns="http://maven.apache.org/POM/4.0.0"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>rocks.xmpp</groupId>
    <artifactId>root</artifactId>
    <version>0.7.2</version>
    <packaging>pom</packaging>

    <name>XMPP.rocks - An XMPP Stack</name>
    <description>An XMPP Stack</description>

    <prerequisites>
        <maven>3.0.4</maven>
    </prerequisites>

    <!-- Project Site -->
    <url>http://xmpp.rocks</url>

    <!-- Licenses -->
    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license</url>
        </license>
    </licenses>

    <!-- Developers -->
    <developers>
        <developer>
            <name>Christian Schudt</name>
            <roles>
                <role>developer</role>
            </roles>
            <timezone>+01:00</timezone>
        </developer>
    </developers>

    <!-- Developers -->
    <organization>
        <name>XMPP.rocks</name>
        <url>http://xmpp.rocks</url>
    </organization>

    <!-- Issue Management -->
    <issueManagement>
        <system>Bitbucket</system>
        <url>https://bitbucket.org/sco0ter/babbler/issues</url>
    </issueManagement>

    <!-- Continuous Integration Management -->
    <ciManagement>
        <system>drone.io</system>
        <url>https://drone.io/bitbucket.org/sco0ter/babbler</url>
    </ciManagement>

    <!-- Mailing Lists -->
    <mailingLists>
    </mailingLists>

    <!-- Source Control Management -->
    <scm>
        <url>https://bitbucket.org/sco0ter/babbler/src</url>
        <connection>scm:git:git@bitbucket.org:sco0ter/babbler.git</connection>
        <developerConnection>scm:git:git@bitbucket.org:sco0ter/babbler.git</developerConnection>
    </scm>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

    <inceptionYear>2014</inceptionYear>

    <modules>
        <module>xmpp-addr</module>
        <module>xmpp-core</module>
        <module>xmpp-core-client</module>
        <module>xmpp-extensions</module>
        <module>xmpp-extensions-client</module>
        <module>xmpp-debug</module>
        <module>xmpp-sample</module>
        <module>xmpp-documentation</module>
        <module>xmpp-fx</module>
        <module>xmpp-websocket</module>
    </modules>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
        <repository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>

            <!-- Do not generate a site for the root project -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-site-plugin</artifactId>
                <inherited>false</inherited>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
                <version>2.1</version>
                <inherited>false</inherited>
                <configuration>
                    <newVersion>0.7.2</newVersion>
                    <generateBackupPoms>false</generateBackupPoms>
                </configuration>
                <executions>
                    <execution>
                        <id>display-plugin-updates</id>
                        <goals>
                            <goal>display-plugin-updates</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

            <!-- Do not deploy the root pom and also disable deployment via maven-deploy-plugin -->
            <!-- We are using nexus-staging-maven-plugin for deployment -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>true</skip>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
                <inherited>false</inherited>
            </plugin>

        </plugins>

        <pluginManagement>
            <plugins>
                <!-- Use doxia-module-markdown for mvn site -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.5</version>
                    <configuration>
                        <locales>en</locales>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>1.7</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-project-info-reports-plugin</artifactId>
                    <version>2.9</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>2.4</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.3</version>
                    <configuration>
                        <additionalparam>
                            -Xdoclint:none
                            -group "XMPP Address Format (RFC 7622)" rocks.xmpp.addr*
                            -group "XMPP Core (RFC 6120)" rocks.xmpp.core*
                            -group "XMPP Instant Messaging and Presence (RFC 6121)" rocks.xmpp.im*
                            -group "XMPP Extensions" rocks.xmpp.extensions*
                            -group "XMPP WebSocket Support (RFC 7395)" rocks.xmpp.websocket*
                            -group "JavaFX Controls Useful for XMPP Clients" rocks.xmpp.javafx*
                        </additionalparam>
                        <quiet>true</quiet>
                        <reportOutputDirectory>${project.build.directory}</reportOutputDirectory>
                        <includeDependencySources>true</includeDependencySources>
                        <includeTransitiveDependencySources>false</includeTransitiveDependencySources>
                        <nodeprecated>false</nodeprecated>
                        <nodeprecatedlist>false</nodeprecatedlist>
                        <author>false</author>
                        <notimestamp>true</notimestamp>
                        <doctitle>Babbler ${project.version}</doctitle>
                        <windowtitle>Babbler ${project.version}</windowtitle>
                        <docfilessubdirs>true</docfilessubdirs>
                        <show>public</show>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>2.4.3</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.6</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>ossrh</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>false</autoReleaseAfterClose>
                    </configuration>
                </plugin>

                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.19.1</version>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                            <configuration>
                                <!-- Skip tests by default -->
                                <!-- Run integration tests with: mvn failsafe:integration-test -->
                                <skipTests>true</skipTests>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

            </plugins>
        </pluginManagement>
    </build>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.testng</groupId>
                <artifactId>testng</artifactId>
                <version>6.9.9</version>
                <scope>test</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Generate sources jar -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar-no-fork</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Generate JavaDoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                                <configuration>
                                    <additionalparam>-Xdoclint:none</additionalparam>
                                    <quiet>true</quiet>
                                    <includeDependencySources>true</includeDependencySources>
                                    <includeTransitiveDependencySources>false</includeTransitiveDependencySources>
                                    <nodeprecated>false</nodeprecated>
                                    <nodeprecatedlist>false</nodeprecatedlist>
                                    <author>false</author>
                                    <notimestamp>true</notimestamp>
                                    <doctitle>Babbler ${project.version}</doctitle>
                                    <windowtitle>Babbler ${project.version}</windowtitle>
                                    <docfilessubdirs>true</docfilessubdirs>
                                    <show>public</show>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>

                    <!-- Sign the artifacts -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>