<?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>org.touchbit.shields4j</groupId>
    <artifactId>shields4j-parent</artifactId>
    <name>Shields4J</name>
    <version>1.0.0</version>
    <description>Libraries for generation badges using the service shields.io</description>
    <packaging>pom</packaging>

    <modules>
        <module>client</module>
        <module>testng</module>
        <module>test-core</module>
    </modules>

    <url>https://gitlab.com/TouchBIT/shields4j</url>

    <organization>
        <name>TouchBIT</name>
        <url>https://touchbit.org/</url>
    </organization>

    <issueManagement>
        <url>https://gitlab.com/TouchBIT/shields4j/issues</url>
        <system>GitLab</system>
    </issueManagement>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>https://choosealicense.com/licenses/mit/</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>

    <scm>
        <connection>scm:git:git@gitlab.com:TouchBIT/shields4j.git</connection>
        <developerConnection>scm:git:git@gitlab.com:TouchBIT/shields4j.git</developerConnection>
        <url>https://gitlab.com/TouchBIT/shields4j</url>
    </scm>

    <developers>
        <developer>
            <id>oleg.shaburov</id>
            <name>Oleg Shaburov</name>
            <email>oleg.shaburov@touchbit.org</email>
            <roles>
                <role>Owner</role>
            </roles>
            <timezone>+3</timezone>
            <organization>TouchBIT</organization>
        </developer>
    </developers>

    <properties>
        <jdk.version>1.8</jdk.version>
        <encoding>UTF-8</encoding>
        <maven.compiler.source>${jdk.version}</maven.compiler.source>
        <maven.compiler.target>${jdk.version}</maven.compiler.target>
        <file.encoding>${encoding}</file.encoding>
        <source.encoding>${encoding}</source.encoding>
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>

        <junit.report>${project.build.directory}/report/junit-report</junit.report>
        <jacoco.report>${project.build.directory}/report/jacoco.exec</jacoco.report>

        <sonar.gitlab.project_id>11857541</sonar.gitlab.project_id>
        <sonar.sources>src/main</sonar.sources>
        <sonar.host.url>https://touchbit.org/sonar/</sonar.host.url>
        <sonar.projectKey>${project.groupId}:${project.artifactId}</sonar.projectKey>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>
        <reports.path>${project.build.directory}/reports</reports.path>
        <sonar.junit.reportPaths>${reports.path}</sonar.junit.reportPaths>
        <sonar.jacoco.reportPaths>${reports.path}/jacoco.exec</sonar.jacoco.reportPaths>
        <sonar.skippedModules>test-core</sonar.skippedModules>
        <sonar.exclusions>src/main/java/org/touchbit/shields4j/jupiter/**</sonar.exclusions>
        <sonar.coverage.exclusions>src/main/java/org/touchbit/shields4j/jupiter/**</sonar.coverage.exclusions>
        <sonar.cpd.exclusions/>

        <junit.jupiter.version>5.3.1</junit.jupiter.version>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.7.25</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>versions-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-gpg-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.sonatype.plugins</groupId>
                <artifactId>nexus-staging-maven-plugin</artifactId>
            </plugin>
        </plugins>

        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>2.5</version>
                    <configuration>
                        <generateBackupPoms>false</generateBackupPoms>
                        <allowIncrementalUpdates>true</allowIncrementalUpdates>
                        <processAllModules>true</processAllModules>
                        <updateMatchingVersions>true</updateMatchingVersions>
                    </configuration>
                </plugin>
                <plugin>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.22.0</version>
                    <dependencies>
                        <dependency>
                            <groupId>org.junit.platform</groupId>
                            <artifactId>junit-platform-surefire-provider</artifactId>
                            <version>1.3.1</version>
                        </dependency>
                        <dependency>
                            <groupId>org.junit.jupiter</groupId>
                            <artifactId>junit-jupiter-engine</artifactId>
                            <version>${junit.jupiter.version}</version>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <useSystemClassLoader>true</useSystemClassLoader>
                        <reportsDirectory>${sonar.junit.reportPaths}</reportsDirectory>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>0.8.1</version>
                    <executions>
                        <execution>
                            <id>pre-unit-test</id>
                            <goals>
                                <goal>prepare-agent</goal>
                            </goals>
                            <configuration>
                                <destFile>${sonar.jacoco.reportPaths}</destFile>
                            </configuration>
                        </execution>
                        <execution>
                            <id>report</id>
                            <phase>prepare-package</phase>
                            <goals>
                                <goal>report</goal>
                            </goals>
                            <configuration>
                                <dataFile>${sonar.jacoco.reportPaths}</dataFile>
                                <outputDirectory>${reports.path}/jacoco</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>3.8.0</version>
                    <executions>
                        <execution>
                            <phase>compile</phase>
                        </execution>
                    </executions>
                    <configuration>
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <encoding>${source.encoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>3.0.1</version>
                    <executions>
                        <execution>
                            <phase>install</phase>
                        </execution>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>2.5.2</version>
                    <executions>
                        <execution>
                            <phase>install</phase>
                            <id>install-jar</id>
                            <configuration>
                                <file>target/${project.artifactId}-${project.version}.jar</file>
                                <sources>target/${project.artifactId}-${project.version}-sources.jar</sources>
                                <pomFile>dependency-reduced-pom.xml</pomFile>
                                <updateReleaseInfo>true</updateReleaseInfo>
                                <createChecksum>true</createChecksum>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>3.1.0</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <phase>generate-resources</phase>
                            <configuration>
                                <failOnError>true</failOnError>
                                <failOnWarnings>true</failOnWarnings>
                                <detectOfflineLinks>false</detectOfflineLinks>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>1.6</version>
                    <configuration>
                        <passphrase/>
                    </configuration>
                    <executions>
                        <execution>
                            <id>sign-artifacts</id>
                            <phase>deploy</phase>
                            <goals>
                                <goal>sign</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>1.6.7</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>sonatype</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <updateReleaseInfo>true</updateReleaseInfo>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <configuration>
                        <skip>true</skip>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <distributionManagement>
        <snapshotRepository>
            <id>sonatype</id>
            <name>Nexus Snapshot Repository</name>
            <url>https://oss.sonatype.org/content/repositories/snapshots/</url>
        </snapshotRepository>
        <repository>
            <id>sonatype</id>
            <name>Nexus Release Repository</name>
            <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
        </repository>
    </distributionManagement>
</project>