<?xml version="1.0" encoding="UTF-8"?>
<!--

       Copyright 2015-2021 hexosse <hexosse@gmail.com>


       Licensed under the Apache License, Version 2.0 (the "License");
       you may not use this file except in compliance with the License.
       You may obtain a copy of the License at

           http://www.apache.org/licenses/LICENSE-2.0

       Unless required by applicable law or agreed to in writing, software
       distributed under the License is distributed on an "AS IS" BASIS,
       WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
       See the License for the specific language governing permissions and
       limitations under the License.

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

    <!-- Artifact properties -->
    <groupId>com.github.hexocraft</groupId>
    <artifactId>hexocraft-parent</artifactId>
    <version>11</version>
    <packaging>pom</packaging>

    <!-- Description -->
    <name>Hexocraft Parent POM</name>
    <description>Hexocraft Parent POM provides common settings for all Hexocraft components.</description>
    <url>https://github.com/hexocraft/hexocraft-parent</url>

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

    <!-- Want to contribute? Anybody is welcome -->
    <developers>
        <developer>
            <name>hexosse</name>
            <email>hexosse@gmail.com</email>
            <organization>HexoCraft</organization>
            <organizationUrl>https://github.com/HexoCraft</organizationUrl>
        </developer>
    </developers>

    <!-- Organization -->
    <organization>
        <name>Hexocraft</name>
        <url>https://github.com/hexocraft</url>
    </organization>

    <!-- Source control manager -->
    <scm>
        <connection>scm:git:git://github.com/hexocraft/hexocraft-parent.git</connection>
        <developerConnection>scm:git:ssh://github.com:hexocraft/hexocraft-parent.git</developerConnection>
        <url>http://github.com/hexocraft/hexocraft-parent</url>
    </scm>

    <!-- Issue management -->
    <issueManagement>
        <system>GitHub</system>
        <url>https://github.com/hexocraft/hexocraft-parent/issues</url>
    </issueManagement>

    <!-- Repositories -->
    <repositories>
        <repository>
            <id>maven-central</id>
            <url>https://repo1.maven.org/maven2/</url>
            <layout>default</layout>
            <releases><enabled>true</enabled></releases>
            <snapshots><enabled>false</enabled></snapshots>
        </repository>
        <repository>
            <id>maven-snapshots</id>
            <url>http://oss.sonatype.org/content/repositories/snapshots/</url>
            <layout>default</layout>
            <releases><enabled>false</enabled></releases>
            <snapshots><enabled>true</enabled></snapshots>
        </repository>
    </repositories>

    <!-- Project properties -->
    <properties>

        <!-- Owner data -->
        <owner.name>hexosse</owner.name>
        <owner.email>hexosse@gmail.com</owner.email>

        <!-- Use java 1.8 everywhere -->
        <jdk.version>1.8</jdk.version>
        <jdk.version.number>8</jdk.version.number>
        <maven.compiler.source>${jdk.version}</maven.compiler.source>
        <maven.compiler.target>${jdk.version}</maven.compiler.target>

        <!-- Use recent version of maven -->
        <maven.version>3.6.1</maven.version>

        <!-- licence -->
        <inception.year>2015-2021</inception.year>

        <!-- Source code and resources must be encoded in UTF-8 -->
        <project.encoding>UTF-8</project.encoding>
        <project.build.sourceEncoding>${project.encoding}</project.build.sourceEncoding>
        <project.build.resourceEncoding>${project.encoding}</project.build.resourceEncoding>
        <project.reporting.outputEncoding>${project.encoding}</project.reporting.outputEncoding>

        <!-- Commonly used external libraries -->
        <configurate.version>4.0.0</configurate.version>                                <!-- https://mvnrepository.com/artifact/org.spongepowered/configurate-core -->
        <gson.version>2.8.6</gson.version>                                              <!-- https://mvnrepository.com/artifact/com.google.code.gson/gson -->
        <guava.version>30.1-jre</guava.version>                                         <!-- https://mvnrepository.com/artifact/com.google.guava/guava -->
        <snakeyaml.version>1.27</snakeyaml.version>                                     <!-- https://bitbucket.org/asomov/snakeyaml/src/master/ -->

        <!-- Maven Plugins -->
        <build-helper-maven-plugin.version>3.2.0</build-helper-maven-plugin.version>    <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/build-helper-maven-plugin -->
        <buildnumber-maven-plugin.version>1.4</buildnumber-maven-plugin.version>        <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/buildnumber-maven-plugin -->
        <echo-maven-plugin.version>0.4.0</echo-maven-plugin.version>                    <!-- https://mvnrepository.com/artifact/com.soebes.maven.plugins/echo-maven-plugin -->
        <git-commit-id-plugin.version>4.0.3</git-commit-id-plugin.version>              <!-- https://github.com/ktoso/maven-git-commit-id-plugin/blob/master/README.md -->
        <jacoco-maven-plugin.version>0.8.6</jacoco-maven-plugin.version>                <!-- https://mvnrepository.com/artifact/org.jacoco/jacoco-maven-plugin -->
        <license-maven-plugin.version>3.0</license-maven-plugin.version>                <!-- https://mvnrepository.com/artifact/com.mycila/license-maven-plugin -->
        <maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>                  <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-clean-plugin -->
        <maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>            <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-compiler-plugin -->
        <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>        <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-dependency-plugin -->
        <maven-deploy-plugin.version>3.0.0-M1</maven-deploy-plugin.version>             <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-deploy-plugin -->
        <maven-enforcer-plugin.version>3.0.0-M3</maven-enforcer-plugin.version>         <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-enforcer-plugin -->
        <maven-failsafe-plugin.version>3.0.0-M5</maven-failsafe-plugin.version>         <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-failsafe-plugin -->
        <maven-gpg-plugin.version>1.6</maven-gpg-plugin.version>                        <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-gpg-plugin -->
        <maven-install-plugin.version>3.0.0-M1</maven-install-plugin.version>           <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-install-plugin -->
        <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>                      <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-jar-plugin -->
        <maven-javadoc-plugin.version>3.2.0</maven-javadoc-plugin.version>              <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-javadoc-plugin -->
        <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>          <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-resources-plugin -->
        <maven-shade-plugin.version>3.2.4</maven-shade-plugin.version>                  <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-shade-plugin -->
        <maven-source-plugin.version>3.2.1</maven-source-plugin.version>                <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-source-plugin -->
        <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>         <!-- https://mvnrepository.com/artifact/org.apache.maven.plugins/maven-surefire-plugin -->
        <nexus-staging-plugin.version>1.6.8</nexus-staging-plugin.version>              <!-- https://mvnrepository.com/artifact/org.sonatype.plugins/nexus-staging-maven-plugin -->
        <proguard-maven-plugin.version>2.3.1</proguard-maven-plugin.version>            <!-- https://wvengen.github.io/proguard-maven-plugin -->
        <proguard-base.version>6.2.2</proguard-base.version>                            <!-- https://mvnrepository.com/artifact/net.sf.proguard/proguard-base -->
        <sonar-maven-plugin.version>3.7.0.1746</sonar-maven-plugin.version>             <!-- https://mvnrepository.com/artifact/org.sonarsource.scanner.maven/sonar-maven-plugin -->
        <versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>            <!-- https://mvnrepository.com/artifact/org.codehaus.mojo/versions-maven-plugin -->

        <!-- Checkerframework: Global settings -->
        <!-- https://checkerframework.org/manual/#maven -->
        <checker.framework.version>3.9.0</checker.framework.version>                     <!-- https://mvnrepository.com/artifact/org.checkerframework/checker  https://mvnrepository.com/artifact/org.checkerframework/checker-qual -->
        <checker.annotatedJdk.version>3.3.0</checker.annotatedJdk.version>               <!-- https://mvnrepository.com/artifact/org.checkerframework/jdk8 -->
        <javac.version>9+181-r4173-1</javac.version>
        <!-- These properties will be set by the Maven Dependency plugin -->
        <annotatedJdk>@{org.checkerframework:jdk8:jar}</annotatedJdk>
        <errorProneJavac>@{com.google.errorprone:javac:jar}</errorProneJavac>

        <!-- JUnit -->
        <junit.jupiter.version>5.7.0</junit.jupiter.version>                            <!-- https://mvnrepository.com/artifact/org.junit.jupiter/junit-jupiter-engine -->
        <junit.platform.version>1.7.0</junit.platform.version>                          <!-- https://mvnrepository.com/artifact/org.junit.platform/junit-platform-launcher -->
        <mockito-junit-jupiter.version>3.6.28</mockito-junit-jupiter.version>           <!-- https://mvnrepository.com/artifact/org.mockito/mockito-junit-jupiter -->

        <!-- Surefire configuration -->
        <skip.unit.tests>false</skip.unit.tests>
        <fail.if.no.unit.tests>false</fail.if.no.unit.tests>

        <!-- Failesafe configuration -->
        <skip.integration.tests>false</skip.integration.tests>
        <fail.if.no.integration.tests>false</fail.if.no.integration.tests>

        <!-- SonarQube configuration -->
        <sonar.host.url>http://sonarqube.hexocube.fr/</sonar.host.url>
        <sonar.projectKey>${project.artifactId}</sonar.projectKey>
        <sonar.language>java</sonar.language>
        <sonar.java.source>${jdk.version}</sonar.java.source>
        <sonar.java.coveragePlugin>jacoco</sonar.java.coveragePlugin>

    </properties>

    <!-- Project and sub-project dependencies -->
    <dependencyManagement>
        <dependencies>
            <!-- Configurate : https://github.com/SpongePowered/Configurate -->
            <dependency>
                <groupId>org.spongepowered</groupId>
                <artifactId>configurate-core</artifactId>
                <version>${configurate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.spongepowered</groupId>
                <artifactId>configurate-gson</artifactId>
                <version>${configurate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.spongepowered</groupId>
                <artifactId>configurate-hocon</artifactId>
                <version>${configurate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.spongepowered</groupId>
                <artifactId>configurate-jackson</artifactId>
                <version>${configurate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.spongepowered</groupId>
                <artifactId>configurate-xml</artifactId>
                <version>${configurate.version}</version>
            </dependency>
            <dependency>
                <groupId>org.spongepowered</groupId>
                <artifactId>configurate-yaml</artifactId>
                <version>${configurate.version}</version>
                <exclusions>
                    <exclusion>
                        <groupId>org.yaml</groupId>
                        <artifactId>snakeyaml</artifactId>
                    </exclusion>
                </exclusions>
            </dependency>
            <!-- Gson : https://mvnrepository.com/artifact/com.google.code.gson/gson-->
            <dependency>
                <groupId>com.google.code.gson</groupId>
                <artifactId>gson</artifactId>
                <version>${gson.version}</version>
            </dependency>
            <!-- Guava : https://mvnrepository.com/artifact/com.google.guava/guava-->
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
            <!-- SnakeYAML : https://bitbucket.org/asomov/snakeyaml/src/master/ -->
            <dependency>
                <groupId>org.yaml</groupId>
                <artifactId>snakeyaml</artifactId>
                <version>${snakeyaml.version}</version>
            </dependency>

            <!-- ********** Obfuscator ********** -->
            <!-- Proguard -->
            <dependency>
                <groupId>net.sf.proguard</groupId>
                <artifactId>proguard-base</artifactId>
                <version>${proguard-base.version}</version>
                <scope>runtime</scope>
            </dependency>

            <!-- ********** Checker Framework ********** -->
            <!-- https://checkerframework.org/manual/#maven -->
            <dependency>
                <groupId>org.checkerframework</groupId>
                <artifactId>checker</artifactId>
                <version>${checker.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.checkerframework</groupId>
                <artifactId>checker-qual</artifactId>
                <version>${checker.framework.version}</version>
            </dependency>
            <dependency>
                <groupId>org.checkerframework</groupId>
                <artifactId>jdk8</artifactId>
                <version>${checker.annotatedJdk.version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.errorprone</groupId>
                <artifactId>javac</artifactId>
                <version>${javac.version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <!-- Project dependencies -->
    <dependencies>
        <!-- ********** Testing framework ********** -->
        <!-- JUnit 5 -->
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <version>${junit.jupiter.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <version>${junit.platform.version}</version>
            <scope>test</scope>
        </dependency>
        <!-- Mockito -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${mockito-junit-jupiter.version}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <!-- Build options -->
    <build>
        <!-- Basics -->
        <defaultGoal>clean verify package install</defaultGoal>

        <!-- Resources -->
        <resources>
            <!-- default resources folder -->
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
            <!-- add license file to in jars -->
            <resource>
                <directory>${maven.multiModuleProjectDirectory}</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>LICENSE</include>
                </includes>
            </resource>
        </resources>
        <testResources>
            <!-- default test resources folder -->
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <!-- add license file to in jars -->
            <testResource>
                <directory>${maven.multiModuleProjectDirectory}</directory>
                <targetPath>META-INF</targetPath>
                <includes>
                    <include>LICENSE</include>
                </includes>
            </testResource>
        </testResources>

        <!-- Plugin Management -->
        <pluginManagement>
            <plugins>
                <!-- build-helper -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${build-helper-maven-plugin.version}</version>
                </plugin>
                <!-- buildnumber -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>buildnumber-maven-plugin</artifactId>
                    <version>${buildnumber-maven-plugin.version}</version>
                </plugin>
                <!-- Clean -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${maven-clean-plugin.version}</version>
                </plugin>
                <!-- Compiler -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${maven-compiler-plugin.version}</version>
                    <configuration>
                        <!-- Force source and target -->
                        <source>${jdk.version}</source>
                        <target>${jdk.version}</target>
                        <encoding>${project.encoding}</encoding>
                        <!-- Increase the numbers of errors or warning to display -->
                        <compilerArguments>
                            <Xmaxerrs>10000</Xmaxerrs>
                            <Xmaxwarns>10000</Xmaxwarns>
                        </compilerArguments>
                        <!-- Extra configuration -->
                        <compilerArgument>-Xlint:all</compilerArgument>
                        <showDeprecation>true</showDeprecation>
                        <showWarnings>true</showWarnings>
                    </configuration>
                </plugin>
                <!-- Dependency -->
                <plugin>
                    <!-- This plugin will set properties values using dependency information -->
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${maven-dependency-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals><goal>properties</goal></goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Deploy -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${maven-deploy-plugin.version}</version>
                </plugin>
                <!-- Echo -->
                <plugin>
                    <groupId>com.soebes.maven.plugins</groupId>
                    <artifactId>echo-maven-plugin</artifactId>
                    <version>${echo-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>install</phase>
                            <goals><goal>echo</goal></goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Enforcer -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${maven-enforcer-plugin.version}</version>
                    <configuration>
                        <rules>
                            <requireMavenVersion><version>${maven.version}</version></requireMavenVersion>
                            <requireJavaVersion><version>${maven.compiler.target}</version></requireJavaVersion>
                        </rules>
                        <fail>true</fail>
                    </configuration>
                    <executions>
                        <execution>
                            <id>enforce-versions</id>
                            <goals><goal>enforce</goal></goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Git commit id -->
                <plugin>
                    <groupId>pl.project13.maven</groupId>
                    <artifactId>git-commit-id-plugin</artifactId>
                    <version>${git-commit-id-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>validate</phase>
                            <goals><goal>revision</goal></goals>
                        </execution>
                    </executions>
                    <configuration>
                        <prefix>git</prefix>
                        <verbose>false</verbose>
                        <failOnNoGitDirectory>true</failOnNoGitDirectory>
                        <failOnUnableToExtractRepoInfo>false</failOnUnableToExtractRepoInfo>
                        <useNativeGit>true</useNativeGit>
                        <skipPoms>true</skipPoms>
                        <generateGitPropertiesFile>true</generateGitPropertiesFile>
                        <generateGitPropertiesFilename>${project.build.outputDirectory}/git.properties</generateGitPropertiesFilename>
                        <format>json</format>
                        <gitDescribe>
                            <skip>false</skip>
                            <always>true</always>
                            <dirty>-dirty</dirty>
                        </gitDescribe>
                    </configuration>
                </plugin>
                <!-- gpg -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <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>
                        </execution>
                    </executions>
                </plugin>
                <!-- Install -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${maven-install-plugin.version}</version>
                </plugin>
                <!-- Jar -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${maven-jar-plugin.version}</version>
                    <executions>
                        <execution>
                            <goals><goal>test-jar</goal></goals>
                            <configuration>
                                <!-- Avoids an error when releasing the parent pom -->
                                <skipIfEmpty>true</skipIfEmpty>
                            </configuration>
                        </execution>
                    </executions>
                    <configuration>
                        <archive>
                            <manifestEntries>
                                <Built-By>${owner.name} - ${owner.email}</Built-By>
                                <Revision>@{git.commit.id.abbrev}</Revision>
                                <Specification-Title>${project.name}</Specification-Title>
                                <Specification-Version>${project.version}</Specification-Version>
                                <Specification-Vendor>${project.organization.name}</Specification-Vendor>
                                <Implementation-Title>${project.name}</Implementation-Title>
                                <Implementation-Version>${project.version}</Implementation-Version>
                                <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
                                <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                                <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                            </manifestEntries>
                        </archive>
                    </configuration>
                </plugin>
                <!-- Javadoc -->
                <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>
                    <configuration>
                        <quiet>true</quiet>
                        <source>${maven.compiler.source}</source>
                        <encoding>${project.encoding}</encoding>
                        <docencoding>${project.encoding}</docencoding>
                        <author>true</author>
                        <doctitle>${project.name} ${project.version} : ${project.description}</doctitle>
                        <windowtitle>${project.name} ${project.version}</windowtitle>
                        <packagesheader>${project.url}</packagesheader>
                        <includeDependencySources>false</includeDependencySources>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <!-- License -->
                <plugin>
                    <groupId>com.mycila</groupId>
                    <artifactId>license-maven-plugin</artifactId>
                    <version>${license-maven-plugin.version}</version>
                    <configuration>
                        <header>https://raw.githubusercontent.com/hexocraft/hexocraft-parent/master/LICENCE_HEADER</header>
                        <aggregate>true</aggregate>
                        <properties>
                            <owner>${owner.name}</owner>
                            <email>${owner.email}</email>
                            <inceptionYear>${inception.year}</inceptionYear>
                        </properties>
                        <excludes>
                            <exclude>**/LICENCE_HEADER</exclude>
                            <exclude>**/LICENSE</exclude>
                            <exclude>**/README.md</exclude>
                            <exclude>src/test/resources/**</exclude>
                            <exclude>src/main/resources/**</exclude>
                        </excludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>check-license</id>
                            <phase>verify</phase>
                            <goals><goal>check</goal></goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Nexus staging -->
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${nexus-staging-plugin.version}</version>
                </plugin>
                <!-- ProGuard -->
                <plugin>
                    <groupId>com.github.wvengen</groupId>
                    <artifactId>proguard-maven-plugin</artifactId>
                    <version>${proguard-maven-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals><goal>proguard</goal></goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>net.sf.proguard</groupId>
                            <artifactId>proguard-base</artifactId>
                            <version>${proguard-base.version}</version>
                            <scope>runtime</scope>
                        </dependency>
                    </dependencies>
                    <configuration>
                        <proguardVersion>${proguard-base.version}</proguardVersion>
                        <proguardInclude>${basedir}/proguard.conf</proguardInclude>
                    </configuration>
                </plugin>
                <!-- Resources -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${maven-resources-plugin.version}</version>
                    <executions>
                        <execution>
                            <id>testResources</id>
                            <goals>
                                <goal>testResources</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <!-- Shade -->
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-shade-plugin</artifactId>
                    <version>${maven-shade-plugin.version}</version>
                    <executions>
                        <execution>
                            <phase>package</phase>
                            <goals><goal>shade</goal></goals>
                            <configuration>
                                <minimizeJar>true</minimizeJar>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <!-- Source -->
                <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-no-fork</goal></goals>
                        </execution>
                    </executions>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                                <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            </manifest>
                        </archive>
                    </configuration>
                </plugin>
                <!-- Version -->
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${versions-maven-plugin.version}</version>
                </plugin>
            </plugins>
        </pluginManagement>

        <!-- Plugins -->
        <plugins>
            <!-- Clean -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-clean-plugin</artifactId>
            </plugin>
            <!-- Compiler -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
            </plugin>
            <!-- Dependency -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <!-- Enforcer -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <!-- Git commit id -->
            <plugin>
                <groupId>pl.project13.maven</groupId>
                <artifactId>git-commit-id-plugin</artifactId>
            </plugin>
            <!-- Install -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-install-plugin</artifactId>
            </plugin>
            <!-- License -->
            <plugin>
                <groupId>com.mycila</groupId>
                <artifactId>license-maven-plugin</artifactId>
            </plugin>
            <!-- Resources -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>

            <!-- Surefire : unit tests -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>${maven-surefire-plugin.version}</version>
                <dependencies>
                    <dependency>
                        <groupId>org.junit.jupiter</groupId>
                        <artifactId>junit-jupiter-engine</artifactId>
                        <version>${junit.jupiter.version}</version>
                    </dependency>
                </dependencies>
                <configuration>
                    <!-- Skip unit tests if asked -->
                    <skipTests>${skip.unit.tests}</skipTests>
                    <!-- Fail if no tests is present -->
                    <failIfNoTests>${fail.if.no.unit.tests}</failIfNoTests>
                    <!-- Sets the VM argument line used when unit tests are run. -->
                    <!-- allow argLine to be modified by other plugins, e.g. jacoco -->
                    <argLine>@{argLine} -Xms256m -Xmx1G</argLine>
                </configuration>
                <executions>
                    <!-- Surefire has only one goal : test -->
                    <execution>
                        <goals>
                            <goal>test</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Failesafe : integration test -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
                <version>${maven-failsafe-plugin.version}</version>
                <configuration>
                    <!-- Skip integration tests if asked -->
                    <skipTests>${skip.integration.tests}</skipTests>
                    <!-- Fail if no tests is present -->
                    <failIfNoTests>${fail.if.no.integration.tests}</failIfNoTests>
                    <!-- Sets the VM argument line used when integration tests are run. -->
                    <!-- allow argLine to be modified by other plugins, e.g. jacoco -->
                    <argLine>@{argLine} -Xms256m -Xmx1G -XX:PermSize=256m -XX:MaxPermSize=512m</argLine>
                </configuration>
                <executions>
                    <!-- Failsafe has four phases : pre-integration-test, integration-test, post-integration-test, verify  -->
                    <!-- Failsafe has only two goals : integration-test, verify  -->
                    <execution>
                        <id>integration-tests</id>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Jacoco -->
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <version>${jacoco-maven-plugin.version}</version>
                <configuration>
                    <!-- Append coverage data to the existing file -->
                    <append>true</append>
                    <excludes>
                        <exclude>*MethodAccess</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <!-- Jacoco has eleven goals : -->
                    <!--    check, dump, help, instrument, merge, -->
                    <!--    prepare-agent, prepare-agent-integration, -->
                    <!--    report, report-aggregate, report-integration, restore-instrumented-classes  -->
                    <execution>
                        <!-- Unit tests configuration -->
                        <id>pre-unit-tests</id>
                        <goals><goal>prepare-agent</goal></goals>
                        <configuration>
                            <skip>${skip.unit.tests}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Ensures code coverage report for unit tests is created after unit tests have been run. -->
                        <id>post-unit-tests</id>
                        <goals><goal>report</goal></goals>
                        <configuration>
                            <skip>${skip.unit.tests}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Integration tests configuration -->
                        <id>pre-integration-tests</id>
                        <phase>pre-integration-test</phase>
                        <goals><goal>prepare-agent-integration</goal></goals>
                        <configuration>
                            <skip>${skip.integration.tests}</skip>
                        </configuration>
                    </execution>
                    <execution>
                        <!-- Ensures code coverage report for integration tests is created after integration tests have been run. -->
                        <id>post-integration-tests</id>
                        <phase>post-integration-test</phase>
                        <goals><goal>report</goal></goals>
                        <configuration>
                            <skip>${skip.integration.tests}</skip>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <!-- Profiles -->
    <profiles>

        <!-- OSSRH Deploy -->
        <profile>
            <id>ossrh-deploy</id>

            <!-- Deployment servers -->
            <distributionManagement>
                <repository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
                </repository>
                <snapshotRepository>
                    <id>ossrh</id>
                    <url>https://oss.sonatype.org/content/repositories/snapshots</url>
                </snapshotRepository>
            </distributionManagement>

            <!-- Build options -->
            <build>
                <plugins>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!-- Nexus staging -->
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                        <extensions>true</extensions>
                        <configuration>
                            <serverId>ossrh</serverId>
                            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                            <autoReleaseAfterClose>true</autoReleaseAfterClose>
                        </configuration>
                    </plugin>
                    <!-- gpg -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- GitHub Deploy -->
        <profile>
            <id>github-deploy</id>

            <!-- Deployment servers -->
            <distributionManagement>
                <repository>
                    <id>github</id>
                    <name>GitHub Packages</name>
                    <url>https://maven.pkg.github.com/hexocraft/${project.artifactId}</url>
                </repository>
            </distributionManagement>

            <!-- Build options -->
            <build>
                <plugins>
                    <!-- Source -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <!-- Javadoc -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <!-- gpg -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- CheckerFramework -->
        <profile>
            <id>CheckerFramework</id>

            <!-- Dependencies -->
            <dependencies>
                <dependency>
                    <groupId>org.checkerframework</groupId>
                    <artifactId>checker</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.checkerframework</groupId>
                    <artifactId>checker-qual</artifactId>
                </dependency>
                <dependency>
                    <groupId>org.checkerframework</groupId>
                    <artifactId>jdk8</artifactId>
                </dependency>
                <dependency>
                    <groupId>com.google.errorprone</groupId>
                    <artifactId>javac</artifactId>
                </dependency>
            </dependencies>

            <!-- Build options -->
            <build>
                <plugins>
                    <!-- Compiler -->
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-compiler-plugin</artifactId>
                        <configuration>
                            <!-- Must fork or else JVM arguments are ignored. -->
                            <fork>true</fork>
                            <!-- Force source and target -->
                            <source>${jdk.version}</source>
                            <target>${jdk.version}</target>
                            <encoding>${project.encoding}</encoding>
                            <!-- Increase the numbers of errors or warning to display -->
                            <compilerArguments>
                                <Xmaxerrs>10000</Xmaxerrs>
                                <Xmaxwarns>10000</Xmaxwarns>
                            </compilerArguments>
                            <!-- Processors to use -->
                            <annotationProcessorPaths>
                                <path>
                                    <groupId>org.checkerframework</groupId>
                                    <artifactId>checker</artifactId>
                                    <version>${checker.framework.version}</version>
                                </path>
                            </annotationProcessorPaths>
                            <!-- Processors -->
                            <annotationProcessors>
                                <!-- Add all the checkers to enable here -->
                                <!--<annotationProcessor>org.checkerframework.checker.fenum.FenumChecker</annotationProcessor>-->
                                <!--<annotationProcessor>org.checkerframework.checker.formatter.FormatterChecker</annotationProcessor>-->
                                <!--<annotationProcessor>org.checkerframework.checker.lock.LockChecker</annotationProcessor>-->
                                <annotationProcessor>org.checkerframework.checker.nullness.NullnessChecker</annotationProcessor>
                                <!--<annotationProcessor>org.checkerframework.checker.optional.OptionalChecker</annotationProcessor>-->
                                <!--<annotationProcessor>org.checkerframework.checker.regex.RegexChecker</annotationProcessor>-->
                                <!--<annotationProcessor>org.checkerframework.checker.signature.SignatureChecker</annotationProcessor>-->
                                <!--<annotationProcessor>org.checkerframework.checker.signedness.SignednessChecker</annotationProcessor>-->
                            </annotationProcessors>
                            <!-- <compilerArgs combine.children="append">-->
                            <compilerArgs>
                                <!-- location of the annotated JDK, which comes from a Maven dependency -->
                                <arg>-Xbootclasspath/p:${annotatedJdk}</arg>
                                <arg>-J-Xbootclasspath/p:${errorProneJavac}</arg>
                                <!-- Print a stack trace whenever an internal Checker Framework error occurs-->
                                <!--<arg>-AprintErrorStack</arg>-->
                                <!-- Turns checker errors into warnings -->
                                <!--<arg>-Awarns</arg>-->
                                <!-- Enables or disables optional checks-->
                                <!--<arg>-Alint</arg>-->
                            </compilerArgs>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <!-- SonarQube -->
        <profile>
            <id>sonarqube</id>

            <!-- Build options -->
            <build>
                <!-- Plugins -->
                <plugins>
                    <plugin>
                        <groupId>org.sonarsource.scanner.maven</groupId>
                        <artifactId>sonar-maven-plugin</artifactId>
                        <version>${sonar-maven-plugin.version}</version>
                        <executions>
                            <execution>
                                <phase>verify</phase>
                                <goals><goal>sonar</goal></goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
