<?xml version="1.0" encoding="UTF-8"?>
<!-- ============================================================================================================== -->
<!--                                                                                                                -->
<!-- Copyright 2019 Nikola Ruzic                                                                                    -->
<!--                                                                                                                -->
<!-- Permission is hereby granted, free of charge, to any person obtaining a copy of this software                  -->
<!-- and associated documentation files (the "Software"), to deal in the Software without restriction,              -->
<!-- including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,          -->
<!-- and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,          -->
<!-- subject to the following conditions:                                                                           -->
<!--                                                                                                                -->
<!-- The above copyright notice and this permission notice shall be included in all copies or substantial           -->
<!-- portions of the Software.                                                                                      -->
<!--                                                                                                                -->
<!-- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING                  -->
<!-- BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.    -->
<!-- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,        -->
<!-- WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE   -->
<!-- OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                                                                  -->
<!--                                                                                                                -->
<!-- ============================================================================================================== -->
<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.github.nruzic.commons.master</groupId>
    <artifactId>nruzic-commons-master</artifactId>
    <version>4.0.0</version>
    <packaging>pom</packaging>
    <name>nruzic commons master</name>
    <description>Common POM definitions for java projects</description>
    <url>${distribution-site-read-url}</url>

    <licenses>
        <license>
            <name>${project-licence-name}</name>
            <url>${project-licence-url}</url>
        </license>
    </licenses>

    <properties>

        <!-- build switches -->
        <branch>master</branch>
        <encoding>UTF-8</encoding>
        <java>1.8</java>

        <!-- parent overrides -->
        <foo>foo-from-parent-using-this</foo><!-- for testing site descriptor -->

        <!-- build defaults -->
        <project.build.sourceEncoding>${encoding}</project.build.sourceEncoding>
        <project.reporting.outputEncoding>${encoding}</project.reporting.outputEncoding>
        <java-compiler-source-level>${java}</java-compiler-source-level>
        <java-compiler-compliance-level>${java-compiler-source-level}</java-compiler-compliance-level>
        <assemblies-bin-distribution-base-directory>${project-name}</assemblies-bin-distribution-base-directory>
        <assembly.id>bin</assembly.id> <!-- Default assembly id -->
        <conventions-checkstyle-config>hr/nruzic/commons/conventions/checkstyle/allman-ansi-checks.xml</conventions-checkstyle-config>
        <conventions-checkstyle-suppressions>hr/nruzic/commons/conventions/checkstyle/checkstyle-suppressions.xml</conventions-checkstyle-suppressions>
        <conventions-eclipse-formatter>hr/nruzic/commons/conventions/eclipse/formatter/allman-ansi-eclipse-formatter.xml</conventions-eclipse-formatter>
        <checkstyle.failOnViolation>true</checkstyle.failOnViolation>
        <settings-security>${user.home}/.m2/settings-security.xml</settings-security>
        <adoc-show-hints>false</adoc-show-hints>
        <javadoc-doclint>all</javadoc-doclint>

        <!-- aggregator defaults -->
        <version-aggregator-foo>1.0.0-SNAPSHOT</version-aggregator-foo>

        <!-- project generalities -->
        <project-name>${project.artifactId}</project-name>
        <project-version>${project.version}</project-version>
        <project-home>${user.home}/.${project-name}</project-home>
        <project-branch>${branch}</project-branch>
        <project-buildtime>${maven-build-timestamp}</project-buildtime>
        <project-builddate>${maven-build-timestamp-date}</project-builddate>
        <project-licence-name>MIT License</project-licence-name>
        <project-licence-url>http://www.opensource.org/licenses/mit-license.php</project-licence-url>

        <!-- distribution releases repository definition -->
        <distribution-repository-releases-name>distribution-repository-releases</distribution-repository-releases-name>
        <distribution-repository-releases-id>distribution-repository-releases-ossrh</distribution-repository-releases-id>
        <distribution-repository-releases-url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</distribution-repository-releases-url>

        <!-- distribution snapshots repository definition -->
        <distribution-repository-snapshots-name>distribution-repository-snapshots</distribution-repository-snapshots-name>
        <distribution-repository-snapshots-id>distribution-repository-snapshots-ossrh</distribution-repository-snapshots-id>
        <distribution-repository-snapshots-url>https://oss.sonatype.org/content/repositories/snapshots</distribution-repository-snapshots-url>

        <!-- distribution site definition -->
        <distribution-site-name>distribution-site</distribution-site-name>
        <distribution-site-id>distribution-site-localhost</distribution-site-id>
        <distribution-site-read-url>http://localhost/project/${project-branch}/${project-name}/${project-version}</distribution-site-read-url>
        <distribution-site-write-url>scp://localhost/var/www/html/project/${project-branch}/${project-name}/${project-version}</distribution-site-write-url>
        <distribution-site-stage-dir>${user.home}/maven-stage/${project-branch}/${project-name}/${project-version}</distribution-site-stage-dir>

        <!-- continuous integration software locations -->
        <ci-managament-system>Jenkins</ci-managament-system>
        <ci-managament-url>https://jenkins.foo.com/job/bar/job/${project-name}/job/${project-branch}</ci-managament-url>

        <!-- issue management -->
        <issue-management-system-name>JIRA</issue-management-system-name>
        <issue-management-url>https://jira.foo.com/browse/${project-name}</issue-management-url>

        <!-- dependencies -->
        <version-nruzic-commons-conventions>2.1.0</version-nruzic-commons-conventions>
        <version-nruzic-commons-assemblies>1.0.0</version-nruzic-commons-assemblies>
        <version-maven-wagon>3.2.0</version-maven-wagon>
        <version-maven-filtering>3.1.2</version-maven-filtering>
        <version-plexus-utils>3.0.24</version-plexus-utils>
        <version-maven-compiler-plugin>3.8.0</version-maven-compiler-plugin>
        <version-maven-resources-plugin>3.1.0</version-maven-resources-plugin>
        <version-maven-source-plugin>3.0.1</version-maven-source-plugin>
        <version-maven-assembly-plugin>3.1.0</version-maven-assembly-plugin>
        <version-maven-failsafe-plugin>3.0.0-M2</version-maven-failsafe-plugin>
        <version-maven-dependency-plugin>3.1.1</version-maven-dependency-plugin>
        <version-maven-release-plugin>2.5.3</version-maven-release-plugin>
        <version-maven-site-plugin>3.7.1</version-maven-site-plugin>
        <version-maven-javadoc-plugin>3.0.1</version-maven-javadoc-plugin>
        <version-maven-jxr-plugin>3.0.0</version-maven-jxr-plugin>
        <version-maven-surefire-plugin>3.0.0-M2</version-maven-surefire-plugin>
        <version-maven-surefire-report-plugin>3.0.0-M2</version-maven-surefire-report-plugin>
        <version-maven-project-info-reports-plugin>3.0.0</version-maven-project-info-reports-plugin>
        <version-maven-checkstyle-plugin>3.0.0</version-maven-checkstyle-plugin>
        <version-taglist-maven-plugin>2.4</version-taglist-maven-plugin>
        <version-maven-antrun-plugin>1.8</version-maven-antrun-plugin>
        <version-enunciate-maven-plugin>2.11.1</version-enunciate-maven-plugin>
        <version-maven-changelog-plugin>2.3</version-maven-changelog-plugin>
        <version-build-helper-maven-plugin>3.0.0</version-build-helper-maven-plugin>
        <version-asciidoctor-maven-plugin>1.5.7.1</version-asciidoctor-maven-plugin>
        <version-maven-gpg-plugin>1.6</version-maven-gpg-plugin>
        <version-nexus-staging-maven-plugin>1.6.8</version-nexus-staging-maven-plugin>
        <version-maven-changes-plugin>2.12.1</version-maven-changes-plugin>
        <version-formatter-maven-plugin>2.8.1</version-formatter-maven-plugin>
        <version-impsort-maven-plugin>1.2.0</version-impsort-maven-plugin>
        <version-maven-deploy-plugin>3.0.0-M1</version-maven-deploy-plugin>
        <version-doxia>1.8</version-doxia>
        <version-doxia-site-tools>1.8.1</version-doxia-site-tools>
    </properties>

    <scm>
        <url>http://github.com/nruzic/nruzic-commons-master/tree/${project.scm.tag}</url>
        <connection>scm:git:http://github.com/nruzic/nruzic-commons-master</connection>
        <developerConnection>scm:git:git@github.com:nruzic/nruzic-commons-master</developerConnection>
        <tag>nruzic-commons-master-4.0.0</tag>
    </scm>

    <distributionManagement>
        <repository>
            <name>${distribution-repository-releases-name}</name>
            <id>${distribution-repository-releases-id}</id>
            <url>${distribution-repository-releases-url}</url>
        </repository>
        <snapshotRepository>
            <name>${distribution-repository-snapshots-name}</name>
            <id>${distribution-repository-snapshots-id}</id>
            <url>${distribution-repository-snapshots-url}</url>
        </snapshotRepository>
        <site>
            <name>${distribution-site-name}</name>
            <id>${distribution-site-id}</id>
            <url>${distribution-site-write-url}</url>
        </site>
    </distributionManagement>

    <ciManagement>
        <system>${ci-managament-system}</system>
        <url>${ci-managament-url}</url>
    </ciManagement>

    <issueManagement>
        <system>${issue-management-system-name}</system>
        <url>${issue-management-url}</url>
    </issueManagement>

    <developers>
        <developer>
            <id>nruzic</id>
            <name>Nikola Ružić</name>
            <email>nikola.ruzic.dev@gmail.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+1</timezone>
        </developer>
    </developers>

    <build>
        <!-- ==================== -->
        <!-- Additional resources -->
        <!-- ==================== -->
        <testResources>
            <testResource>
                <directory>src/test/resources</directory>
            </testResource>
            <testResource>
                <directory>src/it/resources</directory>
            </testResource>
            <testResource>
                <directory>src/main/config</directory>
            </testResource>
            <testResource>
                <directory>src/main/scripts</directory>
            </testResource>
        </testResources>
        <!-- ================= -->
        <!-- Plugin management -->
        <!-- ================= -->
        <pluginManagement>
            <plugins>
                <plugin>
                    <groupId>org.codehaus.mojo</groupId>
                    <artifactId>build-helper-maven-plugin</artifactId>
                    <version>${version-build-helper-maven-plugin}</version>
                    <executions>
                        <execution>
                            <id>add-timestamp-property</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>timestamp-property</goal>
                            </goals>
                            <configuration>
                                <name>maven-build-timestamp</name>
                                <pattern>yyyy-MM-dd HH:mm</pattern>
                                <locale>hr,HR</locale>
                                <timeZone>GMT+1</timeZone>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-timestamp-date-property</id>
                            <phase>validate</phase>
                            <goals>
                                <goal>timestamp-property</goal>
                            </goals>
                            <configuration>
                                <name>maven-build-timestamp-date</name>
                                <pattern>yyyy-MM-dd</pattern>
                                <locale>hr,HR</locale>
                                <timeZone>GMT+1</timeZone>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-aspect-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>src/main/aspect</source>
                                </sources>
                            </configuration>
                        </execution>
                        <execution>
                            <id>add-test-source</id>
                            <phase>generate-sources</phase>
                            <goals>
                                <goal>add-test-source</goal>
                            </goals>
                            <configuration>
                                <sources>
                                    <source>src/it/java</source>
                                </sources>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-antrun-plugin</artifactId>
                    <version>${version-maven-antrun-plugin}</version>
                    <executions>
                        <execution>
                            <id>copy-doc-to-site</id>
                            <phase>site</phase>
                            <goals>
                                <goal>run</goal>
                            </goals>
                            <configuration>
                                <target>
                                    <copy todir="${project.build.directory}/site/doc" failonerror="false">
                                        <fileset dir="${project.build.directory}/doc" />
                                    </copy>
                                </target>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-dependency-plugin</artifactId>
                    <version>${version-maven-dependency-plugin}</version>
                    <executions>
                        <execution>
                            <id>patch-library-doxia-decoration-model</id>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>com.github.nruzic.org.apache.maven.doxia</groupId>
                                        <artifactId>doxia-decoration-model</artifactId>
                                        <version>${version-doxia-site-tools}-patch1</version>
                                    </artifactItem>
                                </artifactItems>
                                <outputDirectory>${settings.localRepository}/org/apache/maven/doxia/doxia-decoration-model/${version-doxia-site-tools}/</outputDirectory>
                            </configuration>
                        </execution>
                        <execution>
                            <id>patch-library-maven-filtering</id>
                            <goals>
                                <goal>copy</goal>
                            </goals>
                            <phase>initialize</phase>
                            <configuration>
                                <artifactItems>
                                    <artifactItem>
                                        <groupId>com.github.nruzic.org.apache.maven.shared</groupId>
                                        <artifactId>maven-filtering</artifactId>
                                        <version>${version-maven-filtering}-patch1</version>
                                    </artifactItem>
                                </artifactItems>
                                <outputDirectory>${settings.localRepository}/org/apache/maven/shared/maven-filtering/${version-maven-filtering}/</outputDirectory>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>${version-maven-resources-plugin}</version>
                    <configuration>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                    <dependencies>
                        <dependency>
                            <groupId>org.apache.maven.shared</groupId>
                            <artifactId>maven-filtering</artifactId>
                            <version>${version-maven-filtering}</version>
                            <classifier>patch1</classifier>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-compiler-plugin</artifactId>
                    <version>${version-maven-compiler-plugin}</version>
                    <configuration>
                        <source>${java-compiler-source-level}</source>
                        <target>${java-compiler-compliance-level}</target>
                        <encoding>${project.build.sourceEncoding}</encoding>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>${version-maven-surefire-plugin}</version>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-failsafe-plugin</artifactId>
                    <version>${version-maven-failsafe-plugin}</version>
                    <configuration>
                        <forkMode>once</forkMode>
                        <argLine>-Xmx512M -XX:MaxPermSize=256M
                            -XX:+CMSClassUnloadingEnabled</argLine>
                    </configuration>
                    <executions>
                        <execution>
                            <id>integration-test</id>
                            <goals>
                                <goal>integration-test</goal>
                            </goals>
                        </execution>
                        <execution>
                            <id>verify</id>
                            <goals>
                                <goal>verify</goal>
                            </goals>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-source-plugin</artifactId>
                    <version>${version-maven-source-plugin}</version>
                    <executions>
                        <execution>
                            <id>attach-sources</id>
                            <goals>
                                <goal>jar-no-fork</goal>
                            </goals>
                            <phase>prepare-package</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-javadoc-plugin</artifactId>
                    <version>${version-maven-javadoc-plugin}</version>
                    <configuration>
                        <!-- Default configuration for all executions -->
                        <outputDirectory>${project.build.directory}/javadocs</outputDirectory>
                        <reportOutputDirectory>${project.reporting.outputDirectory}/javadocs</reportOutputDirectory>
                        <!-- Workaround for http://stackoverflow.com/questions/15886209 -->
                        <doclint>${javadoc-doclint}</doclint>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-javadocs</id>
                            <goals>
                                <goal>jar</goal>
                            </goals>
                            <phase>prepare-package</phase>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-assembly-plugin</artifactId>
                    <version>${version-maven-assembly-plugin}</version>
                    <configuration>
                        <descriptorSourceDirectory>${project.basedir}/src/main/assemblies</descriptorSourceDirectory>
                    </configuration>
                    <executions>
                        <execution>
                            <id>assemble-default-binary-distribution</id>
                            <phase>package</phase>
                            <goals>
                                <goal>single</goal>
                            </goals>
                            <configuration>
                                <descriptorRefs>
                                    <descriptorRef>bin-default</descriptorRef>
                                </descriptorRefs>
                                <filters>
                                    <filter>${project.basedir}/src/main/filters/target-default.properties</filter>
                                    <filter>${project.basedir}/src/main/filters/target-production.properties</filter>
                                    <filter>${project.basedir}/src/main/filters/target-bin.properties</filter>
                                </filters>
                                <!-- <finalName>${project.build.finalName}-bin</finalName>
                                    <appendAssemblyId>false</appendAssemblyId> -->
                                <tarLongFileMode>gnu</tarLongFileMode>
                                <siteDirectory>${distribution-site-stage-dir}</siteDirectory>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.nruzic.commons.assemblies</groupId>
                            <artifactId>nruzic-commons-assemblies</artifactId>
                            <version>${version-nruzic-commons-assemblies}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.shared</groupId>
                            <artifactId>maven-filtering</artifactId>
                            <version>${version-maven-filtering}</version>
                            <classifier>patch1</classifier>
                        </dependency>
                    </dependencies>
                </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-release-plugin</artifactId>
                    <version>${version-maven-release-plugin}</version>
                    <configuration>
                        <!-- automatically assign parent version to submodules
                            if submodule is not specifying it's own version -->
                        <autoVersionSubmodules>true</autoVersionSubmodules>
                        <!-- this is a hack to trigger custom release profile
                            (not the one from master pom) during preparation step, in addition to execution
                            by perform step which is triggered by releaseProfiles tag -->
                        <arguments>-DreleaseTasks -Dbranch=${project-branch} -Dsettings.security=${settings-security}</arguments>
                        <!-- prepare settings -->
                        <preparationGoals>clean verify site</preparationGoals>
                        <!-- completion settings -->
                        <completionGoals>clean verify site</completionGoals>
                        <!-- perform settings -->
                        <useReleaseProfile>false</useReleaseProfile>
                        <releaseProfiles>releaseTasks</releaseProfiles>
                    </configuration>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-site-plugin</artifactId>
                    <version>${version-maven-site-plugin}</version>
                    <configuration>
                        <stagingDirectory>${distribution-site-stage-dir}</stagingDirectory>
                        <locales>en</locales>
                        <asciidoc>
                            <sourceDirectory>${project.basedir}/src/site/asciidoc</sourceDirectory>
                            <!-- <sourceDocumentName>refdoc.adoc</sourceDocumentName> -->
                            <!-- <baseDir>${project.basedir}/src/site/asciidoc/users/refdoc</baseDir> -->
                            <relativeBaseDir>true</relativeBaseDir>
                            <preserveDirectories>true</preserveDirectories>
                            <headerFooter>true</headerFooter>
                            <backend>html</backend>
                            <doctype>book</doctype>
                            <attributes>
                                <project-version>${project.version}</project-version>
                                <maven-build-timestamp>${maven.build.timestamp}</maven-build-timestamp>
                            </attributes>
                        </asciidoc>
                        <moduleExcludes>
                            <asciidoc>**/_*.adoc</asciidoc>
                        </moduleExcludes>
                    </configuration>
                    <executions>
                        <execution>
                            <id>attach-descriptor</id>
                            <goals>
                                <goal>attach-descriptor</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <!-- add support for ssh/scp -->
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-ssh</artifactId>
                            <version>${version-maven-wagon}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-provider-api</artifactId>
                            <version>${version-maven-wagon}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.wagon</groupId>
                            <artifactId>wagon-webdav-jackrabbit</artifactId>
                            <version>${version-maven-wagon}</version>
                        </dependency>
                        <!-- adoc support -->
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctor-maven-plugin</artifactId>
                            <version>${version-asciidoctor-maven-plugin}</version>
                        </dependency>
                        <!-- add support for markdown syntax -->
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-module-markdown</artifactId>
                            <version>${version-doxia}</version>
                        </dependency>
                        <!-- Fixing java.lang.NoClassDefFoundError: org/apache/maven/doxia/sink/impl/XhtmlBaseSink
                        error due to the introduction of asciidoctor maven plugin. For more info take a look at
                        http://maven.40175.n5.nabble.com/maven-site-plugin-3-5-ClassNotFoundException-td5862952.html
                        -->
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-core</artifactId>
                            <version>${version-doxia}</version>
                        </dependency>
                        <!-- fix for https://www.mail-archive.com/users@maven.apache.org/msg141237.html using commit
                        https://github.com/nruzic/maven-doxia-sitetools/commit/93933ced43a39ac3728bb409954d212fb0b78754
                        -->
                        <dependency>
                            <groupId>org.apache.maven.doxia</groupId>
                            <artifactId>doxia-decoration-model</artifactId>
                            <version>${version-doxia-site-tools}</version>
                            <classifier>patch1</classifier>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-checkstyle-plugin</artifactId>
                    <version>${version-maven-checkstyle-plugin}</version>
                    <configuration>
                        <!-- Check rules definition -->
                        <configLocation>${conventions-checkstyle-config}</configLocation>
                        <!-- Stop build on error -->
                        <failOnViolation>${checkstyle.failOnViolation}</failOnViolation>
                        <!-- Summarize broken rules -->
                        <logViolationsToConsole>true</logViolationsToConsole>
                        <!-- location of the source directories to be used for Checkstyle.
                             Expand check to whole project base directory because
                             default ${project.compileSourceRoots} is not enough -->
                        <sourceDirectories>${project.basedir}</sourceDirectories>
                        <!-- Check all files in source directory,
                             and use suppression definition for exclusions -->
                        <includes>*,src/</includes>
                        <excludes>.*,
                                  i2ot-jenkins-id-rsa,
                                  **/*.asc,
                                  **/*.doc,
                                  **/*.docx,
                                  **/*.exe,
                                  **/*.gif,
                                  **/*.gz,
                                  **/*.ico,
                                  **/*.jar,
                                  **/*.jpg,
                                  **/*.jpeg,
                                  **/*.key,
                                  **/*.min.js,
                                  **/*.pdf,
                                  **/*.png,
                                  **/*.swc,
                                  **/*.tar,
                                  **/*.tgz,
                                  **/*.tif,
                                  **/*.tiff,
                                  **/*.xls,
                                  **/*.xlsx,
                                  .*/,
                                  **/.*/,
                                  **/3pp/,
                                  **/bin/,
                                  **/binary/,
                                  **/binaries/,
                                  **/external/,
                                  **/font/,
                                  **/fonts/,
                                  **/image/,
                                  **/images/,
                                  **/lib/,
                                  **/library/,
                                  **/libraries/,
                                  target/</excludes>
                        <!-- Location of suppressions file -->
                        <suppressionsLocation>${conventions-checkstyle-suppressions}</suppressionsLocation>
                        <suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
                    </configuration>
                    <executions>
                        <execution>
                            <id>validate-checks</id>
                            <phase>verify</phase>
                            <goals>
                                <goal>check</goal>
                            </goals>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.puppycrawl.tools</groupId>
                            <artifactId>checkstyle</artifactId>
                            <version>8.16</version>
                        </dependency>
                        <dependency>
                            <groupId>com.github.nruzic.commons.conventions</groupId>
                            <artifactId>nruzic-commons-conventions</artifactId>
                            <version>${version-nruzic-commons-conventions}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-enforcer-plugin</artifactId>
                    <version>1.4.1</version>
                    <executions>
                        <execution>
                            <id>enforce-property</id>
                            <goals>
                                <goal>enforce</goal>
                            </goals>
                            <configuration>
                                <rules>
                                    <requireProperty>
                                        <property>project-home</property>
                                        <message>You must have a
                                            project-home property
                                            defined!</message>
                                    </requireProperty>
                                    <requireProperty>
                                        <property>project-branch</property>
                                        <message>You must have a
                                            project-branch property
                                            defined!</message>
                                    </requireProperty>
                                    <requireProperty>
                                        <property>project.name</property>
                                        <message>Project name must be
                                            specified!</message>
                                        <regex>[\w\s\.\,\:\;\!\?\$\%\*\+\~\|\@\(\)\[\]]+</regex>
                                        <regexMessage>Project name must
                                            be space delimited lower
                                            case words.</regexMessage>
                                    </requireProperty>
                                    <requireProperty>
                                        <property>project.description</property>
                                        <message>Project description
                                            must be specified!</message>
                                    </requireProperty>
                                </rules>
                                <fail>true</fail>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code.formatter</groupId>
                    <artifactId>formatter-maven-plugin</artifactId>
                    <version>${version-formatter-maven-plugin}</version>
                    <configuration>
                        <configFile>${conventions-eclipse-formatter}</configFile>
                    </configuration>
                    <executions>
                        <execution>
                            <id>format-java-sources</id>
                            <goals>
                                <goal>format</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <directories>src/main/java,src/main/aspect</directories>
                            </configuration>
                        </execution>
                        <execution>
                            <id>format-java-test-sources</id>
                            <goals>
                                <goal>format</goal>
                            </goals>
                            <phase>process-test-sources</phase>
                            <configuration>
                                <directories>src/test/java,src/it/java</directories>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>com.github.nruzic.commons.conventions</groupId>
                            <artifactId>nruzic-commons-conventions</artifactId>
                            <version>${version-nruzic-commons-conventions}</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>net.revelc.code</groupId>
                    <artifactId>impsort-maven-plugin</artifactId>
                    <version>${version-impsort-maven-plugin}</version>
                    <configuration>
                        <removeUnused>true</removeUnused>
                        <!-- Non static groups -->
                        <groups>java,javax,com,hr,io,net,org</groups>
                        <!-- Static groups -->
                        <staticGroups>java,javax,com,hr,io,net,org</staticGroups>
                        <joinStaticWithNonStatic>false</joinStaticWithNonStatic>
                        <staticAfter>true</staticAfter>
                    </configuration>
                    <executions>
                        <execution>
                            <id>order-java-sources-imports</id>
                            <goals>
                                <goal>sort</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <directories>src/main/java,src/main/aspect</directories>
                            </configuration>
                        </execution>
                        <execution>
                            <id>order-java-test-sources-imports</id>
                            <goals>
                                <goal>sort</goal>
                            </goals>
                            <phase>process-test-sources</phase>
                            <configuration>
                                <directories>src/test/java,src/it/java</directories>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>com.webcohesion.enunciate</groupId>
                    <artifactId>enunciate-maven-plugin</artifactId>
                    <version>${version-enunciate-maven-plugin}</version>
                    <executions>
                        <execution>
                            <goals>
                                <goal>docs</goal>
                            </goals>
                            <phase>process-sources</phase>
                            <configuration>
                                <configFile>enunciate.xml</configFile>
                                <buildDir>${project.build.directory}/enunciate</buildDir>
                                <docsDir>${project.build.directory}/enunciate-docs</docsDir>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.codehaus.plexus</groupId>
                            <artifactId>plexus-utils</artifactId>
                            <version>${version-plexus-utils}</version>
                        </dependency>
                        <dependency>
                            <groupId>org.apache.maven.shared</groupId>
                            <artifactId>maven-filtering</artifactId>
                            <version>${version-maven-filtering}</version>
                            <classifier>patch1</classifier>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>io.github.swagger2markup</groupId>
                    <artifactId>swagger2markup-maven-plugin</artifactId>
                    <version>1.2.0</version>
                    <executions>
                        <execution>
                            <id>create-swagger-adoc</id>
                            <goals>
                                <goal>convertSwagger2markup</goal>
                            </goals>
                            <phase>generate-resources</phase>
                            <configuration>
                                <!-- CHECKSTYLE:OFF -->
                                <swaggerInput>${project.build.directory}/enunciate-docs/apidocs/ui/swagger.json</swaggerInput>
                                <outputFile>${project.build.directory}/doc/adoc/${project.build.finalName}-swagger</outputFile>
                                <!-- CHECKSTYLE:ON -->
                                <config>
                                    <swagger2markup.swaggerMarkupLanguage>HTML</swagger2markup.swaggerMarkupLanguage>
                                    <swagger2markup.markupLanguage>ASCIIDOC</swagger2markup.markupLanguage>
                                </config>
                            </configuration>
                        </execution>
                    </executions>
                </plugin>
                <plugin>
                    <groupId>org.asciidoctor</groupId>
                    <artifactId>asciidoctor-maven-plugin</artifactId>
                    <version>${version-asciidoctor-maven-plugin}</version>
                    <configuration>
                        <sourceDirectory>${project.basedir}/src/doc/adoc</sourceDirectory>
                        <relativeBaseDir>true</relativeBaseDir>
                        <preserveDirectories>true</preserveDirectories>
                        <doctype>book</doctype>
                        <headerFooter>true</headerFooter>
                        <sourceHighlighter>rouge</sourceHighlighter>
                        <attributes>
                            <!-- display table of content -->
                            <toc />
                            <!-- maximum section level to display -->
                            <toclevels>3</toclevels>
                            <!-- prefix used for auto-generated section IDs -->
                            <idprefix>_</idprefix>
                            <!-- word separator used in auto-generated section
                                IDs -->
                            <idseparator>_</idseparator>
                            <!-- numbers sections to depth specified by sectnumlevels -->
                            <sectnums>true</sectnums>
                            <!-- adds an anchor in front of the section title -->
                            <sectanchors />
                            <!-- chooses icons instead of text for admonitions -->
                            <icons>font</icons>
                            <!-- prefix added to chapter titles -->
                            <chapter-label />
                            <!-- media type of the output -->
                            <media>prepress</media>
                            <!-- version number of the document -->
                            <revnumber>${project-version}</revnumber>
                            <!-- date of document version -->
                            <revdate>${project-builddate}</revdate>
                            <!-- organization owning document -->
                            <organization>${project.organization.name}</organization>
                            <!-- ############################################################## -->
                            <!-- For custom content to the head or footer of an output document -->
                            <!-- ############################################################## -->
                            <!-- Specifies which docinfo files to apply -->
                            <docinfo>shared,private</docinfo>
                            <!-- Specifies docinfo files location -->
                            <docinfodir>${project.basedir}/src/doc/resources/html</docinfodir>
                            <!-- ################# -->
                            <!-- custom attributes -->
                            <!-- ################# -->
                            <_project-version>${project-version}</_project-version>
                            <_project-buildtime>${project-buildtime}</_project-buildtime>
                            <_project-builddate>${project-builddate}</_project-builddate>
                            <a-show-hints>${adoc-show-hints}</a-show-hints>
                        </attributes>
                        <requires>
                            <require>asciidoctor-diagram</require>
                        </requires>
                    </configuration>
                    <executions>
                        <execution>
                            <id>src-adoc-to-html</id>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <phase>process-test-resources</phase>
                            <configuration>
                                <backend>html</backend>
                                <outputDirectory>${project.build.directory}/doc/html</outputDirectory>
                                <attributes>
                                    <!-- display table of content -->
                                    <toc>left</toc>
                                </attributes>
                            </configuration>
                        </execution>
                        <execution>
                            <id>src-adoc-to-pdf</id>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <phase>process-test-resources</phase>
                            <configuration>
                                <backend>pdf</backend>
                                <outputDirectory>${project.build.directory}/doc/pdf</outputDirectory>
                                <attributes>
                                    <pdf-stylesdir>${project.basedir}/src/doc/resources/themes</pdf-stylesdir>
                                    <pdf-style>default</pdf-style>
                                    <pdf-fontsdir>${project.basedir}/src/doc/resources/fonts</pdf-fontsdir>
                                </attributes>
                            </configuration>
                        </execution>
                        <execution>
                            <id>generated-adoc-to-html</id>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <phase>process-test-resources</phase>
                            <configuration>
                                <backend>html</backend>
                                <sourceDirectory>${project.build.directory}/doc/adoc</sourceDirectory>
                                <outputDirectory>${project.build.directory}/doc/html</outputDirectory>
                                <attributes>
                                    <!-- display table of content -->
                                    <toc>left</toc>
                                </attributes>
                            </configuration>
                        </execution>
                        <execution>
                            <id>generated-adoc-to-pdf</id>
                            <goals>
                                <goal>process-asciidoc</goal>
                            </goals>
                            <phase>process-test-resources</phase>
                            <configuration>
                                <backend>pdf</backend>
                                <sourceDirectory>${project.build.directory}/doc/adoc</sourceDirectory>
                                <outputDirectory>${project.build.directory}/doc/pdf</outputDirectory>
                                <attributes>
                                    <pdf-stylesdir>${project.basedir}/src/doc/resources/themes</pdf-stylesdir>
                                    <pdf-style>default</pdf-style>
                                    <pdf-fontsdir>${project.basedir}/src/doc/resources/fonts</pdf-fontsdir>
                                </attributes>
                            </configuration>
                        </execution>
                    </executions>
                    <dependencies>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj-pdf</artifactId>
                            <version>1.5.0-alpha.16</version>
                        </dependency>
                        <!-- Override the default jruby artifact provided
                            by the plugin -->
                        <dependency>
                            <groupId>org.jruby</groupId>
                            <artifactId>jruby-complete</artifactId>
                            <version>9.1.17.0</version>
                        </dependency>
                        <!-- Comment this section to use the default AsciidoctorJ artifact provided
                            by the plugin -->
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj</artifactId>
                            <version>1.5.7</version>
                        </dependency>
                        <dependency>
                            <groupId>org.asciidoctor</groupId>
                            <artifactId>asciidoctorj-diagram</artifactId>
                            <version>1.5.10</version>
                        </dependency>
                    </dependencies>
                </plugin>
                <plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-gpg-plugin</artifactId>
                    <version>${version-maven-gpg-plugin}</version>
                    <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>
                    <version>${version-nexus-staging-maven-plugin}</version>
                    <extensions>true</extensions>
                    <configuration>
                        <serverId>${distribution-repository-releases-id}</serverId>
                        <nexusUrl>https://oss.sonatype.org/</nexusUrl>
                        <autoReleaseAfterClose>true</autoReleaseAfterClose>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-enforcer-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-failsafe-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

    <reporting>
        <excludeDefaults>false</excludeDefaults>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-project-info-reports-plugin</artifactId>
                <version>${version-maven-project-info-reports-plugin}</version>
                <configuration>
                    <dependencyDetailsEnabled>false</dependencyDetailsEnabled>
                    <dependencyLocationsEnabled>false</dependencyLocationsEnabled>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${version-maven-checkstyle-plugin}</version>
                <configuration>
                    <configLocation>${conventions-checkstyle-config}</configLocation>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>${version-maven-javadoc-plugin}</version>
                <configuration>
                    <!-- Default configuration for all reports -->
                    <outputDirectory>${project.build.directory}/javadocs</outputDirectory>
                    <reportOutputDirectory>${project.reporting.outputDirectory}/javadocs</reportOutputDirectory>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <configuration>
                            <!-- Specific configuration for the given reports -->
                        </configuration>
                        <reports>
                            <report>javadoc-no-fork</report>
                            <report>test-javadoc-no-fork</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>${version-maven-jxr-plugin}</version>
                <configuration>
                    <javadocDir>${project.reporting.outputDirectory}/javadocs</javadocDir>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>default</id>
                        <reports>
                            <report>jxr</report>
                            <report>test-jxr</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>${version-maven-surefire-report-plugin}</version>
                <configuration>
                    <alwaysGenerateSurefireReport>true</alwaysGenerateSurefireReport>
                    <alwaysGenerateFailsafeReport>true</alwaysGenerateFailsafeReport>
                </configuration>
                <reportSets>
                    <reportSet>
                        <id>unit-tests</id>
                        <reports>
                            <report>report-only</report>
                        </reports>
                    </reportSet>
                    <reportSet>
                        <id>integration-tests</id>
                        <reports>
                            <report>failsafe-report-only</report>
                        </reports>
                    </reportSet>
                </reportSets>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>taglist-maven-plugin</artifactId>
                <version>${version-taglist-maven-plugin}</version>
                <configuration>
                    <aggregate>true</aggregate>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changelog-plugin</artifactId>
                <version>${version-maven-changelog-plugin}</version>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-changes-plugin</artifactId>
                <version>${version-maven-changes-plugin}</version>
                <inherited>false</inherited>
                <configuration>
                    <useJql>true</useJql>
                    <webUser>foo</webUser>
                    <webPassword>bar</webPassword>
                    <onlyCurrentVersion>true</onlyCurrentVersion>
                    <columnNames>Component,Type,Key,Summary,Status,Resolution,Fix
                        Version</columnNames>
                    <sortColumnNames>Component ASC,Type ASC,Key DESC</sortColumnNames>
                    <resolutionIds>Fixed</resolutionIds>
                    <statusIds>Closed</statusIds>
                    <typeIds>Bug,New Feature,Improvement</typeIds>
                    <!-- <filter>project = MSE AND issuetype in (Bug, Improvement,
                        "New Feature") AND resolution = Fixed AND status = Closed</filter> -->
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.webcohesion.enunciate</groupId>
                <artifactId>enunciate-maven-plugin</artifactId>
                <version>${version-enunciate-maven-plugin}</version>
                <configuration>
                    <!-- The subdirectory of the site where the documentation
                        will be put. -->
                    <!-- Note that if this isn't set, the documentation will
                        overwrite apidocs location on the site which is used by the javadoc plugin. -->
                    <docsSubdir>enunciatedocs</docsSubdir>
                </configuration>
            </plugin>
        </plugins>
    </reporting>

    <profiles>
        <!-- ============================================ -->
        <!--    Custom repositories profile definition    -->
        <!-- ============================================ -->
        <profile>
            <id>custom-repositories-foo</id>
            <repositories>
                <repository>
                    <name>repository-releases</name>
                    <id>repository-releases-foo</id>
                    <url>https://repo.foo.com/artifactory/libs-release-local</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <name>repository-snapshots</name>
                    <id>repository-snapshots-foo</id>
                    <url>https://repo.foo.com/artifactory/libs-snapshot-local</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <name>repository-proxy</name>
                    <id>repository-proxy-foo</id>
                    <url>https://repo.foo.com/artifactory/all</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </repository>
                <repository>
                    <name>repository-archetype</name>
                    <id>archetype</id>
                    <url>https://repo.foo.com/artifactory/archetype-local</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </repository>
            </repositories>
            <pluginRepositories>
                <pluginRepository>
                    <name>plugin-repository-releases</name>
                    <id>plugin-repository-releases-foo</id>
                    <url>https://repo.foo.com/artifactory/plugins-release</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <name>plugin-repository-snapshots</name>
                    <id>plugin-repository-snapshots-foo</id>
                    <url>https://repo.foo.com/artifactory/plugins-snapshot</url>
                    <releases>
                        <enabled>false</enabled>
                    </releases>
                    <snapshots>
                        <enabled>true</enabled>
                    </snapshots>
                </pluginRepository>
                <pluginRepository>
                    <name>plugin-repository-proxy</name>
                    <id>plugin-repository-proxy-foo</id>
                    <url>https://repo.foo.com/artifactory/all</url>
                    <releases>
                        <enabled>true</enabled>
                    </releases>
                    <snapshots>
                        <enabled>false</enabled>
                    </snapshots>
                </pluginRepository>
            </pluginRepositories>
        </profile>
        <!-- =============================== -->
        <!-- Mandatory release tasks profile -->
        <!-- =============================== -->
        <profile>
            <id>releaseTasks</id>
            <activation>
                <property>
                    <name>releaseTasks</name>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-source-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-javadoc-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.asciidoctor</groupId>
                        <artifactId>asciidoctor-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-assembly-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>org.sonatype.plugins</groupId>
                        <artifactId>nexus-staging-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <!-- https://openjdk.java.net/jeps/172 -->
            <id>javadoc-doclint-disabled</id>
            <activation>
                <property>
                    <name>noJavadocChecks</name>
                </property>
            </activation>
            <properties>
                <javadoc-doclint>none</javadoc-doclint>
            </properties>
        </profile>

        <profile>
            <id>clean-config</id>
            <activation>
                <property>
                    <name>cleanConfig</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <artifactId>maven-resources-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>copy-resources-2-project-home</id>
                                    <phase>process-resources</phase>
                                    <goals>
                                        <goal>copy-resources</goal>
                                    </goals>
                                    <configuration>
                                        <outputDirectory>${project-home}/config</outputDirectory>
                                        <resources>
                                            <resource>
                                                <directory>src/main/config</directory>
                                                <filtering>true</filtering>
                                                <includes>
                                                    <include>**/*.properties</include>
                                                    <include>**/*.cfg</include>
                                                    <include>**/*.xml</include>
                                                    <include>**/*.txt</include>
                                                </includes>
                                            </resource>
                                            <resource>
                                                <directory>src/main/config</directory>
                                                <filtering>false</filtering>
                                                <excludes>
                                                    <exclude>**/*.properties</exclude>
                                                    <exclude>**/*.cfg</exclude>
                                                    <exclude>**/*.xml</exclude>
                                                    <exclude>**/*.txt</exclude>
                                                </excludes>
                                            </resource>
                                            <resource>
                                                <directory>src/test/config</directory>
                                                <filtering>true</filtering>
                                                <includes>
                                                    <include>**/*.properties</include>
                                                    <include>**/*.cfg</include>
                                                    <include>**/*.xml</include>
                                                    <include>**/*.txt</include>
                                                </includes>
                                            </resource>
                                            <resource>
                                                <directory>src/test/config</directory>
                                                <filtering>false</filtering>
                                                <excludes>
                                                    <exclude>**/*.properties</exclude>
                                                    <exclude>**/*.cfg</exclude>
                                                    <exclude>**/*.xml</exclude>
                                                    <exclude>**/*.txt</exclude>
                                                </excludes>
                                            </resource>
                                            <resource>
                                                <directory>src/it/config</directory>
                                                <filtering>true</filtering>
                                                <includes>
                                                    <include>**/*.properties</include>
                                                    <include>**/*.cfg</include>
                                                    <include>**/*.xml</include>
                                                    <include>**/*.txt</include>
                                                </includes>
                                            </resource>
                                            <resource>
                                                <directory>src/it/config</directory>
                                                <filtering>false</filtering>
                                                <excludes>
                                                    <exclude>**/*.properties</exclude>
                                                    <exclude>**/*.cfg</exclude>
                                                    <exclude>**/*.xml</exclude>
                                                    <exclude>**/*.txt</exclude>
                                                </excludes>
                                            </resource>
                                        </resources>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>remove-project-home-dir</id>
                                    <phase>clean</phase>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <configuration>
                                        <target>
                                            <!-- Delete build home directory -->
                                            <delete dir="${project-home}" />
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>create-project-home-dir</id>
                                    <phase>initialize</phase>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <configuration>
                                        <target>
                                            <!-- Create build home directory -->
                                            <mkdir dir="${project-home}" />
                                        </target>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>buildEnv-localhost</id>
            <activation>
                <property>
                    <name>buildEnv</name>
                    <value>localhost</value>
                </property>
            </activation>
            <properties>
                <!-- distribution site definition -->
                <distribution-site-read-url>file://${user.home}/maven-site/${project-branch}/${project-name}/${project-version}</distribution-site-read-url>
                <distribution-site-write-url>file://${user.home}/maven-site/${project-branch}/${project-name}/${project-version}</distribution-site-write-url>
            </properties>
            <build>
                <filters>
                    <filter>${project.basedir}/src/main/filters/build-localhost.properties</filter>
                    <filter>${project.basedir}/src/test/filters/build-localhost.properties</filter>
                    <filter>${project.basedir}/src/it/filters/build-localhost.properties</filter>
                </filters>
            </build>
        </profile>

        <profile>
            <id>buildEnv-jenkins</id>
            <activation>
                <property>
                    <name>buildEnv</name>
                    <value>jenkins</value>
                </property>
            </activation>
            <build>
                <filters>
                    <filter>${project.basedir}/src/main/filters/build-jenkins.properties</filter>
                    <filter>${project.basedir}/src/test/filters/build-jenkins.properties</filter>
                    <filter>${project.basedir}/src/it/filters/build-jenkins.properties</filter>
                </filters>
            </build>
            <properties>
                <!-- SonarQube parameters -->
                <sonar.host.url>${env.SONAR_HOST_URL}</sonar.host.url>
                <!-- Password based authentication -->
                <!-- <sonar.login>${env.SONAR_LOGIN}</sonar.login> -->
                <!-- <sonar.password>${env.SONAR_PASSWORD}</sonar.password> -->
                <!-- Token based authentication -->
                <sonar.login>${SONAR_AUTH_TOKEN}</sonar.login>
                <sonar.password />
            </properties>
        </profile>

        <profile>
            <id>formatting-profile</id>
            <activation>
                <property>
                    <name>doFormatting</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-antrun-plugin</artifactId>
                            <executions>
                                <!-- Trim spaces at end of line -->
                                <execution>
                                    <id>trim-spaces-on-project-base-files</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-sources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}" erroronmissingdir="false">
                                                    <include name="*" />
                                                    <exclude name=".*" />
                                                    <exclude name="*.asc" />
                                                    <exclude name="*.doc" />
                                                    <exclude name="*.docx" />
                                                    <exclude name="*.exe" />
                                                    <exclude name="*.gif" />
                                                    <exclude name="*.gz" />
                                                    <exclude name="*.ico" />
                                                    <exclude name="*.jar" />
                                                    <exclude name="*.jpg" />
                                                    <exclude name="*.jpeg" />
                                                    <exclude name="*.key" />
                                                    <exclude name="*.min.js" />
                                                    <exclude name="*.pdf" />
                                                    <exclude name="*.png" />
                                                    <exclude name="*.swc" />
                                                    <exclude name="*.tar" />
                                                    <exclude name="*.tgz" />
                                                    <exclude name="*.tif" />
                                                    <exclude name="*.tiff" />
                                                    <exclude name="*.xls" />
                                                    <exclude name="*.xlsx" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-main-sources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-sources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src/main" erroronmissingdir="false">
                                                    <include name="java/**/*" />
                                                    <include name="aspect/**/*" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-main-resources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-resources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src/main" erroronmissingdir="false">
                                                    <include name="**/*" />
                                                    <exclude name="**/*.asc" />
                                                    <exclude name="**/*.doc" />
                                                    <exclude name="**/*.docx" />
                                                    <exclude name="**/*.exe" />
                                                    <exclude name="**/*.gif" />
                                                    <exclude name="**/*.gz" />
                                                    <exclude name="**/*.ico" />
                                                    <exclude name="**/*.jar" />
                                                    <exclude name="**/*.jpg" />
                                                    <exclude name="**/*.jpeg" />
                                                    <exclude name="**/*.key" />
                                                    <exclude name="**/*.min.js" />
                                                    <exclude name="**/*.pdf" />
                                                    <exclude name="**/*.png" />
                                                    <exclude name="**/*.swc" />
                                                    <exclude name="**/*.tar" />
                                                    <exclude name="**/*.tgz" />
                                                    <exclude name="**/*.tif" />
                                                    <exclude name="**/*.tiff" />
                                                    <exclude name="**/*.xls" />
                                                    <exclude name="**/*.xlsx" />
                                                    <exclude name="**/.*/" />
                                                    <exclude name="**/3pp/" />
                                                    <exclude name="**/aspect/" />
                                                    <exclude name="**/bin/" />
                                                    <exclude name="**/binary/" />
                                                    <exclude name="**/binaries/" />
                                                    <exclude name="**/external/" />
                                                    <exclude name="**/font/" />
                                                    <exclude name="**/fonts/" />
                                                    <exclude name="**/image/" />
                                                    <exclude name="**/images/" />
                                                    <exclude name="**/.images/" />
                                                    <exclude name="**/java/" />
                                                    <exclude name="**/lib/" />
                                                    <exclude name="**/library/" />
                                                    <exclude name="**/libraries/" />
                                                    <exclude name="**/.libraries/" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-test-sources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-sources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src/test" erroronmissingdir="false">
                                                    <include name="java/**/*" />
                                                    <include name="aspect/**/*" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-test-resources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-resources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src/test" erroronmissingdir="false">
                                                    <include name="**/*" />
                                                    <exclude name="**/*.asc" />
                                                    <exclude name="**/*.doc" />
                                                    <exclude name="**/*.docx" />
                                                    <exclude name="**/*.exe" />
                                                    <exclude name="**/*.gif" />
                                                    <exclude name="**/*.gz" />
                                                    <exclude name="**/*.ico" />
                                                    <exclude name="**/*.jar" />
                                                    <exclude name="**/*.jpg" />
                                                    <exclude name="**/*.jpeg" />
                                                    <exclude name="**/*.key" />
                                                    <exclude name="**/*.min.js" />
                                                    <exclude name="**/*.pdf" />
                                                    <exclude name="**/*.png" />
                                                    <exclude name="**/*.swc" />
                                                    <exclude name="**/*.tar" />
                                                    <exclude name="**/*.tgz" />
                                                    <exclude name="**/*.tif" />
                                                    <exclude name="**/*.tiff" />
                                                    <exclude name="**/*.xls" />
                                                    <exclude name="**/*.xlsx" />
                                                    <exclude name="**/.*/" />
                                                    <exclude name="**/3pp/" />
                                                    <exclude name="**/aspect/" />
                                                    <exclude name="**/bin/" />
                                                    <exclude name="**/binary/" />
                                                    <exclude name="**/binaries/" />
                                                    <exclude name="**/external/" />
                                                    <exclude name="**/font/" />
                                                    <exclude name="**/fonts/" />
                                                    <exclude name="**/image/" />
                                                    <exclude name="**/images/" />
                                                    <exclude name="**/.images/" />
                                                    <exclude name="**/java/" />
                                                    <exclude name="**/lib/" />
                                                    <exclude name="**/library/" />
                                                    <exclude name="**/libraries/" />
                                                    <exclude name="**/.libraries/" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-it-sources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-sources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src/it" erroronmissingdir="false">
                                                    <include name="java/**/*" />
                                                    <include name="aspect/**/*" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-it-resources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-resources</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src/it" erroronmissingdir="false">
                                                    <include name="**/*" />
                                                    <exclude name="**/*.asc" />
                                                    <exclude name="**/*.doc" />
                                                    <exclude name="**/*.docx" />
                                                    <exclude name="**/*.exe" />
                                                    <exclude name="**/*.gif" />
                                                    <exclude name="**/*.gz" />
                                                    <exclude name="**/*.ico" />
                                                    <exclude name="**/*.jar" />
                                                    <exclude name="**/*.jpg" />
                                                    <exclude name="**/*.jpeg" />
                                                    <exclude name="**/*.key" />
                                                    <exclude name="**/*.min.js" />
                                                    <exclude name="**/*.pdf" />
                                                    <exclude name="**/*.png" />
                                                    <exclude name="**/*.swc" />
                                                    <exclude name="**/*.tar" />
                                                    <exclude name="**/*.tgz" />
                                                    <exclude name="**/*.tif" />
                                                    <exclude name="**/*.tiff" />
                                                    <exclude name="**/*.xls" />
                                                    <exclude name="**/*.xlsx" />
                                                    <exclude name="**/.*/" />
                                                    <exclude name="**/3pp/" />
                                                    <exclude name="**/aspect/" />
                                                    <exclude name="**/bin/" />
                                                    <exclude name="**/binary/" />
                                                    <exclude name="**/binaries/" />
                                                    <exclude name="**/external/" />
                                                    <exclude name="**/font/" />
                                                    <exclude name="**/fonts/" />
                                                    <exclude name="**/image/" />
                                                    <exclude name="**/images/" />
                                                    <exclude name="**/.images/" />
                                                    <exclude name="**/java/" />
                                                    <exclude name="**/lib/" />
                                                    <exclude name="**/library/" />
                                                    <exclude name="**/libraries/" />
                                                    <exclude name="**/.libraries/" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>trim-spaces-on-remaining-src-files</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>prepare-package</phase>
                                    <configuration>
                                        <target>
                                            <replaceregexp match="\s+$" replace="" byline="true" encoding="UTF-8">
                                                <fileset dir="${project.basedir}/src" erroronmissingdir="false">
                                                    <include name="**/*" />
                                                    <exclude name="it/**/*" />
                                                    <exclude name="main/**/*" />
                                                    <exclude name="test/**/*" />
                                                    <exclude name="**/*.asc" />
                                                    <exclude name="**/*.doc" />
                                                    <exclude name="**/*.docx" />
                                                    <exclude name="**/*.exe" />
                                                    <exclude name="**/*.gif" />
                                                    <exclude name="**/*.gz" />
                                                    <exclude name="**/*.ico" />
                                                    <exclude name="**/*.jar" />
                                                    <exclude name="**/*.jpg" />
                                                    <exclude name="**/*.jpeg" />
                                                    <exclude name="**/*.key" />
                                                    <exclude name="**/*.min.js" />
                                                    <exclude name="**/*.pdf" />
                                                    <exclude name="**/*.png" />
                                                    <exclude name="**/*.swc" />
                                                    <exclude name="**/*.tar" />
                                                    <exclude name="**/*.tgz" />
                                                    <exclude name="**/*.tif" />
                                                    <exclude name="**/*.tiff" />
                                                    <exclude name="**/*.xls" />
                                                    <exclude name="**/*.xlsx" />
                                                    <exclude name="**/.*/" />
                                                    <exclude name="**/3pp/" />
                                                    <exclude name="**/aspect/" />
                                                    <exclude name="**/bin/" />
                                                    <exclude name="**/binary/" />
                                                    <exclude name="**/binaries/" />
                                                    <exclude name="**/external/" />
                                                    <exclude name="**/font/" />
                                                    <exclude name="**/fonts/" />
                                                    <exclude name="**/image/" />
                                                    <exclude name="**/images/" />
                                                    <exclude name="**/.images/" />
                                                    <exclude name="**/java/" />
                                                    <exclude name="**/lib/" />
                                                    <exclude name="**/library/" />
                                                    <exclude name="**/libraries/" />
                                                    <exclude name="**/.libraries/" />
                                                </fileset>
                                            </replaceregexp>
                                        </target>
                                    </configuration>
                                </execution>
                                <!-- Add missing new line at the end of a file -->
                                <execution>
                                    <id>fix-eol-on-project-base-files</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-sources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true">
                                                <patternset>
                                                    <include name="*" />
                                                    <exclude name=".*" />
                                                    <exclude name="*.asc" />
                                                    <exclude name="*.bat" />
                                                    <exclude name="*.bsh" />
                                                    <exclude name="*.doc" />
                                                    <exclude name="*.docx" />
                                                    <exclude name="*.exe" />
                                                    <exclude name="*.gif" />
                                                    <exclude name="*.gz" />
                                                    <exclude name="*.ico" />
                                                    <exclude name="*.jar" />
                                                    <exclude name="*.jpg" />
                                                    <exclude name="*.jpeg" />
                                                    <exclude name="*.key" />
                                                    <exclude name="*.min.js" />
                                                    <exclude name="*.pdf" />
                                                    <exclude name="*.png" />
                                                    <exclude name="*.sh" />
                                                    <exclude name="*.swc" />
                                                    <exclude name="*.tar" />
                                                    <exclude name="*.tgz" />
                                                    <exclude name="*.tif" />
                                                    <exclude name="*.tiff" />
                                                    <exclude name="*.xls" />
                                                    <exclude name="*.xlsx" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="lf">
                                                <patternset>
                                                    <include name="*.bsh" />
                                                    <include name="*.sh" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="crlf">
                                                <patternset>
                                                    <include name="*.bat" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-main-sources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-sources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" javafiles="yes">
                                                <patternset>
                                                    <include name="src/main/**/*.java" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-main-resources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-resources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true">
                                                <patternset>
                                                    <include name="src/main/**/*" />
                                                    <exclude name="src/main/**/*.asc" />
                                                    <exclude name="src/main/**/*.bat" />
                                                    <exclude name="src/main/**/*.bsh" />
                                                    <exclude name="src/main/**/*.doc" />
                                                    <exclude name="src/main/**/*.docx" />
                                                    <exclude name="src/main/**/*.exe" />
                                                    <exclude name="src/main/**/*.gif" />
                                                    <exclude name="src/main/**/*.gz" />
                                                    <exclude name="src/main/**/*.ico" />
                                                    <exclude name="src/main/**/*.jar" />
                                                    <exclude name="src/main/**/*.java" />
                                                    <exclude name="src/main/**/*.jpg" />
                                                    <exclude name="src/main/**/*.jpeg" />
                                                    <exclude name="src/main/**/*.key" />
                                                    <exclude name="src/main/**/*.min.js" />
                                                    <exclude name="src/main/**/*.pdf" />
                                                    <exclude name="src/main/**/*.png" />
                                                    <exclude name="src/main/**/*.sh" />
                                                    <exclude name="src/main/**/*.swc" />
                                                    <exclude name="src/main/**/*.tar" />
                                                    <exclude name="src/main/**/*.tgz" />
                                                    <exclude name="src/main/**/*.tif" />
                                                    <exclude name="src/main/**/*.tiff" />
                                                    <exclude name="src/main/**/*.xls" />
                                                    <exclude name="src/main/**/*.xlsx" />
                                                    <exclude name="src/main/**/.*/" />
                                                    <exclude name="src/main/**/3pp/" />
                                                    <exclude name="src/main/**/aspect/" />
                                                    <exclude name="src/main/**/bin/" />
                                                    <exclude name="src/main/**/binary/" />
                                                    <exclude name="src/main/**/binaries/" />
                                                    <exclude name="src/main/**/external/" />
                                                    <exclude name="src/main/**/font/" />
                                                    <exclude name="src/main/**/fonts/" />
                                                    <exclude name="src/main/**/image/" />
                                                    <exclude name="src/main/**/images/" />
                                                    <exclude name="src/main/**/.images/" />
                                                    <exclude name="src/main/**/java/" />
                                                    <exclude name="src/main/**/lib/" />
                                                    <exclude name="src/main/**/library/" />
                                                    <exclude name="src/main/**/libraries/" />
                                                    <exclude name="src/main/**/.libraries/" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="lf">
                                                <patternset>
                                                    <include name="src/main/**/*.bsh" />
                                                    <include name="src/main/**/*.sh" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="crlf">
                                                <patternset>
                                                    <include name="src/main/**/*.bat" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-test-sources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-sources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" javafiles="yes">
                                                <patternset>
                                                    <include name="src/test/**/*.java" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-test-resources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-resources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true">
                                                <patternset>
                                                    <include name="src/test/**/*" />
                                                    <exclude name="src/test/**/*.asc" />
                                                    <exclude name="src/test/**/*.bat" />
                                                    <exclude name="src/test/**/*.bsh" />
                                                    <exclude name="src/test/**/*.doc" />
                                                    <exclude name="src/test/**/*.docx" />
                                                    <exclude name="src/test/**/*.exe" />
                                                    <exclude name="src/test/**/*.gif" />
                                                    <exclude name="src/test/**/*.gz" />
                                                    <exclude name="src/test/**/*.ico" />
                                                    <exclude name="src/test/**/*.jar" />
                                                    <exclude name="src/test/**/*.java" />
                                                    <exclude name="src/test/**/*.jpg" />
                                                    <exclude name="src/test/**/*.jpeg" />
                                                    <exclude name="src/test/**/*.key" />
                                                    <exclude name="src/test/**/*.min.js" />
                                                    <exclude name="src/test/**/*.pdf" />
                                                    <exclude name="src/test/**/*.png" />
                                                    <exclude name="src/test/**/*.sh" />
                                                    <exclude name="src/test/**/*.swc" />
                                                    <exclude name="src/test/**/*.tar" />
                                                    <exclude name="src/test/**/*.tgz" />
                                                    <exclude name="src/test/**/*.tif" />
                                                    <exclude name="src/test/**/*.tiff" />
                                                    <exclude name="src/test/**/*.xls" />
                                                    <exclude name="src/test/**/*.xlsx" />
                                                    <exclude name="src/test/**/.*/" />
                                                    <exclude name="src/test/**/3pp/" />
                                                    <exclude name="src/test/**/aspect/" />
                                                    <exclude name="src/test/**/bin/" />
                                                    <exclude name="src/test/**/binary/" />
                                                    <exclude name="src/test/**/binaries/" />
                                                    <exclude name="src/test/**/external/" />
                                                    <exclude name="src/test/**/font/" />
                                                    <exclude name="src/test/**/fonts/" />
                                                    <exclude name="src/test/**/image/" />
                                                    <exclude name="src/test/**/images/" />
                                                    <exclude name="src/test/**/.images/" />
                                                    <exclude name="src/test/**/java/" />
                                                    <exclude name="src/test/**/lib/" />
                                                    <exclude name="src/test/**/library/" />
                                                    <exclude name="src/test/**/libraries/" />
                                                    <exclude name="src/test/**/.libraries/" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="lf">
                                                <patternset>
                                                    <include name="src/test/**/*.bsh" />
                                                    <include name="src/test/**/*.sh" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="crlf">
                                                <patternset>
                                                    <include name="src/test/**/*.bat" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-it-sources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-sources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" javafiles="yes">
                                                <patternset>
                                                    <include name="src/it/**/*.java" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-it-resources</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>process-test-resources</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true">
                                                <patternset>
                                                    <include name="src/it/**/*" />
                                                    <exclude name="src/it/**/*.asc" />
                                                    <exclude name="src/it/**/*.bat" />
                                                    <exclude name="src/it/**/*.bsh" />
                                                    <exclude name="src/it/**/*.doc" />
                                                    <exclude name="src/it/**/*.docx" />
                                                    <exclude name="src/it/**/*.exe" />
                                                    <exclude name="src/it/**/*.gif" />
                                                    <exclude name="src/it/**/*.gz" />
                                                    <exclude name="src/it/**/*.ico" />
                                                    <exclude name="src/it/**/*.jar" />
                                                    <exclude name="src/it/**/*.java" />
                                                    <exclude name="src/it/**/*.jpg" />
                                                    <exclude name="src/it/**/*.jpeg" />
                                                    <exclude name="src/it/**/*.key" />
                                                    <exclude name="src/it/**/*.min.js" />
                                                    <exclude name="src/it/**/*.pdf" />
                                                    <exclude name="src/it/**/*.png" />
                                                    <exclude name="src/it/**/*.sh" />
                                                    <exclude name="src/it/**/*.swc" />
                                                    <exclude name="src/it/**/*.tar" />
                                                    <exclude name="src/it/**/*.tgz" />
                                                    <exclude name="src/it/**/*.tif" />
                                                    <exclude name="src/it/**/*.tiff" />
                                                    <exclude name="src/it/**/*.xls" />
                                                    <exclude name="src/it/**/*.xlsx" />
                                                    <exclude name="src/it/**/.*/" />
                                                    <exclude name="src/it/**/3pp/" />
                                                    <exclude name="src/it/**/aspect/" />
                                                    <exclude name="src/it/**/bin/" />
                                                    <exclude name="src/it/**/binary/" />
                                                    <exclude name="src/it/**/binaries/" />
                                                    <exclude name="src/it/**/external/" />
                                                    <exclude name="src/it/**/font/" />
                                                    <exclude name="src/it/**/fonts/" />
                                                    <exclude name="src/it/**/image/" />
                                                    <exclude name="src/it/**/images/" />
                                                    <exclude name="src/it/**/.images/" />
                                                    <exclude name="src/it/**/java/" />
                                                    <exclude name="src/it/**/lib/" />
                                                    <exclude name="src/it/**/library/" />
                                                    <exclude name="src/it/**/libraries/" />
                                                    <exclude name="src/it/**/.libraries/" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="lf">
                                                <patternset>
                                                    <include name="src/it/**/*.bsh" />
                                                    <include name="src/it/**/*.sh" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="crlf">
                                                <patternset>
                                                    <include name="src/it/**/*.bat" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>fix-eol-on-remaining-src-files</id>
                                    <goals>
                                        <goal>run</goal>
                                    </goals>
                                    <phase>prepare-package</phase>
                                    <configuration>
                                        <target>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true">
                                                <patternset>
                                                    <include name="src/**/*" />
                                                    <exclude name="src/it/" />
                                                    <exclude name="src/main/" />
                                                    <exclude name="src/test/" />
                                                    <exclude name="src/**/*.asc" />
                                                    <exclude name="src/**/*.bat" />
                                                    <exclude name="src/**/*.bsh" />
                                                    <exclude name="src/**/*.doc" />
                                                    <exclude name="src/**/*.docx" />
                                                    <exclude name="src/**/*.exe" />
                                                    <exclude name="src/**/*.gif" />
                                                    <exclude name="src/**/*.gz" />
                                                    <exclude name="src/**/*.ico" />
                                                    <exclude name="src/**/*.jar" />
                                                    <exclude name="src/**/*.java" />
                                                    <exclude name="src/**/*.jpg" />
                                                    <exclude name="src/**/*.jpeg" />
                                                    <exclude name="src/**/*.key" />
                                                    <exclude name="src/**/*.min.js" />
                                                    <exclude name="src/**/*.pdf" />
                                                    <exclude name="src/**/*.png" />
                                                    <exclude name="src/**/*.sh" />
                                                    <exclude name="src/**/*.swc" />
                                                    <exclude name="src/**/*.tar" />
                                                    <exclude name="src/**/*.tgz" />
                                                    <exclude name="src/**/*.tif" />
                                                    <exclude name="src/**/*.tiff" />
                                                    <exclude name="src/**/*.xls" />
                                                    <exclude name="src/**/*.xlsx" />
                                                    <exclude name="src/**/.*/" />
                                                    <exclude name="src/**/3pp/" />
                                                    <exclude name="src/**/aspect/" />
                                                    <exclude name="src/**/bin/" />
                                                    <exclude name="src/**/binary/" />
                                                    <exclude name="src/**/binaries/" />
                                                    <exclude name="src/**/external/" />
                                                    <exclude name="src/**/font/" />
                                                    <exclude name="src/**/fonts/" />
                                                    <exclude name="src/**/image/" />
                                                    <exclude name="src/**/images/" />
                                                    <exclude name="src/**/.images/" />
                                                    <exclude name="src/**/java/" />
                                                    <exclude name="src/**/lib/" />
                                                    <exclude name="src/**/library/" />
                                                    <exclude name="src/**/libraries/" />
                                                    <exclude name="src/**/.libraries/" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="lf">
                                                <patternset>
                                                    <include name="src/**/*.bsh" />
                                                    <include name="src/**/*.sh" />
                                                    <exclude name="src/it/" />
                                                    <exclude name="src/main/" />
                                                    <exclude name="src/test/" />
                                                </patternset>
                                            </fixcrlf>
                                            <fixcrlf srcdir="${project.basedir}" encoding="UTF-8" outputencoding="UTF-8" tab="remove" tablength="4" fixlast="true" eol="crlf">
                                                <patternset>
                                                    <include name="src/**/*.bat" />
                                                    <exclude name="src/it/" />
                                                    <exclude name="src/main/" />
                                                    <exclude name="src/test/" />
                                                </patternset>
                                            </fixcrlf>
                                        </target>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-antrun-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code.formatter</groupId>
                        <artifactId>formatter-maven-plugin</artifactId>
                    </plugin>
                    <plugin>
                        <groupId>net.revelc.code</groupId>
                        <artifactId>impsort-maven-plugin</artifactId>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>alternative-deployment</id>
            <activation>
                <property>
                    <name>alternativeDeployment</name>
                </property>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-deploy-plugin</artifactId>
                            <configuration>
                                <altSnapshotDeploymentRepository>local-repository::file://${settings.localRepository}</altSnapshotDeploymentRepository>
                                <altReleaseDeploymentRepository>local-repository::file://${settings.localRepository}</altReleaseDeploymentRepository>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>alternative-deployment-aggregators</id>
            <activation>
                <property>
                    <name>alternativeDeploymentAggregators</name>
                </property>
                <file>
                    <exists>.aggregator</exists>
                </file>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-deploy-plugin</artifactId>
                            <configuration>
                                <altSnapshotDeploymentRepository>local-repository::file://${settings.localRepository}</altSnapshotDeploymentRepository>
                                <altReleaseDeploymentRepository>local-repository::file://${settings.localRepository}</altReleaseDeploymentRepository>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>alternative-deployment-non-aggregators</id>
            <activation>
                <property>
                    <name>alternativeDeploymentNonAggregators</name>
                </property>
                <file>
                    <missing>.aggregator</missing>
                </file>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-deploy-plugin</artifactId>
                            <configuration>
                                <altSnapshotDeploymentRepository>local-repository::file://${settings.localRepository}</altSnapshotDeploymentRepository>
                                <altReleaseDeploymentRepository>local-repository::file://${settings.localRepository}</altReleaseDeploymentRepository>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

        <profile>
            <id>aggregator</id>
            <activation>
                <file>
                    <exists>.aggregator</exists>
                </file>
            </activation>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-release-plugin</artifactId>
                            <configuration>
                                <!-- Adding -N switch so that submodules are not processed during release process -->
                                <arguments>-DreleaseTasks -Dbranch=${project-branch}
                                    -Dsettings.security=${settings-security} -N</arguments>
                            </configuration>
                        </plugin>
                    </plugins>
                </pluginManagement>
            </build>
        </profile>

    </profiles>

</project>
