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

    Copyright 2015-2016 Red Hat, Inc. and/or its affiliates
    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.hawkular</groupId>
  <artifactId>hawkular-parent</artifactId>
  <version>32</version>
  <packaging>pom</packaging>

  <name>Hawkular Parent</name>
  <description>Hawkular Parent POM</description>
  <url>http://github.com/hawkular</url>
  <inceptionYear>2015</inceptionYear>
  <organization>
    <name>Red Hat, Inc.</name>
    <url>http://redhat.com/</url>
  </organization>
  <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>ppalaga</id>
      <name>Peter Palaga</name>
      <timezone>Europe/Prague</timezone>
    </developer>
  </developers>

  <mailingLists>
    <mailingList>
      <name>Hawkular Developer List</name>
      <subscribe>https://lists.jboss.org/mailman/listinfo/hawkular-dev</subscribe>
      <unsubscribe>https://lists.jboss.org/mailman/listinfo/hawkular-dev</unsubscribe>
      <archive>http://lists.jboss.org/pipermail/hawkular-dev</archive>
    </mailingList>
  </mailingLists>

  <scm>
    <connection>scm:git:git@github.com:hawkular/hawkular-parent-pom.git</connection>
    <developerConnection>scm:git:git@github.com:hawkular/hawkular-parent-pom.git</developerConnection>
    <url>https://github.com/hawkular/hawkular-parent-pom</url>
    <tag>32</tag>
  </scm>
  <issueManagement>
    <system>jira</system>
    <url>https://issues.jboss.org/browse/HAWKULAR</url>
  </issueManagement>
  <distributionManagement>
    <repository>
      <id>jboss-releases-repository</id>
      <name>JBoss Releases Repository</name>
      <url>${jboss.releases.repo.url}</url>
    </repository>
    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshots Repository</name>
      <url>${jboss.snapshots.repo.url}</url>
    </snapshotRepository>
  </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 hawkular-build-tools -->
    <checkstyle.configLocation>hawkular-checkstyle/checkstyle.xml</checkstyle.configLocation>
    <checkstyle.consoleOutput>true</checkstyle.consoleOutput>
    <checkstyle.failOnError>true</checkstyle.failOnError>
    <hawkular.checkstyle.includes>
      src/**/*.java,
      src/**/*.js,
      *.adoc,
      src/**/*.adoc,
      *.conf,
      src/**/*.conf,
      src/**/*.cql,
      src/**/*.css,
      Dockerfile,
      src/**/Dockerfile,
      src/**/*.groovy,
      src/**/*.json,
      src/**/*.js.map,
      *.md,
      src/**/*.md,
      *.properties,
      src/**/*.properties,
      *.sh,
      src/**/*.sh,
      *.txt,
      src/**/*.txt,
      *.yml,
      src/**/*.yml,
      src/**/*.yaml,
    </hawkular.checkstyle.includes>
    <hawkular.checkstyle.excludes>
      release.properties,
      **/*.d.ts,
      **/vendor/*.js,
    </hawkular.checkstyle.excludes>
    <!-- the default value pointing at suppressions.xml in hawkular-build-tools -->
    <checkstyle.suppressions.file>hawkular-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>hawkular-license/jboss-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
    -->
    <hawkular.scm.url>scm:git:https://github.com/hawkular/hawkular.git</hawkular.scm.url>
    <accounts.scm.url>scm:git:https://github.com/hawkular/hawkular-accounts.git</accounts.scm.url>
    <agent.scm.url>scm:git:https://github.com/hawkular/hawkular-agent.git</agent.scm.url>
    <alerts.scm.url>scm:git:https://github.com/hawkular/hawkular-alerts.git</alerts.scm.url>
    <btm.scm.url>scm:git:https://github.com/hawkular/hawkular-btm.git</btm.scm.url>
    <commons.scm.url>scm:git:https://github.com/hawkular/hawkular-commons.git</commons.scm.url>
    <cmdgw.scm.url>scm:git:https://github.com/hawkular/hawkular-command-gateway.git</cmdgw.scm.url>
    <inventory.scm.url>scm:git:https://github.com/hawkular/hawkular-inventory.git</inventory.scm.url>
    <metrics.scm.url>scm:git:https://github.com/hawkular/hawkular-metrics.git</metrics.scm.url>
    <keycloak.scm.url>scm:git:https://github.com/keycloak/keycloak.git</keycloak.scm.url>
    <srcdeps.quiet>true</srcdeps.quiet>
    <srcdeps.skipTests>true</srcdeps.skipTests>

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

    <!--
      Maven plugin versions
        Naming convention: version.${artifactId} whenever unique enough; otherwise version.${groupId}.${artifactId}
        Ordering: alphabetic
    -->
    <version.com.github.kongchen.swagger-maven-plugin>2.3.3</version.com.github.kongchen.swagger-maven-plugin>
    <version.com.mycila.license-maven-plugin>2.11</version.com.mycila.license-maven-plugin>
    <version.exec-maven-plugin>1.3.2</version.exec-maven-plugin>
    <version.gatling-maven-plugin>2.1.6</version.gatling-maven-plugin>
    <version.maven-antrun-plugin>1.7</version.maven-antrun-plugin>
    <version.maven-assembly-plugin>2.5.4</version.maven-assembly-plugin>
    <version.maven-checkstyle-plugin>2.15</version.maven-checkstyle-plugin>
    <version.maven-clean-plugin>2.6</version.maven-clean-plugin>
    <version.maven-compiler-plugin>3.2</version.maven-compiler-plugin>
    <version.maven-ear-plugin>2.10</version.maven-ear-plugin>
    <version.maven-dependency-plugin>2.9</version.maven-dependency-plugin>
    <version.maven-deploy-plugin>2.8.2</version.maven-deploy-plugin>
    <version.maven-ejb-plugin>2.5.1</version.maven-ejb-plugin>
    <version.maven-enforcer-plugin>1.3.1</version.maven-enforcer-plugin>
    <version.maven-failsafe-plugin>2.18.1</version.maven-failsafe-plugin>
    <version.maven-install-plugin>2.5.2</version.maven-install-plugin>
    <version.maven-jar-plugin>2.5</version.maven-jar-plugin>
    <version.maven-javadoc-plugin>2.10.3</version.maven-javadoc-plugin>
    <version.maven-release-plugin>2.5.2</version.maven-release-plugin>
    <version.maven-resources-plugin>2.7</version.maven-resources-plugin>
    <version.maven-site-plugin>3.4</version.maven-site-plugin>
    <version.maven-shade-plugin>2.4.2</version.maven-shade-plugin>
    <version.maven-source-plugin>2.4</version.maven-source-plugin>
    <version.maven-surefire-plugin>2.17</version.maven-surefire-plugin>
    <version.maven-war-plugin>2.5</version.maven-war-plugin>
    <version.nexus-staging-maven-plugin>1.6.5</version.nexus-staging-maven-plugin>
    <version.org.codehaus.buildnumber-maven-plugin>1.3</version.org.codehaus.buildnumber-maven-plugin>
    <version.org.codehaus.gmavenplus.gmavenplus-plugin>1.2</version.org.codehaus.gmavenplus.gmavenplus-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>
    <version.wildfly-maven-plugin>1.1.0.Alpha5</version.wildfly-maven-plugin>
    <version.wildfly-extension-maven-plugin>0.6.0</version.wildfly-extension-maven-plugin>

    <!-- wildfly-server-provisioning-maven-plugin and wildfly-feature-pack-build-maven-plugin -->
    <version.org.wildfly.build>1.1.2.Final</version.org.wildfly.build>

    <!-- Repository Deployment URLs -->
    <jboss.nexus.base.url>https://repository.jboss.org/nexus</jboss.nexus.base.url>
    <jboss.releases.repo.url>${jboss.nexus.base.url}/service/local/staging/deploy/maven2/</jboss.releases.repo.url>
    <jboss.snapshots.repo.url>${jboss.nexus.base.url}/content/repositories/snapshots/</jboss.snapshots.repo.url>

    <!--
      The Internal Bill of Materials (BoM) - i.e. the common dependencies used by Hawkular projects

      Please rely on managed artifacts rather than directly on these properties

      Naming convention: version.${groupId} whenever unique enough; otherwise version.${groupId}.${artifactId}
      Ordering: alphabetic
    -->
    <!-- keep in sync with version.org.apache.cassandra -->
    <version.com.datastax.cassandra>2.2.0-rc3</version.com.datastax.cassandra>
    <!-- keep in sync with modules/system/layers/base/com/fasterxml/jackson/core of the current WildFly/EAP -->
    <version.com.fasterxml.jackson.core>2.5.4</version.com.fasterxml.jackson.core>
    <version.com.google.code.gson>2.2.4</version.com.google.code.gson>
    <version.com.google.guava>16.0.1</version.com.google.guava>
    <version.com.wordnik.swagger>1.3.12</version.com.wordnik.swagger>
    <version.gnu.getopt>1.0.13</version.gnu.getopt>
    <version.io.gatling.highcharts>2.1.6</version.io.gatling.highcharts>
    <version.org.codehaus.groovy>2.3.8</version.org.codehaus.groovy>
    <version.org.codehaus.groovy.modules.http-builder>0.7</version.org.codehaus.groovy.modules.http-builder>
    <version.junit>4.12</version.junit>
    <version.org.apache.activemq>5.10.0</version.org.apache.activemq>
    <!-- keep in sync with version.com.datastax.cassandra -->
    <version.org.apache.cassandra>2.2.2</version.org.apache.cassandra>

    <!-- Note that we are maintaining only the version here rather than e.g. importing arquillian-bom -->
    <version.org.jboss.arquillian>1.1.10.Final</version.org.jboss.arquillian>

    <!-- keep in sync with version.org.wildfly -->
    <version.org.jboss.common.jboss-common-beans>2.0.0.Final</version.org.jboss.common.jboss-common-beans>
    <!-- keep in sync with version.org.wildfly.core -->
    <version.org.jboss.jboss-dmr>1.3.0.Final</version.org.jboss.jboss-dmr>
    <!-- keep in sync with version.org.wildfly.core -->
    <version.org.jboss.msc>1.2.6.Final</version.org.jboss.msc>

    <version.org.keycloak.secretstore>1.0.4.Final</version.org.keycloak.secretstore>

    <version.org.mockito>1.10.19</version.org.mockito>
    <version.org.testng>6.9.6</version.org.testng>

    <!--
      If you change wildfly versions, refer to the pom in org.wildfly.core:wildfly-core-parent to obtain
      the proper versions for version.org.jboss.jboss-dmr and version.org.jboss.msc and others above since
      those aren't in the BOM so we need to track them ourselves.

      ${version.org.wildfly} can be used to import WildFly BoM in subprojects as follows:
      <dependency>
        <groupId>org.wildfly.bom</groupId>
        <artifactId>wildfly-javaee7</artifactId>
        <version>${version.org.wildfly}</version>
        <type>pom</type>
        <scope>import</scope>
      </dependency>

    -->
    <version.org.wildfly>10.0.0.CR5</version.org.wildfly>
    <version.org.wildfly.core>2.0.5.Final</version.org.wildfly.core>
  </properties>

  <dependencyManagement>
    <dependencies>
      <!--
        Be very careful when considering a dependency with <scope>import</scope>.
        Other kinds of scope (such as test and provided) do not belong here ar any circumstances.
        Ordering: alphabetic by version property
      -->

      <dependency>
        <groupId>com.datastax.cassandra</groupId>
        <artifactId>cassandra-driver-core</artifactId>
        <version>${version.com.datastax.cassandra}</version>
      </dependency>

      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>${version.com.fasterxml.jackson.core}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>${version.com.fasterxml.jackson.core}</version>
      </dependency>
      <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>${version.com.fasterxml.jackson.core}</version>
      </dependency>

      <!-- Swagger REST annotations -->
      <dependency>
        <groupId>com.wordnik</groupId>
        <artifactId>swagger-annotations</artifactId>
        <version>${version.com.wordnik.swagger}</version>
      </dependency>
      <dependency>
        <groupId>com.wordnik</groupId>
        <artifactId>swagger-core_2.10</artifactId>
        <version>${version.com.wordnik.swagger}</version>
      </dependency>

      <dependency>
        <groupId>io.gatling.highcharts</groupId>
        <artifactId>gatling-charts-highcharts</artifactId>
        <version>${version.io.gatling.highcharts}</version>
      </dependency>

      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
      </dependency>

      <dependency>
        <groupId>org.apache.cassandra</groupId>
        <artifactId>cassandra-all</artifactId>
        <version>${version.org.apache.cassandra}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>${version.org.codehaus.groovy}</version>
      </dependency>
      <dependency>
        <groupId>org.codehaus.groovy.modules.http-builder</groupId>
        <artifactId>http-builder</artifactId>
        <version>${version.org.codehaus.groovy.modules.http-builder}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.common</groupId>
        <artifactId>jboss-common-beans</artifactId>
        <version>${version.org.jboss.common.jboss-common-beans}</version>
      </dependency>

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

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

      <dependency>
        <groupId>org.keycloak.secretstore</groupId>
        <artifactId>secret-store-undertow-filter</artifactId>
        <version>${version.org.keycloak.secretstore}</version>
      </dependency>

      <dependency>
        <groupId>org.mockito</groupId>
        <artifactId>mockito-core</artifactId>
        <version>${version.org.mockito}</version>
      </dependency>

      <dependency>
        <groupId>org.testng</groupId>
        <artifactId>testng</artifactId>
        <version>${version.org.testng}</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

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

        <plugin>
          <groupId>com.github.kongchen</groupId>
          <artifactId>swagger-maven-plugin</artifactId>
          <version>${version.com.github.kongchen.swagger-maven-plugin}</version>
        </plugin>

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

        <plugin>
          <groupId>io.gatling</groupId>
          <artifactId>gatling-maven-plugin</artifactId>
          <version>${version.gatling-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-antrun-plugin</artifactId>
          <version>${version.maven-antrun-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-ear-plugin</artifactId>
          <version>${version.maven-ear-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-ejb-plugin</artifactId>
          <version>${version.maven-ejb-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.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>${version.maven-war-plugin}</version>
        </plugin>

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

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

        <plugin>
          <groupId>org.codehaus.gmavenplus</groupId>
          <artifactId>gmavenplus-plugin</artifactId>
          <version>${version.org.codehaus.gmavenplus.gmavenplus-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>hawkular</id>
                <selectors>
                  <selector>org.hawkular.hawkular</selector>
                </selectors>
                <url>${hawkular.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>accounts</id>
                <selectors>
                  <selector>org.hawkular.accounts</selector>
                </selectors>
                <url>${accounts.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>agent</id>
                <selectors>
                  <selector>org.hawkular.agent</selector>
                </selectors>
                <url>${agent.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>alerts</id>
                <selectors>
                  <selector>org.hawkular.alerts</selector>
                </selectors>
                <url>${alerts.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>btm</id>
                <selectors>
                  <selector>org.hawkular.btm</selector>
                </selectors>
                <url>${btm.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>commons</id>
                <selectors>
                  <selector>org.hawkular.commons</selector>
                </selectors>
                <url>${commons.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>cmdgw</id>
                <selectors>
                  <selector>org.hawkular.cmdgw</selector>
                </selectors>
                <url>${cmdgw.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>inventory</id>
                <selectors>
                  <selector>org.hawkular.inventory</selector>
                </selectors>
                <url>${inventory.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>metrics</id>
                <selectors>
                  <selector>org.hawkular.metrics</selector>
                </selectors>
                <url>${metrics.scm.url}</url>
                <buildArgs>
                  <buildArg>-Dcheckstyle.skip=true</buildArg>
                  <buildArg>-Dlicense.skip=true</buildArg>
                  <buildArg>-Drevapi.skip=true</buildArg>
                </buildArgs>
              </repository>
              <repository>
                <id>keycloak</id>
                <selectors>
                  <selector>org.keycloak</selector>
                </selectors>
                <url>${keycloak.scm.url}</url>
                <buildArgs>
                  <buildArg>-Pdistribution</buildArg>
                  <buildArg>-Dwildfly.version=${version.org.wildfly}</buildArg>
                  <buildArg>-Dwildfly.core.version=${version.org.wildfly.core}</buildArg>
                  <buildArg>-Dwildfly.build-tools.version=${version.org.wildfly.build}</buildArg>
                  <buildArg>--projects</buildArg>
                  <buildArg>distribution/feature-packs/adapter-feature-pack,distribution/feature-packs/server-feature-pack</buildArg>
                  <buildArg>--also-make</buildArg>
                </buildArgs>
              </repository>
            </repositories>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.wildfly.build</groupId>
          <artifactId>wildfly-feature-pack-build-maven-plugin</artifactId>
          <version>${version.org.wildfly.build}</version>
        </plugin>

        <plugin>
          <groupId>org.wildfly.build</groupId>
          <artifactId>wildfly-server-provisioning-maven-plugin</artifactId>
          <version>${version.org.wildfly.build}</version>
        </plugin>

        <plugin>
          <groupId>org.wildfly.plugins</groupId>
          <artifactId>wildfly-maven-plugin</artifactId>
          <version>${version.wildfly-maven-plugin}</version>
          <configuration>
            <version>${version.org.wildfly}</version>
          </configuration>
        </plugin>

        <plugin>
          <groupId>org.wildfly.plugins</groupId>
          <artifactId>wildfly-extension-maven-plugin</artifactId>
          <version>${version.wildfly-extension-maven-plugin}</version>
        </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>
          </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.hawkular</groupId>
            <artifactId>hawkular-build-tools</artifactId>
            <version>${version.org.hawkular.hawkular-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>${hawkular.checkstyle.includes}</includes>
          <excludes>${hawkular.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.hawkular</groupId>
            <artifactId>hawkular-build-tools</artifactId>
            <version>${version.org.hawkular.hawkular-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-ear-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-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.apache.maven.plugins</groupId>
        <artifactId>maven-war-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.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <configuration>
          <locale>en_US</locale>
          <timestampFormat>{0,date,yyyy-MM-dd'T'HH:mm:ssX}</timestampFormat>
        </configuration>
        <executions>
          <execution>
            <phase>validate</phase>
            <goals>
              <goal>create</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.gmavenplus</groupId>
        <artifactId>gmavenplus-plugin</artifactId>
        <executions>
          <execution>
            <goals>
              <goal>addSources</goal>
              <goal>addTestSources</goal>
              <goal>compile</goal>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>xml-maven-plugin</artifactId>
        <configuration>
          <formatFileSets>
            <!-- *.xml and *.xsl are included by default -->
            <formatFileSet>
              <directory>${basedir}</directory>
              <includes>
                <include>*.html</include>
                <include>src/**/*.html</include>
                <!-- do not add includes staring with ** unless you want to include all submodules and their target dirs -->
              </includes>
            </formatFileSet>
          </formatFileSets>
        </configuration>
        <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>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>

      <pluginRepositories>
        <pluginRepository>
          <id>jboss-public-repository-group</id>
          <name>JBoss Public Maven Repository Group</name>
          <url>https://repository.jboss.org/nexus/content/groups/public-jboss/</url>
          <layout>default</layout>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </pluginRepository>
      </pluginRepositories>
    </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>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>release-guiless</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <extensions>true</extensions>
            <configuration>
              <nexusUrl>${jboss.nexus.base.url}</nexusUrl>
              <!-- The server "id" element from settings to use authentication from -->
              <serverId>jboss-releases-repository</serverId>
            </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>
