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

    <groupId>io.bootique.modules.parent</groupId>
    <artifactId>bootique-modules-parent</artifactId>
    <version>0.7</version>
    <packaging>pom</packaging>

    <name>bootique-modules-parent: A parent POM of Bootique standard modules.</name>
    <description>
        Stores common developmetns and deployment settings for Bootique standard modules.
    </description>

    <url>http://bootique.io</url>
    <organization>
        <name>ObjectStyle LLC</name>
    </organization>

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

        <!-- Common lib versions -->
        <junit.version>4.12</junit.version>
        <mockito.version>2.0.31-beta</mockito.version>
        <slf4j.version>1.7.22</slf4j.version>
    </properties>

    <developers>
        <developer>
            <id>andrus</id>
            <name>Andrus Adamchik</name>
            <email>andrus@objectstyle.com</email>
            <organization>ObjectStyle</organization>
            <timezone>America/New_York</timezone>
        </developer>
    </developers>

    <scm>
        <!-- TODO: Somehow dynamic scm.developerConnection value can't be properly inherited.
            maven-release-plugin would generate URLs like 'bootique/${project.artifactId}/${project.artifactId}'
            out of it (?!?).  Should probably replace ${project.artifactId} with a static value and ensure that 
            each subpom explicitly defines its Git location...
        -->
        <developerConnection>scm:git:ssh://git@github.com/bootique/${project.artifactId}</developerConnection>
        <url>https://github.com/bootique/${project.artifactId}</url>
        <tag>bootique-modules-parent-0.7</tag>
    </scm>

    <licenses>
        <license>
            <name>Apache 2.0 License</name>
            <url>https://github.com/bootique/bootique/blob/master/LICENSE</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <distributionManagement>
        <repository>
            <id>bintray-bootique-releases</id>
            <name>bintray-bootique-releases</name>
            <url>https://api.bintray.com/maven/bootique/releases/${project.artifactId}/;publish=1</url>
        </repository>
        <snapshotRepository>
            <id>bootique-snapshots</id>
            <url>http://maven.objectstyle.org/nexus/content/repositories/bootique-snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <repositories>
        <repository>
            <id>bootique-snapshots</id>
            <url>http://maven.objectstyle.org/nexus/content/repositories/bootique-snapshots</url>
            <releases>
                <enabled>false</enabled>
            </releases>
            <snapshots>
                <enabled>true</enabled>
            </snapshots>
        </repository>

        <!-- Main artifact repo -->
        <repository>
            <id>central</id>
            <url>https://repo1.maven.org/maven2</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
        <!-- Contains artifacts that may not yet be available in Central-->
        <repository>
            <id>bintray-bootique</id>
            <url>http://dl.bintray.com/bootique/releases</url>
            <releases>
                <enabled>true</enabled>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit.version}</version>
            </dependency>
            <dependency>
                <groupId>org.mockito</groupId>
                <artifactId>mockito-core</artifactId>
                <version>${mockito.version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>2.5.3</version>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.19</version>
                </plugin>
                <plugin>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                </plugin>
                <plugin>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>2.10.4</version>
                </plugin>
                <plugin>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>2.8.2</version>
                </plugin>
                <plugin>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>3.0.1</version>
                </plugin>
                <plugin>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>2.19</version>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>2.6</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <!-- Optional profile used to sign artifacts -->
    <profiles>
        <profile>
            <id>gpg</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
