<?xml version="1.0" encoding="UTF-8"?>
<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>

  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <version>14</version>
  </parent>

  <groupId>io.hawt</groupId>
  <artifactId>project</artifactId>
  <packaging>pom</packaging>
  <version>1.4.0.redhat-630291</version>
  <name>project</name>
  <description>hawtio :: project</description>
  <url>http://hawt.io/</url>

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

  <scm>
    <connection>scm:git:git@github.com:hawtio/hawtio.git</connection>
    <developerConnection>scm:git:git@github.com:hawtio/hawtio.git</developerConnection>
    <url>git@github.com:hawtio/hawtio.git</url>
    <tag>hawtio-1.4.3</tag>
  </scm>

  <distributionManagement>
    <repository>
      <id>oss-sonatype-staging</id>
      <name>Sonatype Staging Repository</name>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
    </repository>
    <snapshotRepository>
      <id>oss-sonatype-snapshots</id>
      <name>OSS Sonatype Nexus Snapshots</name>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

  <prerequisites>
    <maven>3.1.1</maven>
  </prerequisites>

  <properties>
    <jettyPort>8383</jettyPort>
    <context>/hawtio</context>
    <hawtio-config-dir>${basedir}/hawtio-config</hawtio-config-dir>
    <hawtio-config-repo>https://github.com/hawtio/hawtio-config.git</hawtio-config-repo>
    <maven.compiler.source>1.7</maven.compiler.source>
    <maven.compiler.target>1.7</maven.compiler.target>

    <webapp-dir>${project.artifactId}-${project.version}</webapp-dir>
    <webapp-outdir>${basedir}/target/${webapp-dir}</webapp-outdir>
    <schema-outdir>${basedir}/src/main/webapp/lib</schema-outdir>
    <appjs-outfile>${webapp-outdir}/app/app.js</appjs-outfile>

    <!-- redhat -->
    <!-- fabric test version points to a previous release version to break cycle with fabric -->
    <!-- we disable redhat as that is for jboss-fuse
    <perfectus-number>291</perfectus-number>
    <perfectus-previous-number>355</perfectus-previous-number>
    <perfectus-build>610${perfectus-number}</perfectus-build>
    <fabric-test-version>1.0.0.redhat-${perfectus-previous-number}</fabric-test-version>
    <fabric-version>1.2.0.redhat-630291</fabric-version>
    -->

    <!-- fabric8 -->
    <fabric-test-version>1.2.0.redhat-630262</fabric-test-version>
    <fabric-version>1.2.0.redhat-630291</fabric-version>

    <activemq-version>5.10.0</activemq-version>
    <activemq-leveldb-artifactid>activemq-leveldb-store</activemq-leveldb-artifactid>
    <aether-version>1.13.1</aether-version>
    <apollo-version>99-trunk-SNAPSHOT</apollo-version>
    <atmosphere-version>1.0.18</atmosphere-version>
    <blueprint-web-version>1.0.0</blueprint-web-version>
    <build-helper-maven-plugin-version>1.7</build-helper-maven-plugin-version>
    <camel-version>2.17.0.redhat-630291</camel-version>
    <commons-codec-version>1.6.0.redhat-4</commons-codec-version>
    <commons-fileupload-version>1.3.1</commons-fileupload-version>
    <httpclient-version>4.5.2</httpclient-version>
    <commons-io-version>2.2</commons-io-version>
    <commons-logging-version>1.1.3</commons-logging-version>
    <cxf-version>3.1.5.redhat-630291</cxf-version>
    <dozer-version>5.5.1</dozer-version>
    <exec-maven-plugin-version>1.2.1</exec-maven-plugin-version>
    <felix.gogo.version>0.10.0</felix.gogo.version>
    <frontend-maven-plugin-version>0.0.27</frontend-maven-plugin-version>
    <gitective-version>0.9.11</gitective-version>

    <guava-version>18.0.0.redhat-1</guava-version>
    <hawtio-release-version>1.4.19</hawtio-release-version>
    <infinispan-version>5.3.0.Final</infinispan-version>
<!--
    TODO doesn't yet work - I think the config changed?
    <infinispan-version>6.0.0.Final</infinispan-version>
