<?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/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <name>Spotify Apollo Parent</name>
    <url>https://github.com/spotify/apollo</url>

    <parent>
        <groupId>com.spotify</groupId>
        <artifactId>foss-root</artifactId>
        <version>3</version>
    </parent>

    <artifactId>apollo-parent</artifactId>
    <version>1.6.3</version>
    <packaging>pom</packaging>

    <description>Java libraries for writing composable microservices</description>

    <modules>
        <module>apollo-bom</module>
        <module>apollo-core</module>

        <module>apollo-api</module>
        <module>apollo-api-impl</module>
        <module>apollo-environment</module>
        <module>apollo-route</module>
        <module>apollo-test</module>
        <module>apollo-extra</module>
        <module>apollo-entity</module>
        <module>apollo-http-service</module>

        <module>modules/slack</module>
        <module>modules/jetty-http-server</module>
        <module>modules/okhttp-client</module>
        <module>modules/metrics</module>
    </modules>

    <scm>
        <url>https://github.com/spotify/apollo</url>
        <connection>scm:git:git@github.com:spotify/apollo.git</connection>
        <developerConnection>scm:git:git@github.com:spotify/apollo.git</developerConnection>
        <tag>v1.6.3</tag>
    </scm>

    <build>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>com.spotify</groupId>
                    <artifactId>missinglink-maven-plugin</artifactId>
                    <version>0.1.1</version>
                    <configuration>
                        <failOnConflicts>true</failOnConflicts>
                    </configuration>
                    <executions>
                        <execution>
                            <goals>
                                <goal>check</goal>
                            </goals>
                            <phase>process-classes</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <configuration>
                        <inceptionYear>2013</inceptionYear>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.siom79.japicmp</groupId>
                    <artifactId>japicmp-maven-plugin</artifactId>
                    <version>0.6.1</version>
                    <configuration>
                        <oldVersion>
                            <dependency>
                                <groupId>com.spotify</groupId>
                                <artifactId>${project.artifactId}</artifactId>
                                <version>1.0.0</version>
                            </dependency>
                        </oldVersion>
                        <newVersion>
                            <file>
                                <path>${project.build.directory}/${project.artifactId}-${project.version}.jar</path>
                            </file>
                        </newVersion>
                        <parameter>
                            <breakBuildOnBinaryIncompatibleModifications>true</breakBuildOnBinaryIncompatibleModifications>
                            <onlyBinaryIncompatible>true</onlyBinaryIncompatible>
                        </parameter>
                    </configuration>
                    <executions>
                        <execution>
                            <phase>verify</phase>
                            <goals>
                                <goal>cmp</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.7.5.201505241946</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>3.3</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <plugins>
            <plugin>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <plugins>
            <plugin>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>2.8.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-changelog-plugin</artifactId>
                <version>2.3</version>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.19</version>
            </plugin>
            <plugin>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.10.3</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <additionalparam>-Xdoclint:none</additionalparam>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <configuration>
                            <excludes>
                                <exclude>**/AutoValue_*</exclude>
                                <exclude>**/LoadedConfigBuilder*</exclude>
                                <exclude>**/MetaInfoBuilder*</exclude>
                                <exclude>**/QueryStringDecoder*</exclude>
                            </excludes>
                        </configuration>
                        <executions>
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>report</id>
                                <phase>prepare-package</phase>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                            <execution>
                                <id>check</id>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                                <configuration>
                                    <rules>
                                        <rule>
                                            <element>BUNDLE</element>
                                            <limits>
                                                <limit>
                                                    <counter>INSTRUCTION</counter>
                                                    <value>COVEREDRATIO</value>
                                                    <minimum>0.90</minimum>
                                                </limit>
                                            </limits>
                                        </rule>
                                    </rules>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>missinglink</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>com.spotify</groupId>
                        <artifactId>missinglink-maven-plugin</artifactId>
                        <version>0.1.1</version>
                        <configuration>
                            <failOnConflicts>true</failOnConflicts>
                            <ignoreDestinationPackages>
                                <!-- not always present for all modules, will be present in final artifact -->
                                <ignoreDestinationPackage>
                                    <package>org.slf4j.impl</package>
                                </ignoreDestinationPackage>
                                <!-- used by logback, optionally -->
                                <ignoreDestinationPackage>
                                    <package>org.codehaus.groovy</package>
                                </ignoreDestinationPackage>
                                <!-- used by logback, optionally -->
                                <ignoreDestinationPackage>
                                    <package>groovy</package>
                                </ignoreDestinationPackage>
                                <!-- may be used by logback, feature disabled if not present -->
                                <ignoreDestinationPackage>
                                    <package>org.codehaus.janino</package>
                                </ignoreDestinationPackage>
                                <!-- netty references this for < Java 7 JDKs -->
                                <ignoreDestinationPackage>
                                    <package>com.jcraft.jzlib</package>
                                </ignoreDestinationPackage>
                            </ignoreDestinationPackages>
                            <ignoreSourcePackages>
                                <ignoreSourcePackage>
                                    <package>io.netty.util.internal</package>
                                </ignoreSourcePackage>
                                <ignoreSourcePackage>
                                    <package>com.spotify.ffwd.http.okhttp3.internal.platform</package>
                                </ignoreSourcePackage>
                            </ignoreSourcePackages>
                        </configuration>
                        <executions>
                            <execution>
                                <id>check</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>check</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

    <developers>
        <developer>
            <id>pettermahlen</id>
            <email>petter@spotify.com</email>
            <name>Petter Måhlén</name>
        </developer>
        <developer>
            <id>rouzwawi</id>
            <email>rouz@spotify.com</email>
            <name>Rouzbeh Delavari</name>
        </developer>
        <developer>
            <id>zalenski</id>
            <email>zalenski@spotify.com</email>
            <name>Mattias de Zalenski</name>
        </developer>
    </developers>
    <licenses>
        <license>
            <name>The Apache Software License, Version 2.0</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
</project>
