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

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>1.5.19.RELEASE</version>
        <relativePath /> <!-- lookup parent from repository -->
    </parent>

    <groupId>rocks.coffeenet</groupId>
    <artifactId>coffeenet-starter-parent</artifactId>
    <version>0.38.2</version>

    <packaging>pom</packaging>

    <name>CoffeeNet Boot Starter Parent</name>
    <url>https://github.com/coffeenet/coffeenet-starter</url>
    <description>
        Opinionated starters which can be used
        to integrate an application into the CoffeeNet.
    </description>

    <licenses>
        <license>
            <name>Apache License</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Tobias Schneider</name>
            <email>Tobias.Schneider@Tobsch.org</email>
        </developer>
    </developers>

    <scm>
        <url>https://github.com/coffeenet/coffeenet-starter</url>
        <connection>scm:git:git://github.com/coffeenet/coffeenet-starter.git</connection>
        <developerConnection>scm:git:git@github.com:coffeenet/coffeenet-starter.git</developerConnection>
        <tag>HEAD</tag>
    </scm>

    <issueManagement>
        <url>https://github.com/coffeenet/coffeenet-starter/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <distributionManagement>
        <snapshotRepository>
            <id>ossrh</id>
            <url>https://oss.sonatype.org/content/repositories/snapshots</url>
        </snapshotRepository>
    </distributionManagement>

    <properties>
        <java.version>1.8</java.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <!-- Spring Cloud Dependency -->
        <spring-cloud-dependencies.version>Dalston.SR5</spring-cloud-dependencies.version>

        <!-- CoffeeNet Dependencies -->
        <navigation-bar.version>0.16.0</navigation-bar.version>

        <!-- Third-Party Dependencies -->
        <logback-gelf-appender.version>1.5</logback-gelf-appender.version>

        <!-- OWASP Configuration -->
        <dependency.check.report.dir>${project.build.directory}/dependency-check</dependency.check.report.dir>
        <sonar.dependencyCheck.reportPath>${dependency.check.report.dir}/dependency-check-report.xml
        </sonar.dependencyCheck.reportPath>
    </properties>

    <dependencyManagement>
        <dependencies>

            <!-- CoffeeNet Dependencies -->
            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>autoconfigure</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>coffeenet-actuator</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-security</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-discovery</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-logging</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-monitoring</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-navigation</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-navigation-thymeleaf</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>starter-navigation-javascript</artifactId>
                <version>0.38.2</version>
            </dependency>

            <dependency>
                <groupId>rocks.coffeenet</groupId>
                <artifactId>navigation-bar</artifactId>
                <version>${navigation-bar.version}</version>
            </dependency>

            <!-- Third-Party Dependencies -->
            <dependency>
                <groupId>de.appelgriepsch.logback</groupId>
                <artifactId>logback-gelf-appender</artifactId>
                <version>${logback-gelf-appender.version}</version>
            </dependency>

            <!-- Spring Cloud -->
            <dependency>
                <groupId>org.springframework.cloud</groupId>
                <artifactId>spring-cloud-dependencies</artifactId>
                <version>${spring-cloud-dependencies.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <pluginManagement>
            <plugins>
                <!-- Spring Boot -->
                <plugin> <!-- Override some plugin versions from Spring Boot Starter -->
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <executions>
                        <execution>
                            <goals>
                                <goal>build-info</goal>
                            </goals>
                            <configuration>
                                <additionalProperties>
                                    <parent.group>${project.parent.groupId}</parent.group>
                                    <parent.artifact>${project.parent.artifactId}</parent.artifact>
                                    <parent.version>${project.parent.version}</parent.version>
                                </additionalProperties>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>

                <!-- compiler -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.6.1</version>
                    <configuration>
                        <source>${java.version}</source>
                        <target>${java.version}</target>
                    </configuration>
                </plugin>

                <!-- Sources and javadoc -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>

                <!-- Security -->
                <plugin>
                    <groupId>org.owasp</groupId>
                    <artifactId>dependency-check-maven</artifactId>
                    <version>1.4.5</version>
                    <configuration>
                        <failOnError>false</failOnError>
                        <format>XML</format>
                        <outputDirectory>${dependency.check.report.dir}</outputDirectory>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>

    <profiles>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <!-- Sonatype -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>1.6.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>

                    <!-- GPG sign -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.6</version>
                        <configuration>
                            <skip>${gpg.skip}</skip>
                            <passphrase>${env.GPG_PASSPHRASE}</passphrase>
                        </configuration>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
