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

    Copyright 2015-2016 Jeeva Kandasamy (jkandasa@gmail.com)
    and other contributors as indicated by the @author tags.

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

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

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

-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.mycontroller</groupId>
  <artifactId>mycontroller-parent</artifactId>
  <version>13</version>
  <packaging>pom</packaging>

  <name>MyController parent pom</name>
  <description>MyController parent pom file used across</description>
  <url>https://github.com/mycontroller-org</url>
  <inceptionYear>2015</inceptionYear>

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

  <developers>
    <developer>
      <id>jkandasa</id>
      <name>Jeeva Kandasamy</name>
      <timezone>Asia/Kolkata</timezone>
    </developer>
  </developers>

  <scm>
    <connection>scm:git:git@github.com:mycontroller-org/mycontroller-parent-pom.git</connection>
    <developerConnection>scm:git:git@github.com:mycontroller-org/mycontroller-parent-pom.git</developerConnection>
    <url>https://github.com/mycontroller-org/mycontroller-parent-pom</url>
    <tag>head</tag>
  </scm>

  <issueManagement>
    <system>github</system>
    <url>https://github.com/mycontroller-org/mycontroller/issues</url>
  </issueManagement>

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

  <properties>

    <!-- Maven general -->
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
    <autoVersionSubmodules>true</autoVersionSubmodules>

    <!-- maven-compiler-plugin -->
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>
    <maven.compiler.showWarnings>true</maven.compiler.showWarnings>

    <!-- Checkstyle and maven-checkstyle-plugin -->
    <version.com.puppycrawl.tools.checkstyle>6.8</version.com.puppycrawl.tools.checkstyle>
    <!-- the default value pointing at checkstyle.xml in mycontroller-build-tools -->
    <checkstyle.configLocation>mycontroller-checkstyle/checkstyle.xml</checkstyle.configLocation>
    <checkstyle.consoleOutput>true</checkstyle.consoleOutput>
    <checkstyle.failOnError>true</checkstyle.failOnError>
    <mycontroller.checkstyle.includes>
      src/**/*.java,
      *.xml,
      src/**/*.xml,
      src/**/*.js,
      *.adoc,
      src/**/*.adoc,
      *.conf,
      src/**/*.conf,
      src/**/*.cql,
      src/**/*.css,
      Dockerfile,
      src/**/Dockerfile,
      src/**/*.groovy,
      *.html,
      src/**/*.html,
      src/**/*.json,
      src/**/*.js.map,
      *.md,
      src/**/*.md,
      *.properties,
      src/**/*.properties,
      *.sh,
      src/**/*.sh,
      *.txt,
      src/**/*.txt,
      *.yml,
      src/**/*.yml,
      src/**/*.xsl,
      src/**/*.yaml,
    </mycontroller.checkstyle.includes>
    <mycontroller.checkstyle.excludes>
      release.properties,
      **/*.d.ts,
      **/vendor/*.js,
      **/www/libs/**,
      **/*.jks,
      **/.tx/config,
    </mycontroller.checkstyle.excludes>
    <!-- the default value pointing at suppressions.xml in mycontroller-build-tools -->
    <checkstyle.suppressions.file>mycontroller-checkstyle/suppressions.xml</checkstyle.suppressions.file>

    <!-- maven-enforcer-plugin -->
    <!-- Note that ${enforcer.project.version.pattern} has a stricter variant in the release profile -->
    <enforcer.project.version.pattern>^(\d{1,4})(\.\d{1,3}\.\d{1,3}(\.Alpha\d{1,2}|\.Beta\d{1,2}|\.CR\d{1,2}|\.Final)?)?(-SNAPSHOT|-SRC-.*)?$</enforcer.project.version.pattern>
    <enforcer.project.version.message>Project version must be in the
      form of one of the following (x,y,z stands for any numbers): "x",
      "x.y", "x.y.z". There may be also a qualifier at the end.
      Qualifier can be one of the following: ".AlphaX", ".BetaX",
      ".CRX", ".Final", where X denotes a number. And there may be also
      "-SNAPSHOT" or -SRC-.* at the very end.</enforcer.project.version.message>

    <!-- license-maven-plugin -->
    <license.headerTemplatePath>mycontroller-license/mycontroller-apache-2-template.txt</license.headerTemplatePath>
    <license.failIfMissing>true</license.failIfMissing>
    <license.failIfUnknown>true</license.failIfUnknown>

    <!-- -Xdoclint:none disables javadoc validation -->
    <javadoc.doclint>-Xdoclint:none</javadoc.doclint>

    <!-- nexus-staging-maven-plugin -->
    <autoReleaseAfterClose>true</autoReleaseAfterClose>

    <!-- srcdeps-maven-plugin let's have the SCM URLs as propeties so that they can be switched to local repos on command line when testing -->
    <mycontroller.scm.url>scm:git:https://github.com/mycontroller-org/mycontroller.git</mycontroller.scm.url>
    <srcdeps.quiet>true</srcdeps.quiet>
    <srcdeps.skipTests>true</srcdeps.skipTests>

    <!-- mycontroller-build-tools are used by both maven-checkstyle-plugin and lisense-plugin -->
    <version.org.mycontroller.mycontroller-build-tools>1</version.org.mycontroller.mycontroller-build-tools>

    <!-- Maven plugin versions Naming convention: version.${artifactId} whenever unique enough; otherwise version.${groupId}.${artifactId} Ordering: alphabetic -->
    <version.com.mycila.license-maven-plugin>2.11</version.com.mycila.license-maven-plugin>
    <version.exec-maven-plugin>1.4.0</version.exec-maven-plugin>
    <version.gatling-maven-plugin>2.1.7</version.gatling-maven-plugin>
    <version.maven-antrun-plugin>1.8</version.maven-antrun-plugin>
    <version.maven-assembly-plugin>2.6</version.maven-assembly-plugin>
    <version.maven-checkstyle-plugin>2.17</version.maven-checkstyle-plugin>
    <version.maven-clean-plugin>3.0.0</version.maven-clean-plugin>
    <version.maven-compiler-plugin>3.5.1</version.maven-compiler-plugin>
    <version.maven-dependency-plugin>2.10</version.maven-dependency-plugin>
    <version.maven-deploy-plugin>2.8.2</version.maven-deploy-plugin>
    <version.maven-enforcer-plugin>1.4.1</version.maven-enforcer-plugin>
    <version.maven-failsafe-plugin>2.19.1</version.maven-failsafe-plugin>
    <version.maven-install-plugin>2.5.2</version.maven-install-plugin>
    <version.maven-jar-plugin>2.6</version.maven-jar-plugin>
    <version.maven-javadoc-plugin>2.10.3</version.maven-javadoc-plugin>
    <version.maven-release-plugin>2.5.3</version.maven-release-plugin>
    <version.maven-resources-plugin>2.7</version.maven-resources-plugin>
    <version.maven-shade-plugin>2.4.3</version.maven-shade-plugin>
    <version.maven-site-plugin>3.5</version.maven-site-plugin>
    <version.maven-source-plugin>3.0.0</version.maven-source-plugin>
    <version.maven-surefire-plugin>2.19.1</version.maven-surefire-plugin>
    <version.nexus-staging-maven-plugin>1.6.7</version.nexus-staging-maven-plugin>
    <version.org.codehaus.buildnumber-maven-plugin>1.4</version.org.codehaus.buildnumber-maven-plugin>
    <version.org.codehaus.mojo.build-helper-maven-plugin>1.10</version.org.codehaus.mojo.build-helper-maven-plugin>
    <version.org.codehaus.mojo.xml-maven-plugin>1.0.1</version.org.codehaus.mojo.xml-maven-plugin>
    <version.srcdeps-maven-plugin>0.0.11</version.srcdeps-maven-plugin>

    <!-- dependency versions -->
    <version.apache.httpclient>4.5.1</version.apache.httpclient>
    <version.apache.httpcore>4.4.4</version.apache.httpcore>
    <version.ch.qos.logback>1.1.7</version.ch.qos.logback>
    <version.com.fazecast>1.3.10</version.com.fazecast>
    <version.com.h2database>1.3.176</version.com.h2database>
    <version.com.j256.ormlite>5.0</version.com.j256.ormlite>
    <version.com.luckycatlabs>1.2</version.com.luckycatlabs>
    <version.com.pi4j>1.1</version.com.pi4j>
    <version.commons-codec>1.10</version.commons-codec>
    <version.commons-io>2.4</version.commons-io>
    <version.commons-lang>2.2</version.commons-lang>
    <version.javax.servlet>2.5</version.javax.servlet>
    <version.moquette-broker>0.8.1</version.moquette-broker>
    <version.org.apache.commons>1.4</version.org.apache.commons>
    <version.org.camunda.template-engines>1.0.1</version.org.camunda.template-engines>
    <version.org.codehaus.groovy>2.4.6</version.org.codehaus.groovy>
    <version.org.easyrules>2.3.0</version.org.easyrules>
    <version.org.eclipse.paho>1.1.0</version.org.eclipse.paho>
    <version.org.flywaydb>4.0.3</version.org.flywaydb>
    <version.org.freemarker>2.3.25-incubating</version.org.freemarker>
    <version.org.javolution>5.3.1</version.org.javolution>
    <version.org.jboss.resteasy>3.0.14.Final</version.org.jboss.resteasy>
    <version.org.knowm>2.1.1</version.org.knowm>
    <version.org.projectlombok>1.16.10</version.org.projectlombok>
    <version.org.python>2.7.0</version.org.python>
    <version.org.scream3r>2.8.0</version.org.scream3r>
    <version.org.slf4j>1.7.21</version.org.slf4j>
    <version.org.yaml.snakeyaml>1.17</version.org.yaml.snakeyaml>

    <!-- dependency versions -->
    <version.mycontroller-rest-clients>1.0.0</version.mycontroller-rest-clients>
    <version.mycontroller-core>0.0.3.Final-SNAPSHOT</version.mycontroller-core>

  </properties>

  <dependencyManagement>
    <dependencies>

      <!-- Internal dependency -->
      <!-- Standalone core -->
      <dependency>
        <groupId>org.mycontroller.standalone</groupId>
        <artifactId>mycontroller-core</artifactId>
        <version>${version.mycontroller-core}</version>
      </dependency>

      <!-- Rest clients -->
      <dependency>
        <groupId>org.mycontroller</groupId>
        <artifactId>mycontroller-rest-clients</artifactId>
        <version>${version.mycontroller-rest-clients}</version>
      </dependency>

      <!-- serial gateway drivers -->
      <dependency>
        <groupId>org.scream3r</groupId>
        <artifactId>jssc</artifactId>
        <version>${version.org.scream3r}</version>
      </dependency>

      <dependency>
        <groupId>com.pi4j</groupId>
        <artifactId>pi4j-core</artifactId>
        <version>${version.com.pi4j}</version>
      </dependency>

      <dependency>
        <groupId>com.fazecast</groupId>
        <artifactId>jSerialComm</artifactId>
        <version>${version.com.fazecast}</version>
      </dependency>

      <!-- Logger -->
      <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${version.org.slf4j}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-core</artifactId>
        <version>${version.ch.qos.logback}</version>
      </dependency>

      <dependency>
        <groupId>ch.qos.logback</groupId>
        <artifactId>logback-classic</artifactId>
        <version>${version.ch.qos.logback}</version>
      </dependency>

      <!-- Struct for firmware -->
      <dependency>
        <groupId>org.javolution</groupId>
        <artifactId>javolution</artifactId>
        <version>${version.org.javolution}</version>
      </dependency>

      <!-- RestEasy -->
      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>tjws</artifactId>
        <version>${version.org.jboss.resteasy}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jackson2-provider</artifactId>
        <version>${version.org.jboss.resteasy}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-client</artifactId>
        <version>${version.org.jboss.resteasy}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.resteasy</groupId>
        <artifactId>resteasy-jaxrs</artifactId>
        <version>${version.org.jboss.resteasy}</version>
        <exclusions>
          <exclusion>
            <groupId>commons-io</groupId>
            <artifactId>commons-io</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- commons-io version -->
      <dependency>
        <groupId>commons-io</groupId>
        <artifactId>commons-io</artifactId>
        <version>${version.commons-io}</version>
      </dependency>


      <!-- servlet -->
      <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>servlet-api</artifactId>
        <version>${version.javax.servlet}</version>
      </dependency>

      <!-- Database driver -->
      <dependency>
        <groupId>com.j256.ormlite</groupId>
        <artifactId>ormlite-jdbc</artifactId>
        <version>${version.com.j256.ormlite}</version>
      </dependency>

      <dependency>
        <groupId>com.j256.ormlite</groupId>
        <artifactId>ormlite-core</artifactId>
        <version>${version.com.j256.ormlite}</version>
      </dependency>

      <!-- Database -->
      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${version.com.h2database}</version>
      </dependency>

      <!-- Quartz scheduler -->
      <dependency>
        <groupId>org.knowm</groupId>
        <artifactId>sundial</artifactId>
        <version>${version.org.knowm}</version>
      </dependency>

      <!-- Apache - Commons Lang -->
      <dependency>
        <groupId>commons-lang</groupId>
        <artifactId>commons-lang</artifactId>
        <version>${version.commons-lang}</version>
      </dependency>

      <!-- Sunrise and Sunset calculator -->
      <dependency>
        <groupId>com.luckycatlabs</groupId>
        <artifactId>SunriseSunsetCalculator</artifactId>
        <version>${version.com.luckycatlabs}</version>
      </dependency>

      <!-- Email client -->
      <dependency>
        <groupId>org.apache.commons</groupId>
        <artifactId>commons-email</artifactId>
        <version>${version.org.apache.commons}</version>
      </dependency>

      <!-- Apache Commons Codec -->
      <dependency>
        <groupId>commons-codec</groupId>
        <artifactId>commons-codec</artifactId>
        <version>${version.commons-codec}</version>
      </dependency>

      <!-- MQTT client -->
      <dependency>
        <groupId>org.eclipse.paho</groupId>
        <artifactId>org.eclipse.paho.client.mqttv3</artifactId>
        <version>${version.org.eclipse.paho}</version>
      </dependency>

      <!-- MQTT broker -->
      <dependency>
        <groupId>io.moquette</groupId>
        <artifactId>moquette-broker</artifactId>
        <version>${version.moquette-broker}</version>
        <exclusions>
          <exclusion>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
          </exclusion>
        </exclusions>
      </dependency>

      <!-- Apache HttpComponents -->
      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpclient</artifactId>
        <version>${version.apache.httpclient}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.httpcomponents</groupId>
        <artifactId>httpcore</artifactId>
        <version>${version.apache.httpcore}</version>
      </dependency>

      <!-- FlyWay database migration -->
      <dependency>
        <groupId>org.flywaydb</groupId>
        <artifactId>flyway-core</artifactId>
        <version>${version.org.flywaydb}</version>
      </dependency>

      <!-- Project lombok builder annotation -->
      <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>${version.org.projectlombok}</version>
        <scope>provided</scope>
      </dependency>

      <!-- EasyRules - rule engine -->
      <dependency>
        <groupId>org.easyrules</groupId>
        <artifactId>easyrules-core</artifactId>
        <version>${version.org.easyrules}</version>
      </dependency>

      <!-- freemarker - template engine -->
      <dependency>
        <groupId>org.freemarker</groupId>
        <artifactId>freemarker</artifactId>
        <version>${version.org.freemarker}</version>
      </dependency>

      <!-- freemarker - template engine jsr 223 support-->
      <dependency>
        <groupId>org.camunda.template-engines</groupId>
        <artifactId>camunda-template-engines-freemarker</artifactId>
        <exclusions>
          <exclusion>
            <groupId>org.freemarker</groupId>
            <artifactId>freemarker</artifactId>
          </exclusion>
          <exclusion>
            <groupId>org.camunda.commons</groupId>
            <artifactId>camunda-commons-logging</artifactId>
          </exclusion>
        </exclusions>
        <version>${version.org.camunda.template-engines}</version>
      </dependency>

      <!-- Groovy core -->
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy</artifactId>
        <version>${version.org.codehaus.groovy}</version>
      </dependency>

      <!-- Groovy jsr233 scripting support -->
      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-jsr223</artifactId>
        <version>${version.org.codehaus.groovy}</version>
      </dependency>

      <!-- Jython dependency, only to compile -->
      <dependency>
        <groupId>org.python</groupId>
        <artifactId>jython</artifactId>
        <version>${version.org.python}</version>
        <scope>provided</scope>
      </dependency>

      <!-- Java YAML - snakeyaml -->
      <dependency>
        <groupId>org.yaml</groupId>
        <artifactId>snakeyaml</artifactId>
        <version>${version.org.yaml.snakeyaml}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <build>
    <pluginManagement>
      <plugins>

        <plugin>
          <groupId>com.mycila</groupId>
          <artifactId>license-maven-plugin</artifactId>
          <version>${version.com.mycila.license-maven-plugin}</version>
        </plugin>

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

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>${version.maven-assembly-plugin}</version>
          <configuration>
            <tarLongFileMode>gnu</tarLongFileMode>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-checkstyle-plugin</artifactId>
          <version>${version.maven-checkstyle-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>${version.maven-clean-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>${version.maven-compiler-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>${version.maven-dependency-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>${version.maven-deploy-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-enforcer-plugin</artifactId>
          <version>${version.maven-enforcer-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-failsafe-plugin</artifactId>
          <version>${version.maven-failsafe-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>${version.maven-install-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>${version.maven-jar-plugin}</version>
          <configuration>
            <archive>
              <manifest>
                <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              </manifest>
              <compress>true</compress>
            </archive>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>${version.maven-javadoc-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-release-plugin</artifactId>
          <version>${version.maven-release-plugin}</version>
          <configuration>
            <tagNameFormat>@{project.version}</tagNameFormat>
            <preparationGoals>package</preparationGoals>
            <goals>deploy</goals>
            <releaseProfiles>release</releaseProfiles>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>${version.maven-resources-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>${version.maven-site-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-shade-plugin</artifactId>
          <version>${version.maven-shade-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>${version.maven-source-plugin}</version>
        </plugin>

        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>${version.maven-surefire-plugin}</version>
          <configuration>
            <argLine>-Xmx512m</argLine>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.sonatype.plugins</groupId>
          <artifactId>nexus-staging-maven-plugin</artifactId>
          <version>${version.nexus-staging-maven-plugin}</version>
        </plugin>

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

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

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

        <plugin>
          <groupId>org.l2x6.maven.srcdeps</groupId>
          <artifactId>srcdeps-maven-plugin</artifactId>
          <version>${version.srcdeps-maven-plugin}</version>
          <extensions>true</extensions>
          <configuration>
            <repositories>
              <repository>
                <id>mycontroller</id>
                <selectors>
                  <selector>org.mycontroller.mycontroller</selector>
                </selectors>
                <url>${mycontroller.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
            </repositories>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>

    <plugins>
      <!-- Ordering: same as pluginManagement - alphabetic by the version property -->

      <plugin>
        <groupId>com.mycila</groupId>
        <artifactId>license-maven-plugin</artifactId>
        <configuration>
          <header>${license.headerTemplatePath}</header>
          <excludes>
            <exclude>**/.bowerrc</exclude>
            <exclude>**/.jshintrc</exclude>
            <exclude>**/LICENSE</exclude>
            <exclude>**/README</exclude>
            <exclude>**/README.*</exclude>
            <exclude>**/.travis.force.build</exclude>
            <exclude>**/*.adoc</exclude>
            <exclude>**/*.d.ts</exclude>
            <exclude>**/*.eot</exclude>
            <exclude>**/*.otf</exclude>
            <exclude>**/*.ttf</exclude>
            <exclude>**/*.svg</exclude>
            <exclude>**/*.woff</exclude>
            <exclude>**/*.html</exclude>
            <exclude>**/*.htm</exclude>
            <exclude>**/www/libs/**</exclude>
            <exclude>**/*.jks</exclude>
            <exclude>**/.tx/config</exclude>
          </excludes>
          <mapping>
            <conf>SCRIPT_STYLE</conf>
            <cql>DOUBLEDASHES_STYLE</cql>
            <css>SLASHSTAR_STYLE</css>
            <Dockerfile>SCRIPT_STYLE</Dockerfile>
            <drl>SLASHSTAR_STYLE</drl>
            <editorconfig>SCRIPT_STYLE</editorconfig>
            <g4>SLASHSTAR_STYLE</g4>
            <gradle>SLASHSTAR_STYLE</gradle>
            <gradlew>SCRIPT_STYLE</gradlew>
            <groovy>SLASHSTAR_STYLE</groovy>
            <iql>DOUBLEDASHES_STYLE</iql>
            <jshintrc>SLASHSTAR_STYLE</jshintrc>
            <java>SLASHSTAR_STYLE</java>
            <less>SLASHSTAR_STYLE</less>
            <wsdl>XML_STYLE</wsdl>
            <yaml>SCRIPT_STYLE</yaml>
            <yml>SCRIPT_STYLE</yml>
          </mapping>
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.mycila</groupId>
            <artifactId>license-maven-plugin-git</artifactId>
            <version>${version.com.mycila.license-maven-plugin}</version>
          </dependency>
          <dependency>
            <groupId>org.mycontroller</groupId>
            <artifactId>mycontroller-build-tools</artifactId>
            <version>${version.org.mycontroller.mycontroller-build-tools}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-checkstyle-plugin</artifactId>
        <configuration>
          <configLocation>${checkstyle.configLocation}</configLocation>
          <consoleOutput>${checkstyle.consoleOutput}</consoleOutput>
          <failsOnError>${checkstyle.failOnError}</failsOnError>
          <!-- Make includes relative to ${basedir} -->
          <sourceDirectory>${basedir}</sourceDirectory>
          <!-- in <includes>, it is necessary to avoid using an item-initial **/ wildcard which pulls in also files from all submodules and target folders.
            We do not want that. We rather have to name specific root folder patterns like *.extension or directory/**/*.extension -->
          <includes>${mycontroller.checkstyle.includes}</includes>
          <excludes>${mycontroller.checkstyle.excludes}</excludes>
          <!-- to override in a submodule, just redefine the checkstyle.suppressions.file property in the given submodule's pom -->
          <suppressionsLocation>${checkstyle.suppressions.file}</suppressionsLocation>
          <useFile />
        </configuration>
        <dependencies>
          <dependency>
            <groupId>com.puppycrawl.tools</groupId>
            <artifactId>checkstyle</artifactId>
            <version>${version.com.puppycrawl.tools.checkstyle}</version>
            <exclusions>
              <exclusion>
                <groupId>com.sun</groupId>
                <artifactId>tools</artifactId>
              </exclusion>
            </exclusions>
          </dependency>
          <dependency>
            <groupId>org.mycontroller</groupId>
            <artifactId>mycontroller-build-tools</artifactId>
            <version>${version.org.mycontroller.mycontroller-build-tools}</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>check-style</id>
            <phase>verify</phase>
            <goals>
              <goal>checkstyle</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <optimize>true</optimize>
          <debug>true</debug>
          <showDeprecation>true</showDeprecation>
          <!-- Workaround for https://jira.codehaus.org/browse/MCOMPILER-236 present in compiler plugin 3.2 -->
          <useIncrementalCompilation>false</useIncrementalCompilation>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
              <Built-From-Git-SHA1>${buildNumber}</Built-From-Git-SHA1>
              <Built-On>${timestamp}</Built-On>
              <Built-From-Git-Branch>${scmBranch}</Built-From-Git-Branch>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-rules</id>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <requireMavenVersion>
              <version>[3.2.5,)</version>
            </requireMavenVersion>
            <requireJavaVersion>
              <version>[1.8,)</version>
            </requireJavaVersion>
            <requireNoRepositories />
            <requirePluginVersions />
            <requireProperty>
              <!-- stronger version of https://developer.jboss.org/wiki/JBossProjectVersioning -->
              <property>project.version</property>
              <message>Project version must be specified.</message>
              <regex>${enforcer.project.version.pattern}</regex>
              <regexMessage>${enforcer.project.version.message}</regexMessage>
            </requireProperty>
          </rules>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <configuration>
          <locale>en_US</locale>
          <timestampFormat>{0,date,yyyy-MM-dd'T'HH:mm:ssXX}</timestampFormat>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <!-- *.xml and *.xsl are included by default -->
        <executions>
          <execution>
            <id>xml-check-format</id>
            <phase>verify</phase>
            <goals>
              <goal>check-format</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.l2x6.maven.srcdeps</groupId>
        <artifactId>srcdeps-maven-plugin</artifactId>
        <extensions>true</extensions>
      </plugin>

    </plugins>
  </build>

  <profiles>
    <!-- Ordering: alphabetic by id -->

    <profile>
      <id>community.repositories</id>
      <activation>
        <property>
          <name>!disable.community.repositories</name>
        </property>
      </activation>

      <repositories>
        <repository>
          <id>oss-snapshots-repo</id>
          <name>Sonatype OSS Maven Repository</name>
          <url>https://oss.sonatype.org/content/groups/public/</url>
          <snapshots>
            <enabled>true</enabled>
            <updatePolicy>always</updatePolicy>
          </snapshots>
        </repository>
        <repository>
          <id>Eclipse Paho Repo</id>
          <url>https://repo.eclipse.org/content/repositories/paho-releases/</url>
        </repository>
        <repository>
          <id>moquette-bintray</id>
          <url>http://dl.bintray.com/andsel/maven/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>

    </profile>

    <profile>
      <id>release</id>
      <properties>
        <!-- This makes the buildnumber-maven-plugin fail in case of uncommitted local changes -->
        <maven.buildNumber.doCheck>true</maven.buildNumber.doCheck>

        <!-- maven-enforcer-plugin -->
        <enforcer.project.version.pattern>^(\d{1,4})(\.\d{1,3})?(\.\d{1,3})?(\.Alpha\d{1,2}|\.Beta\d{1,2}|\.CR\d{1,2}|\.Final)?$</enforcer.project.version.pattern>
        <enforcer.project.version.message>Project version must be in the
          form of one of the following (x,y,z stands for any numbers):
          "x", "x.y", "x.y.z". There may be also a qualifier at the end.
          Qualifier can be one of the following: ".AlphaX", ".BetaX",
          ".CRX", ".Final", where X denotes a number.</enforcer.project.version.message>

      </properties>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalparam>${javadoc.doclint}</additionalparam>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.5</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>

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

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

    <profile>
      <id>snapshots</id>
      <repositories>
        <repository>
          <id>snapshots.jboss.org</id>
          <name>JBoss Snapshot Repository</name>
          <url>http://snapshots.jboss.org/maven2</url>
          <releases>
            <enabled>false</enabled>
          </releases>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>

    <profile>
      <id>test.debug</id>
      <activation>
        <property>
          <name>test.debug</name>
        </property>
      </activation>

      <properties>
        <!-- See: http://maven.apache.org/plugins/maven-surefire-plugin/test-mojo.html#debugForkedProcess -->
        <maven.surefire.debug>-Xdebug -Xnoagent -Djava.compiler=NONE
          -Xrunjdwp:transport=dt_socket,address=8789,server=y,suspend=y</maven.surefire.debug>
      </properties>
    </profile>


  </profiles>
</project>
