<?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>
    <groupId>de.codecentric</groupId>
    <artifactId>cxf-spring-boot-starter-reactor</artifactId>
    <name>cxf-spring-boot-starter-reactor</name>
    <version>2.7.0</version>

    <description>Reactor Maven project for the cxf-spring-boot-starter</description>
    <packaging>pom</packaging>
    <url>https://github.com/codecentric/cxf-spring-boot-starter</url>
    <licenses>
        <license>
            <name>Apache License, Version 2.0</name>
            <url>http://opensource.org/licenses/Apache-2.0</url>
            <distribution>repo</distribution>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Jonas Hecht</name>
            <email>jonas.hecht@codecentric.de</email>
            <organization>codecentric AG</organization>
            <organizationUrl>http://www.codecentric.de</organizationUrl>
        </developer>
    </developers>
    <scm>
        <connection>scm:git:git://github.com/codecentric/cxf-spring-boot-starter.git</connection>
        <developerConnection>scm:git:ssh://git@github.com/codecentric/cxf-spring-boot-starter.git</developerConnection>
        <url>git@github.com:/codecentric/cxf-spring-boot-starter.git</url>
    </scm>
    <distributionManagement>
        <repository>
            <id>oss.sonatype.org</id>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
        <snapshotRepository>
            <id>github</id>
            <name>GitHub Packages</name>
            <url>https://maven.pkg.github.com/codecentric/cxf-spring-boot-starter</url>
        </snapshotRepository>
    </distributionManagement>

    <modules>
        <module>cxf-spring-boot-starter</module>
        <module>cxf-spring-boot-starter-samples</module>
    </modules>

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

        <!-- Maven Central Release tools -->
        <versions-maven-plugin.version>2.13.0</versions-maven-plugin.version>
        <maven-gpg-plugin.version>3.0.1</maven-gpg-plugin.version>
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>
        <maven-javadoc-plugin.version>3.4.1</maven-javadoc-plugin.version>
        <nexus-staging-maven-plugin.version>1.6.13</nexus-staging-maven-plugin.version>

        <!-- Testcoverage analysis -->
        <build-plugin.jacoco.version>0.8.8</build-plugin.jacoco.version>
    </properties>

    <profiles>
        <!-- plugins needed to deploy to Maven Central -->
        <profile>
            <id>central-deploy</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>${maven-gpg-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                                <configuration>
                                    <!-- This is necessary for gpg to not try to use the pinentry programs -->
                                    <gpgArguments>
                                        <arg>--pinentry-mode</arg>
                                        <arg>loopback</arg>
                                    </gpgArguments>
                                </configuration>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <version>${versions-maven-plugin.version}</version>
                        <configuration>
                            <generateBackupPoms>false</generateBackupPoms>
                        </configuration>
                    </plugin>
                    <plugin>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <configuration>
                            <skip>true</skip>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                        <version>${maven-source-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-sources</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <version>${maven-javadoc-plugin.version}</version>
                        <executions>
                            <execution>
                                <id>attach-javadocs</id>
                                <goals>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <version>${nexus-staging-maven-plugin.version}</version>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>oss.sonatype.org</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <description>${project.version}</description>
                        </configuration>
                        <executions>
                            <execution>
                                <id>deploy-to-sonatype</id>
                                <phase>deploy</phase>
                                <goals>
                                    <goal>deploy</goal>
                                    <goal>release</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>coverage</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.jacoco</groupId>
                        <artifactId>jacoco-maven-plugin</artifactId>
                        <version>${build-plugin.jacoco.version}</version>
                        <executions>
                            <!-- Prepares the property pointing to the JaCoCo runtime agent
                            which is passed as VM argument when Maven the Surefire plugin is executed. -->
                            <execution>
                                <goals>
                                    <goal>prepare-agent</goal>
                                </goals>
                            </execution>
                            <!-- Ensures that the code coverage report is created after
                            all tests have been run. -->
                            <execution>
                                <id>generate-report</id>
                                <goals>
                                    <goal>report</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>