<?xml version="1.0" encoding="UTF-8"?>
<!--
  #%L
  Pom
  %%
  Copyright (C) 2017 Ultreia.io
  %%
  This program is free software: you can redistribute it and/or modify
  it under the terms of the GNU Lesser General Public License as
  published by the Free Software Foundation, either version 3 of the
  License, or (at your option) any later version.
  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Lesser Public License for more details.
  You should have received a copy of the GNU General Lesser Public
  License along with this program.  If not, see
  <http://www.gnu.org/licenses/lgpl-3.0.html>.
  #L%
-->
<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>io.ultreia.maven</groupId>
  <artifactId>pom</artifactId>
  <version>2017.34</version>
  <packaging>pom</packaging>

  <name>Pom</name>
  <description>A common shared pom for our maven projects</description>
  <url>https://gitlab.com/ultreiaio/pom</url>
  <inceptionYear>2017</inceptionYear>
  <organization>
    <name>Ultreia.io</name>
    <url>http://ultreia.io/</url>
  </organization>
  <licenses>
    <license>
      <name>Lesser General Public License (LGPL) v 3.0</name>
      <url>http://www.gnu.org/licenses/lgpl-3.0.txt</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>

    <developer>
      <name>Tony Chemit</name>
      <id>tchemit</id>
      <email>dev@tchemit.fr</email>
      <organization>ultreia.io</organization>
      <organizationUrl>http://ultreia.io</organizationUrl>
      <timezone>Europe/Paris</timezone>
      <roles>
        <role>lead</role>
        <role>developer</role>
      </roles>
    </developer>

  </developers>

  <scm>
    <connection>scm:git:git@gitlab.com:${projectPath}.git</connection>
    <developerConnection>scm:ssh://git:git@gitlab.com:${projectPath}.git</developerConnection>
    <url>https://gitlab.com/${projectPath}</url>
  </scm>
  <issueManagement>
    <system>gitlab</system>
    <url>https://gitlab.com/${projectPath}/issues</url>
  </issueManagement>
  <ciManagement>
    <system>gitlab</system>
    <url>https://gitlab.com/${projectPath}/pipelines</url>
  </ciManagement>
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
    <repository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <site>
      <id>gitlab.com</id>
      <url>scm:git:http://git@gitlab.com/${projectPath}.git</url>
    </site>
  </distributionManagement>

  <properties>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Mandatory properties you need to define in your project  //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <organizationId />
    <projectId />

    <projectPath>${organizationId}/${projectId}</projectPath>

    <stageId>ioultreia</stageId>

    <maven.version>3.5.0</maven.version>

    <javaVersion>1.8</javaVersion>
    <signatureArtifactId>java18</signatureArtifactId>
    <signatureVersion>1.0</signatureVersion>

    <!-- default encoding -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Plugins version                                          //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <!-- apache maven plugins version -->
    <antRunPluginVersion>1.8</antRunPluginVersion>
    <assemblyPluginVersion>3.1.0</assemblyPluginVersion>
    <cleanPluginVersion>3.0.0</cleanPluginVersion>
    <compilerPluginVersion>3.7.0</compilerPluginVersion>
    <dependencyPluginVersion>3.0.1</dependencyPluginVersion>
    <deployPluginVersion>2.8.2</deployPluginVersion>
    <earPluginVersion>2.10.1</earPluginVersion>
    <ejbPluginVersion>3.0.0</ejbPluginVersion>
    <enforcerPluginVersion>3.0.0-M1</enforcerPluginVersion>
    <gpgPluginVersion>1.6</gpgPluginVersion>
    <installPluginVersion>2.5.2</installPluginVersion>
    <invokerPluginVersion>3.0.1</invokerPluginVersion>
    <jarPluginVersion>3.0.2</jarPluginVersion>
    <jarSignerPluginVersion>1.4</jarSignerPluginVersion>
    <javadocPluginVersion>3.0.0-M1</javadocPluginVersion>
    <pluginPluginVersion>3.5</pluginPluginVersion>
    <pmdPluginVersion>3.8</pmdPluginVersion>
    <releasePluginVersion>2.5.3</releasePluginVersion>
    <remoteResourcesPluginVersion>1.5</remoteResourcesPluginVersion>
    <resourcesPluginVersion>3.0.2</resourcesPluginVersion>
    <shadePluginVersion>3.1.0</shadePluginVersion>
    <sitePluginVersion>3.6</sitePluginVersion>
    <sourcePluginVersion>3.0.1</sourcePluginVersion>
    <surefirePluginVersion>2.20.1</surefirePluginVersion>
    <warPluginVersion>3.1.0</warPluginVersion>

    <!-- codehaus mojo plugins -->
    <buildHelperPluginVersion>3.0.0</buildHelperPluginVersion>
    <buildNumberPluginVersion>1.4</buildNumberPluginVersion>
    <animalSnifferPluginVersion>1.16</animalSnifferPluginVersion>
    <coberturaPluginVersion>2.7</coberturaPluginVersion>
    <execPluginVersion>1.6.0</execPluginVersion>
    <findbugsPluginVersion>3.0.5</findbugsPluginVersion>
    <l10nPluginVersion>1.0-alpha-2</l10nPluginVersion>
    <licensePluginVersion>1.14</licensePluginVersion>
    <sonarPluginVersion>3.3.0.603</sonarPluginVersion>
    <tidyPluginVersion>1.0.0</tidyPluginVersion>
    <versionsPluginVersion>2.5</versionsPluginVersion>
    <wagonPluginVersion>1.0</wagonPluginVersion>

    <!-- codehaus plexus plugins -->
    <plexusPluginVersion>1.3.8</plexusPluginVersion>
    <plexusComponentMetadataPluginVersion>1.7.1</plexusComponentMetadataPluginVersion>

    <!-- nuiton plugins -->
    <helperPluginVersion>2.3.2</helperPluginVersion>

    <!-- others plugins -->
    <jettyPluginVersion>9.4.7.RC0</jettyPluginVersion>
    <statScmPluginVersion>1.2.0</statScmPluginVersion>
    <tomcatPluginVersion>2.2</tomcatPluginVersion>
    <jgitflowPluginVersion>1.0.0-rc-1</jgitflowPluginVersion>
    <gitCommitIdPluginVersion>2.2.3</gitCommitIdPluginVersion>
    <nexusStaginPluginVersion>1.6.8</nexusStaginPluginVersion>
    <gmavenplusPluginVersion>1.6</gmavenplusPluginVersion>
    <launch4JPluginVersion>1.7.21</launch4JPluginVersion>
    <gitlabPluginVersion>1.0.12</gitlabPluginVersion>

    <jaxx.version>3.0-alpha-16</jaxx.version>

    <!-- report plugins version -->
    <changesPluginVersion>2.12.1</changesPluginVersion>
    <projectInfoReportsPluginVersion>2.9</projectInfoReportsPluginVersion>
    <changelogPluginVersion>2.3</changelogPluginVersion>
    <jrxPluginVersion>2.5</jrxPluginVersion>
    <sonarReportPluginVersion>0.1</sonarReportPluginVersion>

    <!-- to deploy with scpexe for maven 3 -->
    <wagonSshExternalVersion>1.0</wagonSshExternalVersion>

    <!-- versions of javadoc tagglets -->
    <mavenPluginToolsJavadocVersion>2.8</mavenPluginToolsJavadocVersion>
    <plexusComponentJavadocVersion>1.5.5</plexusComponentJavadocVersion>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Compiler configuration                                   //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <maven.compiler.source>${javaVersion}</maven.compiler.source>
    <maven.compiler.target>${javaVersion}</maven.compiler.target>
    <maven.compiler.showWarnings>true</maven.compiler.showWarnings>
    <maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
    <!-- for the moment we do not want to use incremental compilation -->
    <maven.compiler.useIncrementalCompilation>false</maven.compiler.useIncrementalCompilation>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Javadoc configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <maven.javadoc.quiet>true</maven.javadoc.quiet>
    <javadocJreApiVersion>8</javadocJreApiVersion>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// License configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <license.useMissingFile>true</license.useMissingFile>
    <license.failIfWarning>true</license.failIfWarning>
    <license.licenseName>lgpl_v3</license.licenseName>
    <maven.license.file>${project.basedir}/LICENSE.txt</maven.license.file>
    <license.organizationName>Ultreia.io</license.organizationName>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// gitflow configuration                                    //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->

    <jgitflow.masterBranchName>master</jgitflow.masterBranchName>
    <jgitflow.developBranchName>develop</jgitflow.developBranchName>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// site configuration                                       //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->
    <generateSitemap>true</generateSitemap>
    <relativizeDecorationLinks>false</relativizeDecorationLinks>

    <!-- ////////////////////////////////////////////////////////////////// -->
    <!-- //// Gitlab configuration                                     //// -->
    <!-- ////////////////////////////////////////////////////////////////// -->
    <gitlab.changesTitle>${projectId} changelog</gitlab.changesTitle>
    <gitlab.changesAuthor>Tony Chemit</gitlab.changesAuthor>
    <gitlab.changesAuthorEmail>dev@tchemit.fr</gitlab.changesAuthorEmail>
    <gitlab.trackers>bug,enhancement,support,documentation,critical</gitlab.trackers>
    <gitlab.stagingId />
    <gitlab.stagingUrl>https://oss.sonatype.org/content/repositories/${gitlab.stagingId}</gitlab.stagingUrl>

    <!--always deploy-->
    <maven.deploy.skip>false</maven.deploy.skip>
    <!--never build javadoc-->
    <maven.javadoc.skip>true</maven.javadoc.skip>
    <!--never build sources-->
    <maven.source.skip>true</maven.source.skip>

  </properties>

  <repositories>
    <repository>
      <id>oss-snapshot</id>
      <name>oss-snapshot</name>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <url>https://oss.sonatype.org/service/local/repositories/snapshots/content</url>
    </repository>
    <repository>
      <id>oss-releases</id>
      <url>
        https://oss.sonatype.org/content/repositories/releases
      </url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <id>oss-snapshot</id>
      <name>oss-snapshot</name>
      <releases>
        <enabled>false</enabled>
      </releases>
      <snapshots>
        <enabled>true</enabled>
      </snapshots>
      <url>https://oss.sonatype.org/service/local/repositories/snapshots/content</url>
    </pluginRepository>
    <pluginRepository>
      <id>oss-releases</id>
      <url>
        https://oss.sonatype.org/content/repositories/releases
      </url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <build>

    <resources>
      <resource>
        <directory>src/main/filtered-resources</directory>
        <filtering>true</filtering>
        <includes>
          <include>**/*</include>
        </includes>
        <excludes>
          <exclude>**/*~</exclude>
        </excludes>
      </resource>
      <resource>
        <directory>src/main/resources</directory>
        <includes>
          <include>**/*</include>
        </includes>
        <excludes>
          <exclude>**/*~</exclude>
        </excludes>
      </resource>
    </resources>

    <pluginManagement>

      <plugins>

        <!-- Plugins from apache -->

        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>${antRunPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${assemblyPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${cleanPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${compilerPluginVersion}</version>
          <configuration>
            <compilerArgs>
              <arg>-Xlint:unchecked</arg>
            </compilerArgs>
          </configuration>
        </plugin>


        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${dependencyPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${deployPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-ear-plugin</artifactId>
          <version>${earPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-ejb-plugin</artifactId>
          <version>${ejbPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${enforcerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-gpg-plugin</artifactId>
          <version>${gpgPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-install-plugin</artifactId>
          <version>${installPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-invoker-plugin</artifactId>
          <version>${invokerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${jarPluginVersion}</version>
          <inherited>true</inherited>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <manifestEntries>
                <url>${project.url}</url>
              </manifestEntries>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-jarsigner-plugin</artifactId>
          <version>${jarSignerPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${javadocPluginVersion}</version>
          <configuration>
            <quiet>${maven.javadoc.quiet}</quiet>
            <charset>${project.reporting.outputEncoding}</charset>
            <links>
              <link>http://docs.oracle.com/javase/${javadocJreApiVersion}/docs/api</link>
            </links>
            <tagletArtifacts>
              <tagletArtifact>
                <groupId>org.apache.maven.plugin-tools</groupId>
                <artifactId>maven-plugin-tools-javadoc</artifactId>
                <version>${mavenPluginToolsJavadocVersion}</version>
              </tagletArtifact>
              <tagletArtifact>
                <groupId>org.codehaus.plexus</groupId>
                <artifactId>plexus-component-javadoc</artifactId>
                <version>${plexusComponentJavadocVersion}</version>
              </tagletArtifact>
            </tagletArtifacts>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${pluginPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-pmd-plugin</artifactId>
          <version>${pmdPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>${releasePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-remote-resources-plugin</artifactId>
          <version>${remoteResourcesPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${resourcesPluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${shadePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-site-plugin</artifactId>
          <version>${sitePluginVersion}</version>
          <configuration>
            <skipDeploy>true</skipDeploy><!-- don't deploy site with maven-site-plugin -->
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${sourcePluginVersion}</version>
        </plugin>

        <plugin>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${surefirePluginVersion}</version>
          <configuration>
            <systemPropertyVariables>
              <java.io.tmpdir>
                ${project.build.directory}/surefire-workdir
              </java.io.tmpdir>
            </systemPropertyVariables>
          </configuration>
        </plugin>

        <plugin>
          <artifactId>maven-war-plugin</artifactId>
          <version>${warPluginVersion}</version>
        </plugin>

        <!-- Plugins from codehaus mojo -->

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>${animalSnifferPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>cobertura-maven-plugin</artifactId>
          <version>${coberturaPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>exec-maven-plugin</artifactId>
          <version>${execPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>${buildHelperPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>buildnumber-maven-plugin</artifactId>
          <version>${buildNumberPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${findbugsPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>l10n-maven-plugin</artifactId>
          <version>${l10nPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${licensePluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>sonar-maven-plugin</artifactId>
          <version>${sonarPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>tidy-maven-plugin</artifactId>
          <version>${tidyPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>versions-maven-plugin</artifactId>
          <version>${versionsPluginVersion}</version>
          <configuration>
            <generateBackupPoms>false</generateBackupPoms>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>wagon-maven-plugin</artifactId>
          <version>${wagonPluginVersion}</version>
        </plugin>

        <!-- Plugins from codehaus plexus -->

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-component-metadata</artifactId>
          <version>${plexusComponentMetadataPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.codehaus.plexus</groupId>
          <artifactId>plexus-maven-plugin</artifactId>
          <version>${plexusPluginVersion}</version>
        </plugin>


        <!-- Plugins from nuiton -->
        <plugin>
          <groupId>org.nuiton</groupId>
          <artifactId>helper-maven-plugin</artifactId>
          <version>${helperPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>io.ultreia.java4all.jaxx</groupId>
          <artifactId>jaxx-maven-plugin</artifactId>
          <version>${jaxx.version}</version>
        </plugin>

        <!-- Plugins from others -->

        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-maven-plugin</artifactId>
          <version>${jettyPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.eclipse.jetty</groupId>
          <artifactId>jetty-jspc-maven-plugin</artifactId>
          <version>${jettyPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat6-maven-plugin</artifactId>
          <version>${tomcatPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.tomcat.maven</groupId>
          <artifactId>tomcat7-maven-plugin</artifactId>
          <version>${tomcatPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>io.ultreia.java4all.jgitflow</groupId>
          <artifactId>jgitflow-maven-plugin</artifactId>
          <version>${jgitflowPluginVersion}</version>
          <configuration>
            <flowInitContext>
              <versionTagPrefix>v</versionTagPrefix>
              <masterBranchName>${jgitflow.masterBranchName}</masterBranchName>
              <developBranchName>${jgitflow.developBranchName}</developBranchName>
            </flowInitContext>
            <scmCommentPrefix>[jgitflow-maven-plugin]</scmCommentPrefix>
            <scmCommentSuffix>[skip ci]</scmCommentSuffix>
            <autoVersionSubmodules>true</autoVersionSubmodules>
            <addScmCommentSuffixOnMerge>false</addScmCommentSuffixOnMerge>
          </configuration>
          <executions>
            <execution>
              <id>default-cli</id>
              <goals>
                <goal>release-finish</goal>
              </goals>
              <configuration>
                <pushReleases>true</pushReleases>
                <enableSshAgent>true</enableSshAgent>
              </configuration>
            </execution>
          </executions>
        </plugin>

        <plugin>
          <groupId>net.sf</groupId>
          <artifactId>stat-scm</artifactId>
          <version>${statScmPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>pl.project13.maven</groupId>
          <artifactId>git-commit-id-plugin</artifactId>
          <version>${gitCommitIdPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${nexusStaginPluginVersion}</version>
          <extensions>true</extensions>
          <configuration>
            <serverId>ossrh</serverId>
            <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            <autoReleaseAfterClose>true</autoReleaseAfterClose>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.codehaus.gmavenplus</groupId>
          <artifactId>gmavenplus-plugin</artifactId>
          <version>${gmavenplusPluginVersion}</version>
          <dependencies>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-all</artifactId>
              <version>2.6.0-alpha-1</version>
              <scope>runtime</scope>
            </dependency>
          </dependencies>
        </plugin>

        <plugin>
          <groupId>com.akathist.maven.plugins.launch4j</groupId>
          <artifactId>launch4j-maven-plugin</artifactId>
          <version>${launch4JPluginVersion}</version>
        </plugin>

        <plugin>
          <groupId>io.ultreia.maven</groupId>
          <artifactId>gitlab-maven-plugin</artifactId>
          <version>${gitlabPluginVersion}</version>
          <configuration>
            <host>https://gitlab.com</host>
            <serverId>gitlab.com</serverId>
            <organizationId>${organizationId}</organizationId>
            <projectId>${projectId}</projectId>
            <changesFile>${project.build.directory}/generated-site/changes.xml</changesFile>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>
    <plugins>

      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <id>generate-surefire-workdir</id>
            <phase>generate-test-sources</phase>
            <configuration>
              <!-- do not generate if tests are skipped -->
              <!--suppress MavenModelInspection -->
              <skip>${maven.test.skip}</skip>
              <target>
                <mkdir dir="${basedir}/target/surefire-workdir" />
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

    </plugins>
  </build>

  <reporting>
    <excludeDefaults>true</excludeDefaults>
  </reporting>

  <profiles>

    <!-- perform only on a release stage when using the maven-release-plugin -->
    <profile>
      <id>license-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>

        <defaultGoal>generate-resources</defaultGoal>

        <plugins>

          <!-- add license and third-party files to build -->
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-licenses</id>
                <goals>
                  <goal>update-project-license</goal>
                  <goal>add-third-party</goal>
                </goals>
                <configuration>
                  <licenseMerges>
                    <licenseMerge>
                      The Apache Software License, Version 2.0|Apache License, Version 2.0|Apache License V2.0|Apache
                      2|ASF 2.0|apache-2.0|Apache Public License 2.0
                    </licenseMerge>
                    <licenseMerge>BSD License|BSD license|BSD</licenseMerge>
                    <licenseMerge>MIT License|MIT license|MIT</licenseMerge>
                    <licenseMerge>
                      Lesser General Public License (LPGL) v 2.1|GNU Lesser General Public License, 2.1|LGPL 2.1
                    </licenseMerge>
                    <licenseMerge>
                      Lesser General Public License (LPGL)|GNU Lesser General Public License|GNU LESSER GENERAL PUBLIC
                      LICENSE|LGPL|lgpl
                    </licenseMerge>
                    <licenseMerge>
                      COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0|Common Development and Distribution
                      License (CDDL) v1.0
                    </licenseMerge>
                    <licenseMerge>Indiana University Extreme! Lab Software License, version 1.1.1|Indiana University
                      Extreme! Lab Software License
                    </licenseMerge>
                  </licenseMerges>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>
    </profile>

    <!-- perform only on a release to do quality checks on release -->
    <profile>
      <id>release-quality-profile</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <build>
        <plugins>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>animal-sniffer-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>check</goal>
                </goals>
                <configuration>
                  <signature>
                    <groupId>org.codehaus.mojo.signature</groupId>
                    <artifactId>${signatureArtifactId}</artifactId>
                    <version>${signatureVersion}</version>
                  </signature>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>check-project</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <phase>validate</phase>
                <configuration>
                  <rules>
                    <requireFilesExist>
                      <files>
                        <file>LICENSE.txt</file>
                        <file>README.md</file>
                      </files>
                    </requireFilesExist>
                    <requireProperty>
                      <property>organizationId</property>
                      <message>"organizationId property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"organizationId property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>projectId</property>
                      <message>"projectId property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"projectId property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>stageId</property>
                      <message>"stageId property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"stageId property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireMavenVersion>
                      <version>${maven.version}</version>
                    </requireMavenVersion>
                    <dependencyConvergence />
                    <bannedDependencies>
                      <excludes>
                        <exclude>
                          org.codehaus.plexus:plexus-component-api
                        </exclude>
                      </excludes>
                      <message>
                        The new containers are not supported. You
                        probably added a dependency that is missing the
                        exclusions.
                      </message>
                    </bannedDependencies>
                    <enforceBytecodeVersion>
                      <maxJdkVersion>${javaVersion}</maxJdkVersion>
                    </enforceBytecodeVersion>
                    <banDuplicateClasses>
                      <findAllDuplicates>true</findAllDuplicates>
                    </banDuplicateClasses>
                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>extra-enforcer-rules</artifactId>
                <version>1.0-beta-4</version>
              </dependency>
            </dependencies>
          </plugin>

        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-sign-artifacts</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>get-pgp-pass-phrase</id>
                <goals>
                  <goal>share-server-secret</goal>
                </goals>
                <phase>verify</phase>
                <configuration>
                  <serverId>ultreia-gpg-signer</serverId>
                  <usernameOut>gpg.keyname</usernameOut>
                  <passwordOut>gpg.passphrase</passwordOut>
                </configuration>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <artifactId>maven-gpg-plugin</artifactId>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- This profile update license stuff with new goal update-file-header -->
    <profile>
      <id>update-file-header</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>

      <properties>
        <license.descriptor>src/license/project.xml</license.descriptor>
        <license.excludes>**/ftl/*.ftl,**/i18n/*.properties,**/THIRD-PARTY.properties,**/*.sh</license.excludes>
      </properties>
      <build>
        <defaultGoal>process-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>license-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>update-file-header</id>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <phase>process-resources</phase>
              </execution>
              <execution>
                <id>update-pom-header</id>
                <goals>
                  <goal>update-file-header</goal>
                </goals>
                <configuration>
                  <roots>
                    <root>${project.basedir}</root>
                  </roots>
                  <includes>
                    <include>pom.xml</include>
                  </includes>
                </configuration>
                <phase>process-resources</phase>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>analyze-dependencies</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
            <inherited>true</inherited>
            <executions>
              <execution>
                <id>analyze</id>
                <goals>
                  <goal>analyze-only</goal>
                </goals>
                <configuration>
                  <verbose>true</verbose>
                  <failOnWarning>true</failOnWarning>
                  <ignoreNonCompile>true</ignoreNonCompile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- do not generate site if no src/site is found for module -->
    <profile>
      <id>no-site</id>
      <activation>
        <file>
          <missing>src/site</missing>
        </file>
      </activation>

      <properties>
        <!-- no site generation -->
        <maven.site.skip>true</maven.site.skip>
        <maven.site.deploy.skip>true</maven.site.deploy.skip>
      </properties>

    </profile>

    <profile>
      <id>maven-3</id>
      <activation>
        <file>
          <!--  This employs that the basedir expression is only recognized by Maven 3.x (see MNG-2363) -->
          <exists>${basedir}</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-site-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-descriptor</id>
                <goals>
                  <goal>attach-descriptor</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- change version adding commit hash as classifier -->
    <profile>

      <id>add-git-commit-id-to-project-version</id>
      <build>

        <defaultGoal>initialize</defaultGoal>

        <plugins>
          <plugin>
            <groupId>pl.project13.maven</groupId>
            <artifactId>git-commit-id-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>revision</goal>
                </goals>
                <phase>initialize</phase>
              </execution>
            </executions>
            <configuration>
              <runOnlyOnce>true</runOnlyOnce>
              <skipPoms>false</skipPoms>
              <includeOnlyProperties>
                <includeOnlyProperty>git\.commit\.id\.abbrev</includeOnlyProperty>
              </includeOnlyProperties>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.nuiton</groupId>
            <artifactId>helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>transform-project-version</goal>
                </goals>
                <phase>initialize</phase>
              </execution>
            </executions>
            <configuration>
              <runOnce>true</runOnce>
              <newVersionPattern>#V-rev#R</newVersionPattern>
              <revision>#git.commit.id.abbrev</revision>
              <versionKey>newVersion</versionKey>
            </configuration>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>versions-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>set</goal>
                </goals>
                <phase>initialize</phase>
              </execution>
            </executions>
          </plugin>

        </plugins>

      </build>
    </profile>

    <profile>
      <id>update-changelog</id>
      <build>
        <defaultGoal>generate-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>io.ultreia.maven</groupId>
            <artifactId>gitlab-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>generate-changelog</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>update-staging-changelog</id>
      <build>
        <defaultGoal>generate-resources</defaultGoal>
        <plugins>
          <plugin>
            <groupId>io.ultreia.maven</groupId>
            <artifactId>gitlab-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <!--suppress MavenModelInspection -->
                  <goal>generate-staging-changelog</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <!-- Profile to build the pom project -->
    <profile>
      <id>internal</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/.pom-project-do-not-delete.txt</exists>
        </file>
      </activation>
      <properties>
        <organizationId>ultreiaio</organizationId>
        <projectId>pom</projectId>
        <maven.deploy.skip>false</maven.deploy.skip>
        <maven.site.skip>true</maven.site.skip>
        <maven.site.deploy.skip>true</maven.site.deploy.skip>
      </properties>
    </profile>

    <!-- Profile to generate a simple simple (you need to place file .mvn/simple-site fil in your project) -->
    <profile>
      <id>simple-site</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/simple-site</exists>
        </file>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-scm-publish-plugin</artifactId>
              <configuration>
                <pubScmUrl>${project.distributionManagement.site.url}</pubScmUrl>
                <scmBranch>pages</scmBranch>
                <content>${project.reporting.outputDirectory}</content><!-- mono-module doesn't require site:stage -->
              </configuration>
              <executions>
                <execution>
                  <id>scm-publish</id>
                  <phase>site-deploy</phase><!-- deploy site with maven-scm-publish-plugin -->
                  <goals>
                    <goal>publish-scm</goal>
                  </goals>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

    <!-- Profile to generate a multi module site (you need to place file .mvn/simple-site fil in your project) -->
    <profile>
      <id>multi-module-site-profile</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/multi-module-site</exists>
        </file>
      </activation>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-site-plugin</artifactId>
              <configuration>
                <topSiteURL>scm:git:https://git@gitlab.com/${projectPath}.git</topSiteURL>
                <stagingDirectory>${user.dir}/target/staging</stagingDirectory>
              </configuration>
            </plugin>
            <plugin>
              <artifactId>maven-scm-publish-plugin</artifactId>
              <configuration>
                <scmBranch>pages</scmBranch>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

    <profile>
      <id>application-assembly-profile</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/application-assembly</exists>
        </file>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <defaultGoal>package</defaultGoal>

        <pluginManagement>

          <plugins>

            <plugin>
              <artifactId>maven-jar-plugin</artifactId>
              <configuration>
                <archive>
                  <manifest>
                    <useUniqueVersions>false</useUniqueVersions>
                    <addClasspath>false</addClasspath>
                    <classpathPrefix />
                    <mainClass>${maven.jar.main.class}</mainClass>
                  </manifest>
                </archive>
              </configuration>
            </plugin>

          </plugins>
        </pluginManagement>
        <plugins>

          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>check-application-assembly</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <phase>generate-sources</phase>
                <configuration>
                  <rules>
                    <requireProperty>
                      <property>maven.jar.main.class</property>
                      <message>"maven.jar.main.class property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"maven.jar.main.class property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>buildDate</property>
                      <message>"buildDate property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"buildDate property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>buildNumber</property>
                      <message>"buildNumber property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"buildNumber property can not be empty."</regexMessage>
                    </requireProperty>
                    <requireProperty>
                      <property>applicationName</property>
                      <message>"applicationName property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"applicationName property can not be empty."</regexMessage>
                    </requireProperty>

                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>extra-enforcer-rules</artifactId>
                <version>1.0-beta-4</version>
              </dependency>
            </dependencies>
          </plugin>

          <plugin>
            <artifactId>maven-shade-plugin</artifactId>
            <executions>
              <execution>
                <phase>package</phase>
                <goals>
                  <goal>shade</goal>
                </goals>
                <configuration>
                  <createDependencyReducedPom>false</createDependencyReducedPom>
                  <transformers>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                      <manifestEntries>
                        <Main-Class>${maven.jar.main.class}</Main-Class>
                        <X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
                        <X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
                        <Build-Date>${buildDate}</Build-Date>
                        <Build-Number>${buildNumber}</Build-Number>
                        <Implementation-Model-Version>${project.version}</Implementation-Model-Version>
                      </manifestEntries>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.XmlAppendingTransformer">
                      <resource>xwork.xml</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>CHANGELOG.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>LICENSE.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>LICENSE</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>hsqldb_lic.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>hypersonic_lic.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>info.xml</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>jdom-info.xml</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>README.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>README.md</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>THIRD-PARTY.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>HTTPS___.DSA</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>DEPENDENCIES</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>HTTPS___.SF</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>README</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>NOTICE</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.DontIncludeResourceTransformer">
                      <resource>NOTICE.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />

                    <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                      <file>README.md</file>
                      <resource>README.md</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                      <file>${project.build.outputDirectory}/THIRD-PARTY.txt</file>
                      <resource>THIRD-PARTY.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                      <file>${project.build.outputDirectory}/META-INF/${applicationName}-THIRD-PARTY.txt</file>
                      <resource>META-INF/${applicationName}-THIRD-PARTY.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                      <file>${project.build.outputDirectory}/META-INF/${applicationName}-LICENSE.txt</file>
                      <resource>META-INF/${applicationName}-LICENSE.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                      <file>${project.build.directory}/generated-sources/license/CHANGELOG.txt</file>
                      <resource>CHANGELOG.txt</resource>
                    </transformer>
                    <transformer implementation="org.apache.maven.plugins.shade.resource.IncludeResourceTransformer">
                      <file>
                        ${project.build.directory}/generated-sources/license/META-INF/${applicationName}-CHANGELOG.txt
                      </file>
                      <resource>META-INF/${applicationName}-CHANGELOG.txt</resource>
                    </transformer>

                  </transformers>
                  <!--minimizeJar>true</minimizeJar>
                  <filters>
                    <filter>
                      <artifact>log4j:log4j</artifact>
                      <includes>
                        <include>**</include>
                      </includes>
                    </filter>
                    <filter>
                      <artifact>commons-logging:commons-logging</artifact>
                      <includes>
                        <include>**</include>
                      </includes>
                    </filter>
                  </filters-->
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>build-helper-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>parse-version</id>
                <goals>
                  <goal>parse-version</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>com.akathist.maven.plugins.launch4j</groupId>
            <artifactId>launch4j-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>launch4j</id>
                <phase>package</phase>
                <goals>
                  <goal>launch4j</goal>
                </goals>
                <configuration>
                  <dontWrapJar>true</dontWrapJar>
                  <headerType>gui</headerType>
                  <outfile>${project.build.directory}/${project.build.finalName}.exe</outfile>
                  <jar>${project.build.finalName}.jar</jar>
                  <errTitle>${project.parent.name}</errTitle>
                  <jre>
                    <minVersion>1.8.0</minVersion>
                  </jre>
                  <versionInfo>
                    <!--suppress MavenModelInspection -->
                    <fileVersion>
                      ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.0
                    </fileVersion>
                    <txtFileVersion>${project.version}</txtFileVersion>
                    <fileDescription>${project.parent.description}</fileDescription>
                    <productName>${project.parent.name}</productName>
                    <!--suppress MavenModelInspection -->
                    <productVersion>
                      ${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}.0
                    </productVersion>
                    <txtProductVersion>${project.version}</txtProductVersion>
                    <companyName>${project.organization.name}</companyName>
                    <copyright>${project.inceptionYear} 2009 - 2016 ${project.organization.name}</copyright>
                    <internalName>observe</internalName>
                    <originalFilename>${project.build.finalName}.exe</originalFilename>
                  </versionInfo>
                </configuration>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <artifactId>maven-assembly-plugin</artifactId>
            <executions>
              <execution>
                <id>create-application-assembly</id>
                <phase>package</phase>
                <goals>
                  <goal>single</goal>
                </goals>
                <configuration>
                  <descriptors>
                    <descriptor>src/main/assembly/bin.xml</descriptor>
                  </descriptors>
                  <attach>true</attach>
                  <finalName>${project.build.finalName}</finalName>
                  <appendAssemblyId>false</appendAssemblyId>
                  <outputDirectory>${project.build.directory}</outputDirectory>
                </configuration>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>

    <profile>
      <id>add-build-number-profile</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/add-build-number</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>buildnumber-maven-plugin</artifactId>
            <executions>
              <execution>
                <goals>
                  <goal>create</goal>
                </goals>
                <phase>validate</phase>
              </execution>
            </executions>
            <configuration>
              <doCheck>false</doCheck>
              <doUpdate>false</doUpdate>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>jaxx-generate-profile</id>
      <activation>
        <file>
          <exists>${basedir}/.mvn/jaxx-generate</exists>
        </file>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>io.ultreia.java4all.jaxx</groupId>
            <artifactId>jaxx-maven-plugin</artifactId>
            <version>${jaxx.version}</version>
            <executions>
              <execution>
                <goals>
                  <goal>generate</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

        </plugins>
      </build>
    </profile>

    <profile>
      <id>deploy-war-to-demo-profile</id>
      <properties>
        <classifier>${project.version}</classifier>
      </properties>

      <build>
        <defaultGoal>verify</defaultGoal>
        <plugins>

          <plugin>
            <artifactId>maven-enforcer-plugin</artifactId>
            <executions>
              <execution>
                <id>check-application-assembly</id>
                <goals>
                  <goal>enforce</goal>
                </goals>
                <phase>generate-sources</phase>
                <configuration>
                  <rules>
                    <requireProperty>
                      <property>applicationName</property>
                      <message>"applicationName property must be specified."</message>
                      <regex>.+$</regex>
                      <regexMessage>"applicationName property can not be empty."</regexMessage>
                    </requireProperty>

                  </rules>
                  <fail>true</fail>
                </configuration>
              </execution>
            </executions>
            <dependencies>
              <dependency>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>extra-enforcer-rules</artifactId>
                <version>1.0-beta-4</version>
              </dependency>
            </dependencies>
          </plugin>

          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>wagon-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>deploy-demo</id>
                <phase>verify</phase>
                <goals>
                  <goal>upload-single</goal>
                </goals>
                <configuration>
                  <serverId>doc.ultreia.io</serverId>
                  <url>scpexe://ultreia.io/var/lib/tomcat8/webapps</url>
                  <fromFile>${project.build.directory}/${project.build.finalName}.war</fromFile>
                  <toFile>${applicationName}-${classifier}.war</toFile>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>project-init</id>
      <build>
        <defaultGoal>initialize</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>project-init</id>
                <phase>initialize</phase>
                <configuration>
                  <target>
                    <mkdir dir="${basedir}/.mvn" />
                    <echo message="${projectId}" file="${basedir}/.mvn/pom.projectId" />
                    <echo message="${stageId}" file="${basedir}/.mvn/pom.stageId" />
                    <echo message="${jgitflow.developBranchName}" file="${basedir}/.mvn/pom.gitflow.develop" />
                    <echo message="${jgitflow.masterBranchName}" file="${basedir}/.mvn/pom.gitflow.master" />
                  </target>
                </configuration>
                <goals>
                  <goal>run</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

  </profiles>
</project>