-->

    <insight-log4j-version>${fabric-test-version}</insight-log4j-version>
    <!-- make sure to align jackson with fabric8 -->
    <jackson-version>2.6.3.redhat-2</jackson-version>
    <javaewah-version>0.5.6</javaewah-version>
    <!-- make sure to align jaxb with fabric8 -->
    <jaxb-version>2.2.7</jaxb-version>
    <javax.validation-version>1.1.0.Final-redhat-1</javax.validation-version>
    <jcraft-version>0.1.49</jcraft-version>
    <jcraft-jzlib-version>1.1.3</jcraft-jzlib-version>

    <jetty-version>9.2.21.v20170120</jetty-version>
    <jetty-plugin-groupId>org.eclipse.jetty</jetty-plugin-groupId>
    <jetty-plugin-version>9.2.21.v20170120</jetty-plugin-version>
    <jetty-webapp-artifactId>jetty-webapp</jetty-webapp-artifactId>

    <jgit-version>4.1.1.201511131810-r</jgit-version>
    <jline.version>2.12.1.redhat-002</jline.version>
    <jolokia-version>1.3.6.redhat-000001</jolokia-version>
    <junit-version>4.11</junit-version>
    <karaf-version>2.4.0.redhat-630291</karaf-version>
    <log4j-version>1.2.17.redhat-1</log4j-version>
    <maven-version>3.0.4</maven-version>
    <maven-antrun-plugin-version>1.7</maven-antrun-plugin-version>
    <maven-bundle-plugin-version>2.3.7</maven-bundle-plugin-version>
    <maven-plugin-version>3.2</maven-plugin-version>
    <maven-source-plugin-version>2.1.2</maven-source-plugin-version>
    <maven-resources-plugin-version>2.6</maven-resources-plugin-version>
    <maven-surefire-plugin-version>2.19</maven-surefire-plugin-version>
    <ops4j-pax-web-version>3.0.1</ops4j-pax-web-version>
    <ops4j-pax-url-version>1.5.2</ops4j-pax-url-version>
    <osgi-version>5.0.0</osgi-version>
    <org-json-version>20070829</org-json-version>
    <scala-version>2.10.4-redhat-1</scala-version>
    <servlet-api-version>2.5</servlet-api-version>

    <slf4j-api-version>1.6.6</slf4j-api-version>
    <slf4j-version>1.6.6</slf4j-version>

    <spring-version>3.2.18.RELEASE</spring-version>
    <spring-boot-version>1.1.6.RELEASE</spring-boot-version>
    <unsigner-maven-plugin-version>0.2</unsigner-maven-plugin-version>
    <wagon-version>2.7</wagon-version>
    <war-plugin-version>2.1.1</war-plugin-version>
    <xbean-version>3.16</xbean-version>
  </properties>

  <repositories>
    <repository>
      <id>fusesource.public</id>
      <name>Fusesource Public Release Repositories</name>
      <url>https://repository.jboss.org/nexus/content/groups/fs-public</url>
      <layout>default</layout>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
    </repository>
    <repository>
      <id>redhat-ga-repository</id>
      <url>https://maven.repository.redhat.com/ga</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>redhat-ea-repository</id>
      <url>https://maven.repository.redhat.com/earlyaccess/all</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
    <repository>
      <id>fusesource.ea</id>
      <name>Fusesource Early Access Release Repository</name>
      <url>https://repository.jboss.org/nexus/content/groups/ea</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>fusesource.public</id>
      <name>Fusesource Public Release Repositories</name>
      <url>https://repository.jboss.org/nexus/content/groups/fs-public</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
    </pluginRepository>
    <pluginRepository>
      <id>redhat-ga-repository</id>
      <url>https://maven.repository.redhat.com/ga</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
    <pluginRepository>
      <id>redhat-ea-repository</id>
      <url>https://maven.repository.redhat.com/earlyaccess/all</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository> 
    <pluginRepository>
      <id>fusesource.ea</id>
      <name>Fusesource Early Access Release Repository</name>
      <url>https://repository.jboss.org/nexus/content/groups/ea</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <releases>
        <enabled>true</enabled>
        <updatePolicy>never</updatePolicy>
      </releases>
    </pluginRepository>
  </pluginRepositories>

  <modules>
    <module>hawtio-util</module>
    <module>hawtio-core</module>
    <module>hawtio-system</module>
    <module>hawtio-aether</module>
    <module>hawtio-dozer-schema</module>
    <module>hawtio-dozer</module>
    <module>hawtio-git</module>
    <module>hawtio-ide</module>
    <module>hawtio-junit</module>
    <module>hawtio-kubernetes</module>
    <module>hawtio-maven-indexer</module>
    <module>hawtio-maven-plugin</module>
    <module>hawtio-json-schema-mbean</module>
    <module>hawtio-json-schema-generator</module>
    <module>hawtio-local-jvm-mbean</module>
    <module>hawtio-keystore-mbean</module>
    <module>hawtio-plugin-mbean</module>
    <module>example-services</module>
    <module>hawtio-web</module>
    <module>hawtio-api-docs</module>
    <module>hawtio-base</module>
    <module>hawtio-default</module>
    <module>hawtio-default-offline</module>
    <module>hawtio-no-slf4j</module>
    <module>hawtio-wildfly</module>
    <module>hawtio-embedded</module>
    <module>hawtio-app</module>
    <module>hawtio-osgi-jmx</module>
    <module>hawtio-osgi-devmode</module>
    <module>hawtio-plugin-examples</module>
    <module>sample</module>
    <module>hawtio-springboot</module>
    <module>hawtio-sample-springboot</module>
    <module>hawtio-karaf-terminal</module>
    <module>hawtio-karaf-git</module>
    <!-- TODO - a bit broken at the moment
    <module>hawtio-directives</module>
    -->
    <module>hawtio-redhat-fuse-branding</module>
    <module>hawtio-redhat-amq-branding</module>
    <module>hawtio-fabric8-branding</module>
    <module>hawtio-karaf</module>
    <module>hawtio-custom-app</module>
    <module>swagger-ui</module>
  </modules>

  <build>
    <defaultGoal>install</defaultGoal>

    <pluginManagement>
      <plugins>
        <plugin>
          <artifactId>maven-source-plugin</artifactId>
          <version>${maven-source-plugin-version}</version>
          <inherited>true</inherited>
          <executions>
            <execution>
              <id>attach-sources</id>
              <goals>
                <goal>jar</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>${war-plugin-version}</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-plugin-plugin</artifactId>
          <version>${maven-plugin-version}</version>
          <configuration>
            <!-- see http://jira.codehaus.org/browse/MNG-5346 -->
            <skipErrorNoDescriptorsFound>true</skipErrorNoDescriptorsFound>
           </configuration>
           <executions>
             <execution>
               <id>mojo-descriptor</id>
               <goals>
                 <goal>descriptor</goal>
               </goals>
             </execution>
           </executions>
        </plugin>
        <!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build
          itself. -->
        <plugin>
          <groupId>org.eclipse.m2e</groupId>
          <artifactId>lifecycle-mapping</artifactId>
          <version>1.0.0</version>
          <configuration>
            <lifecycleMappingMetadata>
              <pluginExecutions>
                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <versionRange>[${maven-bundle-plugin-version},)</versionRange>
                    <goals>
                      <goal>cleanVersions</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <ignore />
                  </action>
                </pluginExecution>

                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.felix</groupId>
                    <artifactId>maven-bundle-plugin</artifactId>
                    <versionRange>[${maven-bundle-plugin-version},)</versionRange>
                    <goals>
                      <goal>manifest</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>true</runOnIncremental>
                      <runOnConfiguration>true</runOnConfiguration>
                    </execute>
                  </action>
                </pluginExecution>

                <pluginExecution>
                  <pluginExecutionFilter>
                    <groupId>org.apache.servicemix.tooling</groupId>
                    <artifactId>depends-maven-plugin</artifactId>
                    <versionRange>[1.0,)</versionRange>
                    <goals>
                      <goal>generate-depends-file</goal>
                    </goals>
                  </pluginExecutionFilter>
                  <action>
                    <execute>
                      <runOnIncremental>false</runOnIncremental>
                      <runOnConfiguration>true</runOnConfiguration>
                    </execute>
                  </action>
                </pluginExecution>

              </pluginExecutions>
            </lifecycleMappingMetadata>
          </configuration>
        </plugin>

      </plugins>
    </pluginManagement>

    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <version>2.4.1</version>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <!--
          <tag>hawtio-${project.version}</tag>
          -->
        </configuration>
      </plugin>

      <!-- plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-javadoc-plugin</artifactId>
        <version>2.8</version>
        <executions>
          <execution>
            <id>attach-javadocs</id>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin -->

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>${maven-surefire-plugin-version}</version>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
          <childDelegation>false</childDelegation>
          <useFile>true</useFile>
          <failIfNoTests>false</failIfNoTests>
          <runOrder>alphabetical</runOrder>
          <systemPropertyVariables>
            <basedir>${basedir}</basedir>
            <java.awt.headless>true</java.awt.headless>
          </systemPropertyVariables>
          <includes>
            <include>**/*Test.*</include>
          </includes>
        </configuration>
      </plugin>

    </plugins>
  </build>

  <profiles>

    <profile>
      <id>doclint-java8-disable</id>
      <activation>
        <jdk>[1.8, 2)</jdk>
      </activation>

      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <configuration>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <id>fuse60</id>
      <properties>
        <perfectus-number>291</perfectus-number>
        <perfectus-build>redhat-60${perfectus-number}</perfectus-build>
      </properties>
      <repositories>
      </repositories>
    </profile>

    <!-- watcher profile is needed to break build cycle with fabric -->
    <profile>
      <id>watcher</id>
      <modules>
        <module>hawtio-watcher-dynamic-jaxb</module>
        <module>hawtio-watcher-blueprint-web</module>
        <module>hawtio-watcher-spring-context</module>
      </modules>
    </profile>

    <profile>
      <id>fabricSnapshot</id>
      <properties>
        <fabric-version>99-master-SNAPSHOT</fabric-version>
      </properties>
    </profile>

    <profile>
      <id>amqSnapshot</id>
      <properties>
        <activemq-version>5.11-SNAPSHOT</activemq-version>
        <activemq-leveldb-artifactid>activemq-leveldb-store</activemq-leveldb-artifactid>
      </properties>

      <repositories>
<!--
        <repository>
          <id>fusesource-snapshots</id>
          <name>fusesource-snapshots</name>
          <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <releases>
            <enabled>false</enabled>
          </releases>
        </repository>
-->
      </repositories>
    </profile>

    <profile>
      <id>camelSnapshot</id>
      <properties>
        <camel-version>2.17.0.redhat-630291</camel-version>
      </properties>
      <repositories>
      </repositories>
    </profile>


    <profile>
      <id>snapshot</id>
      <properties>
        <activemq-version>5.11-SNAPSHOT</activemq-version>
        <activemq-leveldb-artifactid>activemq-leveldb-store</activemq-leveldb-artifactid>
        <camel-version>2.17.0.redhat-630291</camel-version>
        <fabric-version>99-master-SNAPSHOT</fabric-version>
      </properties>

      <repositories>
        <repository>
          <id>fusesource-snapshots</id>
          <name>fusesource-snapshots</name>
          <url>http://repo.fusesource.com/nexus/content/groups/public-snapshots</url>
          <snapshots>
            <enabled>true</enabled>
          </snapshots>
          <releases>
            <enabled>false</enabled>
          </releases>
        </repository>
      </repositories>
    </profile>


    <profile>
      <id>jetty9</id>
      <properties>
        <jetty-version>9.2.21.v20170120</jetty-version>
        <jetty-plugin-groupId>org.eclipse.jetty</jetty-plugin-groupId>
        <jetty-plugin-version>${jetty-version}</jetty-plugin-version>
        <jetty-webapp-artifactId>jetty-all</jetty-webapp-artifactId>
      </properties>
      <repositories>
      </repositories>
    </profile>

    <profile>
      <id>committer</id>
      <properties>
        <hawtio-config-repo>git@github.com:hawtio/hawtio-config.git</hawtio-config-repo>
      </properties>
    </profile>

    <profile>
      <id>docs</id>
      <modules>
        <module>hawtio-api-docs</module>
      </modules>
    </profile>

    <profile>
      <id>itests</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <modules>
        <module>hawtio-karaf-itest</module>
      </modules>
    </profile>


    <profile>
      <id>release</id>
      <properties>
        <schema-outdir>${basedir}/target/${webapp-dir}/lib</schema-outdir>
      </properties>
      <!--
      TODO when using the release profile you should add your ~/.m2/settings.xml something like this:

      <settings>
        <profiles>
          <profile>
            <id>release</id>
            <properties>
              <gpg.passphrase>MyPassPhrase</gpg.passphrase>
            </properties>
          </profile>
          ...
      -->

      <!--
            Run the release /w the -P release flag to enable the release profile.
          -->
      <build>
        <plugins>
          <!-- We want to sign the artifact, the POM, and all attached artifacts -->
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <configuration>
              <passphrase>${gpg.passphrase}</passphrase>
            </configuration>
            <executions>
              <execution>
                <goals>
                  <goal>sign</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-javadoc-plugin</artifactId>
            <configuration>
              <encoding>${project.build.sourceEncoding}</encoding>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>


    <!-- dealing with tools.jar for hawtio-local-jvm-mbean -->
    <profile>
      <id>default-profile</id>
      <activation>
        <activeByDefault>true</activeByDefault>
        <file>
          <exists>${java.home}/../lib/tools.jar</exists>
        </file>
      </activation>
      <properties>
        <toolsjar>${java.home}/../lib/tools.jar</toolsjar>
      </properties>
    </profile>
    <profile>
      <id>mac-jdk6-profile</id>
      <activation>
        <activeByDefault>false</activeByDefault>
        <file>
          <exists>${java.home}/../Classes/classes.jar</exists>
        </file>
      </activation>
      <properties>
        <toolsjar>${java.home}/../Classes/classes.jar</toolsjar>
      </properties>
    </profile>

    <!-- only build the CRX if you've setup the CRX key -->
    <profile>
      <id>crx</id>
      <!--activation>
        <file>
          <exists>${user.home}/.m2/hawtio-crx.pem</exists>
        </file>
      </activation-->
      <modules>
        <module>hawtio-crx</module>
      </modules>
    </profile>

    <profile>
      <id>deploy</id>
      <build>
        <defaultGoal>deploy</defaultGoal>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

      <profile>
          <id>apidocs</id>
          <modules>
              <module>hawtio-api-docs</module>
          </modules>
      </profile>

  </profiles>
</project>
