<?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>com.vackosar.gitflowincrementalbuilder</groupId>
    <artifactId>gitflow-incremental-builder</artifactId>
    <version>3.15.0</version>
    <name>${project.groupId}:${project.artifactId}</name>
    <description>A Maven extension for incremental building of multi-module projects when using Git Flow (or Git in general).</description>
    <url>https://github.com/gitflow-incremental-builder/gitflow-incremental-builder</url>

    <issueManagement>
        <url>https://github.com/gitflow-incremental-builder/gitflow-incremental-builder/issues</url>
        <system>GitHub Issues</system>
    </issueManagement>

    <scm>
        <url>https://github.com/gitflow-incremental-builder/gitflow-incremental-builder</url>
        <connection>scm:git:https://github.com/gitflow-incremental-builder/gitflow-incremental-builder.git</connection>
        <developerConnection>scm:git:https://github.com/gitflow-incremental-builder/gitflow-incremental-builder.git</developerConnection>
      <tag>version/3.15.0</tag>
  </scm>

    <licenses>
        <license>
            <name>MIT License</name>
            <url>http://www.opensource.org/licenses/mit-license.php</url>
            <distribution>repo</distribution>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Vaclav Kosar</name>
            <url>https://github.com/vackosar</url>
            <id>vackosar</id>
        </developer>
        <developer>
            <name>Falko Modler</name>
            <url>https://github.com/famod</url>
            <id>famod</id>
        </developer>
    </developers>

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>${maven.compiler.source}</maven.compiler.target>

        <!-- Dependency versions -->
        <version.jgit>5.13.0.202109080827-r</version.jgit>
        <version.jsch.agentproxy>0.0.9</version.jsch.agentproxy>
        <version.maven-core>3.8.4</version.maven-core>
        <version.maven-enforced>3.3.9</version.maven-enforced>
        <version.maven-plugin>3.6.4</version.maven-plugin>
        <version.slf4j>1.7.32</version.slf4j>   <!-- must match the version that is provided by maven -->
        <version.logback>1.2.10</version.logback>    <!-- the latest that appears to work properly with above slf4j version -->
        <version.javax.inject>1</version.javax.inject>
        <version.bytebuddy>1.12.7</version.bytebuddy>
        <version.junit>5.8.2</version.junit>
        <version.assertj>3.22.0</version.assertj>
        <version.mockito>4.3.1</version.mockito>
        <version.jetty>9.4.44.v20210927</version.jetty>

        <!-- Plugin versions -->
        <version.maven-enforcer-plugin>3.0.0</version.maven-enforcer-plugin>
        <version.maven-clean-plugin>3.1.0</version.maven-clean-plugin>
        <version.jacoco-maven-plugin>0.8.7</version.jacoco-maven-plugin>    <!-- note: try to keep in line with https://www.eclemma.org/changes.html -->
        <version.maven-replacer-plugin>1.5.3</version.maven-replacer-plugin>
        <version.plexus-component-metadata>2.1.1</version.plexus-component-metadata>
        <version.maven-resources-plugin>3.2.0</version.maven-resources-plugin>
        <version.maven-compiler-plugin>3.9.0</version.maven-compiler-plugin>
        <version.maven-surefire-plugin>3.0.0-M5</version.maven-surefire-plugin>
        <version.maven-source-plugin>3.2.1</version.maven-source-plugin>
        <version.maven-javadoc-plugin>3.3.1</version.maven-javadoc-plugin>
        <version.maven-jar-plugin>3.2.2</version.maven-jar-plugin>
        <version.maven-help-plugin>3.2.0</version.maven-help-plugin>
        <version.maven-failsafe-plugin>3.0.0-M5</version.maven-failsafe-plugin>
        <version.maven-site-plugin>3.10.0</version.maven-site-plugin>
        <version.maven-install-plugin>3.0.0-M1</version.maven-install-plugin>
        <version.maven-deploy-plugin>3.0.0-M2</version.maven-deploy-plugin>
        <version.maven-gpg-plugin>3.0.1</version.maven-gpg-plugin>
        <version.nexus-staging-maven-plugin>1.6.8</version.nexus-staging-maven-plugin>
        <version.versions-maven-plugin>2.9.0</version.versions-maven-plugin>
        <version.maven-release-plugin>3.0.0-M5</version.maven-release-plugin>
        <version.spotbugs-maven-plugin>4.5.3.0</version.spotbugs-maven-plugin>
        <version.spotbugs>4.5.3</version.spotbugs>

        <gibIntegrationTestRepoLocal>${project.build.directory}${file.separator}it${file.separator}repo</gibIntegrationTestRepoLocal>

        <!-- Properties to skip UnitTests (UTs) via surefire-plugin and/or IntegrationTests (UTs) via failsafe-plugin
             See also: https://stackoverflow.com/a/37880379 -->
        <skipTests>false</skipTests>
        <skipITs>${skipTests}</skipITs>
        <skipUTs>${skipTests}</skipUTs>

        <!-- See https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html for empty argLine -->
        <argLine />
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit</artifactId>
            <version>${version.jgit}</version>
            <exclusions>
                <!-- we use a version that matches the one that is provided by maven (and has to be compatible with jgit) -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit.ssh.jsch</artifactId>
            <version>${version.jgit}</version>
            <exclusions>
                <!-- we use a version that matches the one that is provided by maven (and has to be compatible with jgit) -->
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.connector-factory</artifactId>
            <version>${version.jsch.agentproxy}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.jsch</artifactId>
            <version>${version.jsch.agentproxy}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.pageant</artifactId>
            <version>${version.jsch.agentproxy}</version>
        </dependency>
        <dependency>
            <groupId>com.jcraft</groupId>
            <artifactId>jsch.agentproxy.sshagent</artifactId>
            <version>${version.jsch.agentproxy}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${version.maven-core}</version>
            <scope>provided</scope>
            <exclusions>
                <!-- avoid direct usage of Guava (which is dragged in via 3.3.9, but not in 3.8.1) -->
                <exclusion>
                    <groupId>com.google.guava</groupId>
                    <artifactId>guava</artifactId>
                </exclusion>
                <!-- avoid direct usage of Guice annotations -->
                <exclusion>
                    <groupId>com.google.inject</groupId>
                    <artifactId>guice</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.apache.maven.plugin-tools</groupId>
            <artifactId>maven-plugin-annotations</artifactId>
            <version>${version.maven-plugin}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>${version.slf4j}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.inject</groupId>
            <artifactId>javax.inject</artifactId>
            <version>${version.javax.inject}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-dep</artifactId>
            <version>${version.bytebuddy}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>com.github.spotbugs</groupId>
            <artifactId>spotbugs-annotations</artifactId>
            <version>${version.spotbugs}</version>
            <scope>provided</scope>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter</artifactId>
            <version>${version.junit}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.assertj</groupId>
            <artifactId>assertj-core</artifactId>
            <version>${version.assertj}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <version>${version.mockito}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-junit-jupiter</artifactId>
            <version>${version.mockito}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>ch.qos.logback</groupId>
            <artifactId>logback-classic</artifactId>
            <version>${version.logback}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit.http.server</artifactId>
            <version>${version.jgit}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${version.jetty}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${version.jetty}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jgit</groupId>
            <artifactId>org.eclipse.jgit.junit.ssh</artifactId>
            <version>${version.jgit}</version>
            <scope>test</scope>
        </dependency>
    </dependencies>
    <build>
        <defaultGoal>clean install</defaultGoal>
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
                <filtering>true</filtering>
            </testResource>
        </testResources>
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>${version.maven-enforcer-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>${version.maven-clean-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.jacoco</groupId>
                    <artifactId>jacoco-maven-plugin</artifactId>
                    <version>${version.jacoco-maven-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>net.bytebuddy</groupId>
                    <artifactId>byte-buddy-maven-plugin</artifactId>
                    <version>${version.bytebuddy}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-plugin-plugin</artifactId>
                    <version>${version.maven-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>com.google.code.maven-replacer-plugin</groupId>
                    <artifactId>replacer</artifactId>
                    <version>${version.maven-replacer-plugin}</version>
                    <dependencies>
                        <!-- Saxon for XPath 2.0 support -->
                        <dependency>
                            <groupId>net.sf.saxon</groupId>
                            <artifactId>Saxon-HE</artifactId>
                            <!-- This really old version 9.5 is the last version providing automatic discovery via XPathFactory,
                                 see also: https://www.saxonica.com/html/documentation/xpath-api/jaxp-xpath/factory.html -->
                            <version>9.5.1-8</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.plexus</groupId>
                    <artifactId>plexus-component-metadata</artifactId>
                    <version>${version.plexus-component-metadata}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version.maven-resources-plugin}</version>
                    <configuration>
                        <nonFilteredFileExtensions>
                            <nonFilteredFileExtension>zip</nonFilteredFileExtension>
                        </nonFilteredFileExtensions>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version.maven-compiler-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version.maven-surefire-plugin}</version>
                    <configuration>
                        <skipTests>${skipUTs}</skipTests>
                        <trimStackTrace>false</trimStackTrace> <!-- https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
                        <excludes>
                            <exclude>**/*IntegrationTest.java</exclude>
                            <exclude>**/*$*.java</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version.maven-source-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version.maven-javadoc-plugin}</version>
                    <configuration>
                        <source>${maven.compiler.source}</source>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version.maven-site-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-jar-plugin</artifactId>
                    <version>${version.maven-jar-plugin}</version>
                    <configuration>
                        <archive>
                            <manifest>
                                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                            </manifest>
                        </archive>
                        <excludes>
                            <exclude>**/MojoParametersGeneratingByteBuddyPlugin*</exclude>
                        </excludes>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-help-plugin</artifactId>
                    <version>${version.maven-help-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${version.maven-failsafe-plugin}</version>
                    <configuration>
                        <skipTests>${skipTests}</skipTests>
                        <skipITs>${skipITs}</skipITs>
                        <trimStackTrace>false</trimStackTrace> <!-- https://issues.apache.org/jira/browse/SUREFIRE-1457 -->
                        <includes>
                            <include>**/*IntegrationTest.java</include>
                        </includes>
                        <systemPropertyVariables>
                            <settings.localRepository>${settings.localRepository}</settings.localRepository>
                            <project.version>${project.version}</project.version>
                            <logback.FILE.name>test-integration</logback.FILE.name>
                        </systemPropertyVariables>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-install-plugin</artifactId>
                    <version>${version.maven-install-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-deploy-plugin</artifactId>
                    <version>${version.maven-deploy-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${version.maven-gpg-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.sonatype.plugins</groupId>
                    <artifactId>nexus-staging-maven-plugin</artifactId>
                    <version>${version.nexus-staging-maven-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>versions-maven-plugin</artifactId>
                    <version>${version.versions-maven-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-release-plugin</artifactId>
                    <version>${version.maven-release-plugin}</version>
                    <configuration>
                        <tagNameFormat>version/@{project.version}</tagNameFormat>
                        <goals>deploy</goals>
                        <scmCommentPrefix>[skip ci] </scmCommentPrefix>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>com.github.spotbugs</groupId>
                    <artifactId>spotbugs-maven-plugin</artifactId>
                    <version>${version.spotbugs-maven-plugin}</version>
                    <dependencies>
                        <!-- overwrite dependency on spotbugs if you want to specify the version of spotbugs -->
                        <dependency>
                            <groupId>com.github.spotbugs</groupId>
                            <artifactId>spotbugs</artifactId>
                            <version>${version.spotbugs}</version>
                        </dependency>
                    </dependencies>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
                <executions>
                    <execution>
                        <id>enforce-versions</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <requireMavenVersion>
                                    <version>[${version.maven-enforced},)</version>
                                </requireMavenVersion>
                            </rules>
                        </configuration>
                    </execution>
                    <execution>
                        <id>enforce-dependencies</id>
                        <goals>
                            <goal>enforce</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <bannedDependencies>
                                    <excludes>
                                        <exclude>com.google.guava:guava</exclude>
                                        <exclude>junit:junit</exclude>
                                    </excludes>
                                </bannedDependencies>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.bytebuddy</groupId>
                <artifactId>byte-buddy-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>generate-mojo</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>transform</goal>
                        </goals>
                        <configuration>
                            <transformations>
                                <transformation>
                                    <plugin>com.vackosar.gitflowincrementalbuild.mojo.MojoParametersGeneratingByteBuddyPlugin</plugin>
                                </transformation>
                            </transformations>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <!-- the plugin does not pick up provided dependencies, so those needed for the transformation have to be added here -->
                    <dependency>
                        <groupId>org.apache.maven.plugin-tools</groupId>
                        <artifactId>maven-plugin-annotations</artifactId>
                        <version>${version.maven-plugin}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-plugin-plugin</artifactId>
                <configuration>
                    <packagingTypes>
                        <packagingType>jar</packagingType>
                    </packagingTypes>
                    <extractors>
                        <extractor>java-annotations</extractor>
                    </extractors>
                </configuration>
                <executions>
                    <execution>
                        <id>plugin-descriptor</id>
                        <goals>
                            <goal>descriptor</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- replace in plugin.xml and plugin-help.xml all com.vackosar.gitflowincrementalbuild.control.Property types with java.lang.String or boolean -->
            <plugin>
                <groupId>com.google.code.maven-replacer-plugin</groupId>
                <artifactId>replacer</artifactId>
                <configuration>
                    <replacements>
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/implementation/text()</xpath>
                            <token>^.*$</token>
                            <value>com.vackosar.gitflowincrementalbuild.mojo.FakeMojo</value>
                        </replacement>
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/description/text()</xpath>
                            <token>(?s)^.*$</token>
                            <value>This fake goal only exposes the general config properties/parameters. DO NOT EXECUTE!</value>
                        </replacement>
                        <!-- set proper parameter types (instead of com.vackosar.gitflowincrementalbuild.control.Property) -->
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/configuration/*/@implementation</xpath>
                            <token>^.*$</token>
                            <value>java.lang.String</value>
                        </replacement>
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/configuration/*[@default-value='true' or @default-value='false']/@implementation</xpath>
                            <token>^.*$</token>
                            <value>boolean</value>
                        </replacement>
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/parameters/parameter/type/text()</xpath>
                            <token>^.*$</token>
                            <value>java.lang.String</value>
                        </replacement>
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/parameters/parameter[name/text() = ../../configuration/*[@implementation='boolean']/name()]/type/text()</xpath>
                            <token>^.*$</token>
                            <value>boolean</value>
                        </replacement>
                        <!-- add link to GH config documentation to each parameter description -->
                        <replacement>
                            <xpath>/plugin/mojos/mojo[goal/text() = 'config-do-not-execute']/parameters/parameter/description/text()</xpath>
                            <token>^.*$</token>
                            <value>$0&lt;br&gt;&lt;br&gt;See also: https://git.io/JJn42</value>
                        </replacement>
                    </replacements>
                </configuration>
                <executions>
                    <execution>
                        <id>modify-plugin-xml</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>replace</goal>
                        </goals>
                        <configuration>
                            <file>${project.build.outputDirectory}/META-INF/maven/plugin.xml</file>
                        </configuration>
                    </execution>
                    <execution>
                        <id>modify-plugin-help-xml</id>
                        <phase>process-classes</phase>
                        <goals>
                            <goal>replace</goal>
                        </goals>
                        <configuration>
                            <file>${project.build.outputDirectory}/META-INF/maven/${project.groupId}/${project.artifactId}/plugin-help.xml</file>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.jacoco</groupId>
                <artifactId>jacoco-maven-plugin</artifactId>
                <configuration>
                    <excludes>
                        <exclude>**/mojo/**</exclude>
                    </excludes>
                </configuration>
                <executions>
                    <execution>
                        <id>jacoco-prepare-agent</id>
                        <goals>
                            <goal>prepare-agent</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-report</id>
                        <phase>test</phase> <!-- integration-tests are not using jacoco -->
                        <goals>
                            <goal>report</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>jacoco-check</id>
                        <phase>test</phase> <!-- integration-tests are not using jacoco -->
                        <goals>
                            <goal>check</goal>
                        </goals>
                        <configuration>
                            <rules>
                                <rule>
                                    <element>BUNDLE</element>
                                    <limits>
                                        <limit>
                                            <counter>INSTRUCTION</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.93</minimum>
                                        </limit>
                                        <limit>
                                            <counter>BRANCH</counter>
                                            <value>COVEREDRATIO</value>
                                            <minimum>0.85</minimum>
                                        </limit>
                                        <limit>
                                            <counter>CLASS</counter>
                                            <value>MISSEDCOUNT</value>
                                            <maximum>0</maximum>
                                        </limit>
                                    </limits>
                                </rule>
                            </rules>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-metadata</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate-metadata</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-install-plugin</artifactId>
                <executions>
                    <execution>
                        <id>pre-it-install-gib</id>
                        <phase>pre-integration-test</phase>
                        <goals>
                            <goal>install-file</goal>
                        </goals>
                        <configuration>
                            <!-- no "skip" available -->
                            <file>${project.build.directory}/${project.build.finalName}.${project.packaging}</file>
                            <localRepositoryPath>${gibIntegrationTestRepoLocal}</localRepositoryPath>
                            <pomFile>${project.basedir}/pom.xml</pomFile>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <!-- help-plugin is required in local repo for integration-tests -->
            <plugin>
                <artifactId>maven-help-plugin</artifactId>
                <executions>
                    <execution>
                        <id>trigger-help-plugin-for-it</id>
                        <phase>integration-test</phase>
                        <goals>
                            <goal>evaluate</goal>
                        </goals>
                        <configuration>
                            <expression>project.version</expression>    <!-- just something, does not matter -->
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-failsafe-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>integration-test</goal>
                            <goal>verify</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>com.github.spotbugs</groupId>
                <artifactId>spotbugs-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>spotbugs-check</id>
                        <goals>
                            <goal>check</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- verify that only JDK8 APIs are used -->
        <profile>
            <id>jdk9+</id>
            <activation>
                <jdk>[9,)</jdk>
            </activation>
            <properties>
                <maven.compiler.release>8</maven.compiler.release>
            </properties>
        </profile>
        <profile>
            <id>quick-build</id>
            <activation>
                <property>
                    <name>quickly</name>
                </property>
            </activation>
            <properties>
                <enforcer.skip>true</enforcer.skip>
                <jacoco.skip>true</jacoco.skip>
                <maven.test.skip>true</maven.test.skip>
                <maven.javadoc.skip>true</maven.javadoc.skip>
                <spotbugs.skip>true</spotbugs.skip>
            </properties>
            <build>
                <defaultGoal>clean install</defaultGoal>
            </build>
        </profile>
        <profile>
            <id>jacoco-skip-skipTests</id>
            <activation>
                <property>
                    <name>skipTests</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <jacoco.skip>true</jacoco.skip>
            </properties>
        </profile>
        <profile>
            <id>jacoco-skip-skipUTs</id>
            <activation>
                <property>
                    <name>skipUTs</name>
                    <value>true</value>
                </property>
            </activation>
            <properties>
                <jacoco.skip>true</jacoco.skip>
            </properties>
        </profile>
        <profile>
            <id>release</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                    <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>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>display-updates</id>
            <build>
                <defaultGoal>initialize</defaultGoal>
                <plugins>
                    <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>versions-maven-plugin</artifactId>
                        <configuration>
                            <rulesUri>file:///${project.basedir}/maven-version-rules.xml</rulesUri>
                        </configuration>
                        <executions>
                            <execution>
                                <id>display-updates</id>
                                <phase>initialize</phase>
                                <goals>
                                    <goal>display-dependency-updates</goal>
                                    <goal>display-plugin-updates</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
        <profile>
            <id>eclipse</id>
            <activation>
                <property>
                    <name>m2e.version</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <!-- This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself. -->
                        <!-- Need to use this pseudo plugin instead of <?m2e ... ?> due to https://issues.apache.org/jira/browse/MNG-6204 -->
                        <plugin>
                            <groupId>org.eclipse.m2e</groupId>
                            <artifactId>lifecycle-mapping</artifactId>
                            <version>1.0.0</version>
                            <configuration>
                                <lifecycleMappingMetadata>
                                    <pluginExecutions>
                                        <!-- Eclipse tries to resolve our custom bytebuddy plugin from local repo instead of target
                                             which yields unexpected results, so we better ignore that alltogether and all other executions
                                             that work with the bytebuddy transformed classes. -->
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>net.bytebuddy</groupId>
                                                <artifactId>byte-buddy-maven-plugin</artifactId>
                                                <versionRange>[${version.bytebuddy},)</versionRange>
                                                <goals>
                                                    <goal>transform</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>org.apache.maven.plugins</groupId>
                                                <artifactId>maven-plugin-plugin</artifactId>
                                                <versionRange>[${version.maven-plugin},)</versionRange>
                                                <goals>
                                                    <goal>descriptor</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                        <pluginExecution>
                                            <pluginExecutionFilter>
                                                <groupId>com.google.code.maven-replacer-plugin</groupId>
                                                <artifactId>replacer</artifactId>
                                                <versionRange>[${version.maven-replacer-plugin},)</versionRange>
                                                <goals>
                                                    <goal>replace</goal>
                                                </goals>
                                            </pluginExecutionFilter>
                                            <action>
                                                <ignore />
                                            </action>
                                        </pluginExecution>
                                    </pluginExecutions>
                                </lifecycleMappingMetadata>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>
    </profiles>
</project>
