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

  <groupId>org.rhq.metrics</groupId>
  <artifactId>rhq-metrics-parent</artifactId>
  <version>0.2.4</version>
  <packaging>pom</packaging>

  <name>RHQ Metrics</name>
  <url>https://community.jboss.org/en/rhq/rhq-metrics</url>
  <description>RHQ Metrics is a metrics collection, aggregation, visualization framework.</description>


  <properties>
    <test.keyspace>rhqtest</test.keyspace>
    <nodes>127.0.0.1</nodes>

    <datastax.driver.version>2.0.1</datastax.driver.version>
    <joda.time.version>2.3</joda.time.version>
    <testng.version>6.8.8</testng.version>
    <slf4j.version>1.7.7</slf4j.version>
    <log4j.version>1.2.17</log4j.version>
    <vertx.version>2.1RC3</vertx.version>
    <vertx.testtools.version>2.0.3-final</vertx.testtools.version>
    <jackson.version>2.3.2</jackson.version>
    <guava.version>16.0.1</guava.version>
    <resteasy.version>3.0.7.Final</resteasy.version>
    <trove4j.version>3.0.3</trove4j.version>

    <version.wildfly>8.1.0.Final</version.wildfly>
    <junit.version>4.8.2</junit.version>
    <findbugs.version>3.0.0</findbugs.version>

    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

  </properties>

  <organization>
    <name>Red Hat, Inc.</name>
    <url>http://redhat.com/</url>
  </organization>

  <scm>
    <connection>scm:git:ssh://github.com/rhq-project/rhq-metrics</connection>
    <developerConnection>scm:git:ssh://github.com/rhq-project/rhq-metrics</developerConnection>
    <url>https://github.com/rhq-project/rhq-metrics</url>
  </scm>

  <distributionManagement>

    <snapshotRepository>
      <id>jboss-snapshots-repository</id>
      <name>JBoss Snapshots Repository</name>
      <url>https://repository.jboss.org/nexus/content/repositories/snapshots/</url>
    </snapshotRepository>

    <repository>
      <id>jboss-releases-repository</id>
      <name>JBoss Releases Repository</name>
      <url>https://repository.jboss.org/nexus/service/local/staging/deploy/maven2/</url>
    </repository>

    <site>
      <id>local-site-tmp</id>
      <name>RHQ-metrics</name>
      <url>file:///tmp/rhq-metrics-site</url>
    </site>

  </distributionManagement>

  <ciManagement>
    <system>Travis-ci</system>
    <url>https://travis-ci.org/rhq-project/rhq-metrics</url>
  </ciManagement>

  <modules>
    <module>test-utils</module>
    <module>core-api</module>
    <module>metrics-core</module>
    <module>rest-servlet</module>
    <module>clients</module>
    <module>rest-test</module>
    <module>ui/explorer</module>
    <module>ui/dummy-ui</module>
    <module>ui/console</module>
  </modules>

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

  <build>
    <plugins>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-enforcer-plugin</artifactId>
        <version>1.3.1</version>
        <executions>
          <execution>
            <id>enforce-rules</id>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <requireMavenVersion>
              <version>[3.0.5,)</version>
            </requireMavenVersion>
            <requireJavaVersion>
              <version>[1.7,)</version>
            </requireJavaVersion>
            <requireNoRepositories/>
            <requirePluginVersions/>
          </rules>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
          <showWarnings>true</showWarnings>
        </configuration>
      </plugin>

      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>animal-sniffer-maven-plugin</artifactId>
        <!-- This depedency upgrade is a workaround for MANIMALSNIFFER-45 -->
        <!-- MANIMALSNIFFER-45 only affects users building with a JDK 8 -->
        <!-- It can be removed once MANIMALSNIFFER-45 is fixed -->
        <!-- See https://jira.codehaus.org/browse/MANIMALSNIFFER-45 -->
        <dependencies>
          <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-all</artifactId>
            <version>5.0.3</version>
          </dependency>
        </dependencies>
        <executions>
          <execution>
            <id>java-api-check</id>
            <configuration>
              <signature>
                <groupId>org.codehaus.mojo.signature</groupId>
                <artifactId>java17</artifactId>
                <version>1.0</version>
              </signature>
            </configuration>
            <phase>verify</phase>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
      </plugin>

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

      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>2.5.3</version>
        <extensions>true</extensions>
      </plugin>

    </plugins>

    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-clean-plugin</artifactId>
          <version>2.6</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.9</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>animal-sniffer-maven-plugin</artifactId>
          <version>1.11</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-surefire-plugin</artifactId>
          <version>2.17</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-jar-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-war-plugin</artifactId>
          <version>2.5</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-source-plugin</artifactId>
          <version>2.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-javadoc-plugin</artifactId>
          <version>2.10.1</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-install-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-site-plugin</artifactId>
          <version>3.4</version>
        </plugin>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <groupId>org.codehaus.gmaven</groupId>
          <artifactId>groovy-maven-plugin</artifactId>
          <version>2.0</version>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>

  <profiles>

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

    <profile>
      <id>download_wildfly</id>
      <dependencies>
        <dependency>
          <groupId>org.wildfly</groupId>
          <artifactId>wildfly-dist</artifactId>
          <version>${version.wildfly}</version>
          <type>zip</type>
        </dependency>
      </dependencies>
    </profile>

    <profile>
      <id>publish</id>

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

          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

  <reporting>
    <plugins>
      <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>findbugs-maven-plugin</artifactId>
          <version>${findbugs.version}</version>
          <configuration>
              <xmlOutput>true</xmlOutput>
              <effort>Max</effort>
              <threshold>Default</threshold>
          </configuration>
          <inherited>true</inherited>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <version>2.7</version>
        <configuration>
          <showAvatarImages>true</showAvatarImages>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-report-plugin</artifactId>
        <version>2.6</version>
      </plugin>
      <plugin>
        <!-- must be last plugin in the list -->
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>dashboard-maven-plugin</artifactId>
        <version>1.0.0-beta-1</version>
      </plugin>

    </plugins>

  </reporting>

  <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>
      <name>Heiko W. Rupp</name>
      <email>hrupp@redhat.com</email>
      <url>http://pilhuhn.blogspot.com/</url>
      <timezone>+1</timezone>
      <properties>
        <picUrl>http://en.gravatar.com/pilhuhn</picUrl>
      </properties>
    </developer>
    <developer>
      <name>John Sanda</name>
      <url>http://johnsanda.blogspot.com/</url>
      <timezone>-5</timezone>
    </developer>
    <developer>
      <name>Mike Thompson</name>
      <timezone>-8</timezone>
    </developer>
    <developer>
      <name>Heiko Braun</name>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <name>Stefan Negrea</name>
      <timezone>-6</timezone>
    </developer>
  </developers>

</project>
