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

    Copyright 2015 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>13</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>13</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>

    <!-- 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.1.1</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>
    <!-- the default value pointing at suppressions.xml in hawkular-build-tools -->
    <checkstyle.suppressions.file>hawkular-checkstyle/suppressions.xml</checkstyle.suppressions.file>

    <!-- 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>

    <!-- hawkular-build-tools are used by both maven-checkstyle-plugin and lisense-plugin -->
    <version.org.hawkular.hawkular-build-tools>9</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.10</version.com.mycila.license-maven-plugin>
    <version.exec-maven-plugin>1.3.2</version.exec-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.13</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-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.2</version.maven-javadoc-plugin>
    <version.maven-release-plugin>2.5.1</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-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.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.xml-maven-plugin>1.0</version.org.codehaus.mojo.xml-maven-plugin>
    <version.wildfly-extension-maven-plugin>0.6.0</version.wildfly-extension-maven-plugin>

    <!-- Repository Deployment URLs -->
    <jboss.releases.repo.url>
      https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/
    </jboss.releases.repo.url>
    <jboss.snapshots.repo.url>
      https://repository.jboss.org/nexus/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
    -->
    <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.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>
    <version.org.jboss.logging>3.1.0.GA</version.org.jboss.logging>
    <version.org.jboss.logging.jboss-logging-annotations>1.2.0.Final</version.org.jboss.logging.jboss-logging-annotations>
    <version.org.jboss.logging.jboss-logging-processor>1.2.0.Final</version.org.jboss.logging.jboss-logging-processor>
    <version.org.jboss.spec.javax.ejb.jboss-ejb-api_3.1_spec>1.0.2.Final</version.org.jboss.spec.javax.ejb.jboss-ejb-api_3.1_spec>
    <version.org.jboss.spec.javax.servlet.jboss-servlet-api_3.1_spec>1.0.0.Final</version.org.jboss.spec.javax.servlet.jboss-servlet-api_3.1_spec>
    <version.org.testng>6.5.2</version.org.testng>
    <version.org.wildfly>8.2.0.Final</version.org.wildfly>

  </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
      -->

      <!-- 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>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>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging</artifactId>
        <version>${version.org.jboss.logging}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-annotations</artifactId>
        <version>${version.org.jboss.logging.jboss-logging-annotations}</version>
      </dependency>
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-processor</artifactId>
        <version>${version.org.jboss.logging.jboss-logging-processor}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.spec.javax.ejb</groupId>
        <artifactId>jboss-ejb-api_3.1_spec</artifactId>
        <version>${version.org.jboss.spec.javax.ejb.jboss-ejb-api_3.1_spec}</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.spec.javax.servlet</groupId>
        <artifactId>jboss-servlet-api_3.1_spec</artifactId>
        <version>${version.org.jboss.spec.javax.servlet.jboss-servlet-api_3.1_spec}</version>
        <scope>provided</scope>
      </dependency>

      <!-- WildFly BOM - this also includes the org.jboss.spec:jboss-javaee-7.0 dependencies -->
      <dependency>
        <groupId>org.wildfly.bom</groupId>
        <artifactId>jboss-javaee-7.0-with-all</artifactId>
        <version>${version.org.wildfly}</version>
        <type>pom</type>
        <scope>import</scope>
      </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>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-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>
          </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-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.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>xml-maven-plugin</artifactId>
          <version>${version.org.codehaus.mojo.xml-maven-plugin}</version>
        </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>**/*.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>
            <Dockerfile>SCRIPT_STYLE</Dockerfile>
            <drl>SLASHSTAR_STYLE</drl>
            <g4>SLASHSTAR_STYLE</g4>
            <iql>DOUBLEDASHES_STYLE</iql>
            <jshintrc>SLASHSTAR_STYLE</jshintrc>
            <java>SLASHSTAR_STYLE</java>
            <less>SLASHSTAR_STYLE</less>
            <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>
            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,
            src/**/*.xsl,
            *.yml,
            src/**/*.yml,
            src/**/*.yaml,
          </includes>
          <excludes>
            release.properties,
            **/*.d.ts,
          </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>
          </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.0.4,)</version>
            </requireMavenVersion>
            <requireJavaVersion>
              <version>[1.8,)</version>
            </requireJavaVersion>
            <requireNoRepositories />
            <requirePluginVersions />
          </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>

    </plugins>
  </build>

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

    <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>
      </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>community.repositories</id>
      <activation>
        <property>
          <name>!disable.community.repositories</name>
        </property>
      </activation>

      <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>

        <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>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=8787,server=y,suspend=y</maven.surefire.debug>
      </properties>
    </profile>


  </profiles>
</project>
