<?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>23</version>
  </parent>

  <groupId>io.hawt</groupId>
  <artifactId>project</artifactId>
  <packaging>pom</packaging>
  <version>2.0-M2</version>
  <name>hawtio-java-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-2.0-M2</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>
    <failIfNoTests>false</failIfNoTests>
    <jettyPort>8282</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>
    <hawtio-console-version>1.0.0</hawtio-console-version>
    <maven.compiler.source>1.8</maven.compiler.source>
    <maven.compiler.target>1.8</maven.compiler.target>

    <webapp-dir>${project.artifactId}-${project.version}</webapp-dir>
    <webapp-outdir>${basedir}/target/${webapp-dir}</webapp-outdir>

    <build-helper-maven-plugin-version>1.7</build-helper-maven-plugin-version>

    <jetty-version>9.2.10.v20150310</jetty-version>
    <jetty-plugin-version>${jetty-version}</jetty-plugin-version>
    <jetty-webapp-version>8.1.18.v20150929</jetty-webapp-version>
    <jetty-webapp-artifactId>jetty-webapp</jetty-webapp-artifactId>

    <frontend-maven-plugin-version>1.4</frontend-maven-plugin-version>

    <aether-version>1.13.1</aether-version>
    <blueprint-web-version>1.1.0</blueprint-web-version>

    <commons-codec-version>1.10</commons-codec-version>
    <commons-fileupload-version>1.3.2</commons-fileupload-version>
    <commons-httpclient-version>3.1</commons-httpclient-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>
    <exec-maven-plugin-version>1.5.0</exec-maven-plugin-version>
    <maven-surefire-plugin-version>2.19.1</maven-surefire-plugin-version>

    <!-- TODO should be newer -->
    <guava-version>10.0</guava-version>
    <guava.version>14.0.1</guava.version>
    <gitective-version>0.9.21</gitective-version>
    
    <!-- make sure to align jackson with fabric8 -->
    <jackson-version>2.7.0</jackson-version>
    <jackson-version-range>[2.5,3)</jackson-version-range>
    <jcraft-jzlib-version>1.1.3</jcraft-jzlib-version>
    <jgit-version>4.7.1.201706071930-r</jgit-version>
    <jolokia-version>1.3.5</jolokia-version>
    <junit-version>4.11</junit-version>
    <karaf-version>4.1.1</karaf-version>
    <karaf-version-range>[4.0,5)</karaf-version-range>
    <log4j-version>1.2.17</log4j-version>
    <maven-version>3.0.4</maven-version>
    <maven-bundle-plugin-version>3.0.1</maven-bundle-plugin-version>
    <maven-resources-plugin-version>2.6</maven-resources-plugin-version>
    <osgi-version>5.0.0</osgi-version>
    <wagon-version>2.7</wagon-version>
    <servlet-api-version>2.5</servlet-api-version>
    <!-- use slf4j-api 1.6.x to be easy compatible with older Karaf/Camel releases -->
    <slf4j-api-version>1.6.6</slf4j-api-version>
    <slf4j-version>1.7.21</slf4j-version>
  </properties>

  <modules>
    <module>example-services</module>
    <module>hawtio-json-schema-mbean</module>
    <module>hawtio-console-assembly</module>
    <module>hawtio-util</module>
    <module>hawtio-ide</module>
    <module>hawtio-aether</module>
    <module>hawtio-core</module>
    <module>hawtio-git</module>
    <module>hawtio-kubernetes</module>
    <module>hawtio-local-jvm-mbean</module>
    <module>hawtio-system</module>
    <module>hawtio-war</module>
    <module>hawtio-insight-log</module>
    <module>hawtio-maven-indexer</module>
    <module>hawtio-base</module>
    <module>hawtio-default</module>
    <module>hawtio-embedded</module>
    <module>hawtio-app</module>
    <module>platforms/wildfly</module>
    <module>platforms/hawtio-osgi-jmx</module>
    <module>platforms/karaf</module>
  </modules>

  <build>
    <defaultGoal>install</defaultGoal>

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

  <profiles>
    <!-- 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>release</id>
      <properties>
      </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>
              <additionalparam>-Xdoclint:none</additionalparam>
            </configuration>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>
