<?xml version="1.0"?>

<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</groupId>
  <artifactId>rhq-parent</artifactId>
  <version>4.0.1</version>
  <packaging>pom</packaging>

  <name>RHQ</name>
  <description>RHQ is a server management and monitoring suite primarily targeted at JBoss software.</description>
  <url>http://rhq-project.org/</url>
  <inceptionYear>2008</inceptionYear>

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

  <scm>
    <connection>scm:git:git://git.fedorahosted.org/rhq/rhq.git</connection>
    <developerConnection>scm:git:ssh://git.fedorahosted.org/git/rhq/rhq.git</developerConnection>
    <url>http://git.fedorahosted.org/git/rhq/rhq.git</url>
  </scm>

  <issueManagement>
    <system>bugzilla</system>
    <url>https://bugzilla.redhat.com/browse.cgi?product=RHQ%20Project</url>
  </issueManagement>


  <properties>
    <!-- explictly specify a default encoding to avoid relying on the LANG env var being set correctly -->
    <project.build.sourceEncoding>ISO-8859-1</project.build.sourceEncoding>

    <rhq.groupId>org.rhq</rhq.groupId>
    <rhq.product.name>RHQ</rhq.product.name>
    <rhq.earName>rhq.ear</rhq.earName>
    <!-- the below path is relative to {rhq-trunk} -->
    <rhq.defaultDevContainerPath>dev-container</rhq.defaultDevContainerPath>
    <!-- set the below prop to true to enable misc extra build output -->
    <rhq.debug>false</rhq.debug>

    <!-- product info -->
    <product.shortName>RHQ</product.shortName>
    <product.name>RHQ</product.name>
    <product.fullName>RHQ</product.fullName>
    <product.url>http://rhq-project.org/</product.url>
    <product.urlDomain>rhq-project.org</product.urlDomain>
    <product.salesEmail>sales@rhq-project.org</product.salesEmail>
    <product.supportEmail>info@rhq-project.org</product.supportEmail>
    <product.version>${project.version}</product.version>
    <product.helpDocRoot>http://support.rhq-project.org/display/RHQ/</product.helpDocRoot>

    <doUpdate>false</doUpdate>

    <!-- dependency versions -->

    <!-- Start: JBoss AS Dependency Versions
         The dependency versions below are declared together as the versions of each are dependent on the
         overall JBoss AS Server version.  Meaning, the AS provides these libs. When the Server
         version is changed the versions of each of these should be validated and updated as needed. -->
    <jboss.version>4.2.3.GA</jboss.version>
    <jboss-cache.version>1.4.1.SP9</jboss-cache.version>
    <jboss-common.version>1.2.1.GA</jboss-common.version>
    <jboss-jta.version>4.2.3.SP7</jboss-jta.version>
    <jboss-remoting.version>2.2.2.SP8</jboss-remoting.version>
    <jboss-serialization.version>1.0.3.GA</jboss-serialization.version>
    <jboss-javassist.version>3.8.0.GA</jboss-javassist.version>
    <jbossws-native-dist.version>3.1.1.GA</jbossws-native-dist.version>
    <!-- End: JBoss AS Dependency Versions -->

    <commons-logging.version>1.1.0.jboss</commons-logging.version>
    <concurrent.version>1.3.4-jboss-update1</concurrent.version> <!-- oswego-concurrent compatible with 4.2.3.GA -->
    <findbugs.version>2.3.1</findbugs.version>
    <getopt.version>1.0.13</getopt.version>
    <hibernate3.version>3.2.r14201-2</hibernate3.version>
    <hibernate-annotations.version>3.2.1.GA</hibernate-annotations.version>
    <hibernate-entitymanager.version>3.2.1.GA</hibernate-entitymanager.version>
    <i18nlog.version>1.0.10</i18nlog.version>
    <jaxb-api.version>2.1</jaxb-api.version>
    <jaxb-impl.version>2.1.9</jaxb-impl.version>
    <jsf-api.version>1.2_14</jsf-api.version>
    <jsf-impl.version>1.2_14</jsf-impl.version>
    <ojdbc5.version>11.2.0.2.0</ojdbc5.version>
    <ems.version>1.2.15.1</ems.version>
    <postgresql.version>9.0-801.jdbc4</postgresql.version>
    <h2.version>1.2.139</h2.version>
    <jtds.version>1.2.2</jtds.version>
    <richfaces.version>3.3.3.Final</richfaces.version>
    <jline.version>0.9.94</jline.version>
    <sigar.version>1.6.5.132</sigar.version>
    <quartz.version>1.6.5</quartz.version>
    <jna.version>3.2.5</jna.version>
    <twitter4j.version>2.1.2</twitter4j.version>
    <commons-codec.version>1.4</commons-codec.version>
    <testng.version>5.13.1</testng.version>
    <cobertura.version>1.9.4.1</cobertura.version>


    <!--
       defaults for datasource used by integration tests -
       these may be overridden in ~/.m2/settings.xml
    -->
    <rhq.test.ds.db-name>rhq</rhq.test.ds.db-name>
    <rhq.test.ds.connection-url>jdbc:postgresql://127.0.0.1:5432/${rhq.test.ds.db-name}</rhq.test.ds.connection-url>
    <rhq.test.ds.driver-class>org.postgresql.Driver</rhq.test.ds.driver-class>
    <rhq.test.ds.xa-datasource-class>org.postgresql.xa.PGXADataSource</rhq.test.ds.xa-datasource-class>
    <rhq.test.ds.user-name>rhqadmin</rhq.test.ds.user-name>
    <rhq.test.ds.password>rhqadmin</rhq.test.ds.password>
    <rhq.test.ds.type-mapping>PostgreSQL</rhq.test.ds.type-mapping>
    <rhq.test.ds.server-name>127.0.0.1</rhq.test.ds.server-name>
    <rhq.test.ds.port>5432</rhq.test.ds.port>
    <rhq.test.ds.hibernate-dialect>org.hibernate.dialect.PostgreSQLDialect</rhq.test.ds.hibernate-dialect>
    <rhq.test.quartz.driverDelegateClass>org.quartz.impl.jdbcjobstore.PostgreSQLDelegate</rhq.test.quartz.driverDelegateClass>
    <rhq.test.quartz.selectWithLockSQL>
       SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE
    </rhq.test.quartz.selectWithLockSQL>
    <rhq.test.quartz.lockHandlerClass>org.quartz.impl.jdbcjobstore.StdRowLockSemaphore</rhq.test.quartz.lockHandlerClass>

    <!--
       defaults for datasource used by the dev container build (see dev docs on the 'dev' profile) -
       these may be overridden in ~/.m2/settings.xml
    -->
    <rhq.dev.ds.db-name>rhqdev</rhq.dev.ds.db-name>
    <rhq.dev.ds.connection-url>jdbc:postgresql://127.0.0.1:5432/${rhq.dev.ds.db-name}</rhq.dev.ds.connection-url>
    <rhq.dev.ds.driver-class>org.postgresql.Driver</rhq.dev.ds.driver-class>
    <rhq.dev.ds.xa-datasource-class>org.postgresql.xa.PGXADataSource</rhq.dev.ds.xa-datasource-class>
    <rhq.dev.ds.user-name>rhqadmin</rhq.dev.ds.user-name>
    <rhq.dev.ds.password>rhqadmin</rhq.dev.ds.password>
    <rhq.dev.ds.password.encrypted>1eeb2f255e832171df8592078de921bc</rhq.dev.ds.password.encrypted>
    <rhq.dev.ds.type-mapping>PostgreSQL</rhq.dev.ds.type-mapping>
    <rhq.dev.ds.server-name>127.0.0.1</rhq.dev.ds.server-name>
    <rhq.dev.ds.port>5432</rhq.dev.ds.port>
    <rhq.dev.ds.hibernate-dialect>org.hibernate.dialect.PostgreSQLDialect</rhq.dev.ds.hibernate-dialect>
    <rhq.dev.quartz.driverDelegateClass>org.quartz.impl.jdbcjobstore.PostgreSQLDelegate</rhq.dev.quartz.driverDelegateClass>
    <rhq.dev.quartz.selectWithLockSQL>
       SELECT * FROM {0}LOCKS ROWLOCK WHERE LOCK_NAME = ? FOR UPDATE
    </rhq.dev.quartz.selectWithLockSQL>
    <rhq.dev.quartz.lockHandlerClass>org.quartz.impl.jdbcjobstore.StdRowLockSemaphore</rhq.dev.quartz.lockHandlerClass>

     <!-- default port numbers for RHQ server -->
    <rhq.server.http.port>7080</rhq.server.http.port>
    <rhq.server.https.port>7443</rhq.server.https.port>

    <rhq.server.enable.ws>false</rhq.server.enable.ws>

    <!--
      When this property is set to true will compare its endpoint address
      that is stored in the database against the actual host name/IP address
      returned by the host system. If they differ, the address stored in the
      datbase will be updated to the value found on the host machine. While
      host name changes are/should be uncommon in a typical deployment, they
      are more common in a cloud deployment such as EC2. And in a cloud
      deployment like EC2, we want to turn this behavior on to ensure that
      the server endpoint accurately reflects the current machine address. 
    -->
    <rhq.sync.endpoint-address>false</rhq.sync.endpoint-address>

    <!-- NOTE: The below line is a workaround for a Maven bug, where it does not expand settings.* properties
               used in the distributionManagement section of the POM. -->
    <localRepository>${user.home}/.m2/repository</localRepository>
  </properties>


  <dependencyManagement>

    <dependencies>

      <!-- Start: JBoss AS Dependencies
           The dependencies below are declared together as the versions of each are dependent on the
           overall JBoss AS Server version.  Meaning, the AS provides these libs. When the Server
           version is changed the versions of each of these should be validated and updated as needed. -->
      <dependency>
        <groupId>org.jboss.jbossas</groupId>
        <artifactId>jboss-as-dist</artifactId>
        <version>${jboss.version}</version>
        <type>zip</type>
      </dependency>

     <dependency>
         <groupId>org.jboss.jbossws</groupId>
         <artifactId>jbossws-native-dist</artifactId>
         <version>${jbossws-native-dist.version}</version>
         <type>zip</type>
     </dependency>

      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-all-client</artifactId>
        <version>${jboss.version}</version>
      </dependency>

      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-annotations-ejb3</artifactId>
        <version>${jboss.version}</version>
      </dependency>

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

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

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

      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jboss-ejb3-client</artifactId>
        <version>${jboss.version}</version>
      </dependency>

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

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

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

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

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

      <dependency>
        <groupId>jboss</groupId>
        <artifactId>jbosssx</artifactId>
        <version>${jboss.version}</version>
      </dependency>

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

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

      <!-- End: JBoss AS Dependencies -->

      <dependency>
        <groupId>commons-logging</groupId>
        <artifactId>commons-logging</artifactId>
        <version>${commons-logging.version}</version>
      </dependency>

      <!-- GNU GetOpt (any modules that need to do command-line argument parsing should use this) -->
      <dependency>
        <groupId>gnu-getopt</groupId>
        <artifactId>getopt</artifactId>
        <version>${getopt.version}</version>
      </dependency>

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

      <dependency>
         <groupId>javax.xml.bind</groupId>
         <artifactId>jaxb-api</artifactId>
         <version>${jaxb-api.version}</version>
      </dependency>

      <dependency>
         <groupId>javax.faces</groupId>
         <artifactId>jsf-api</artifactId>
         <version>${jsf-api.version}</version>
         <scope>provided</scope> <!-- by JBossAS -->
      </dependency>

      <dependency>
         <groupId>javax.faces</groupId>
         <artifactId>jsf-impl</artifactId>
         <version>${jsf-impl.version}</version>
         <scope>provided</scope> <!-- by JBossAS -->
      </dependency>

      <dependency>
         <groupId>com.sun.xml.bind</groupId>
         <artifactId>jaxb-impl</artifactId>
         <version>${jaxb-impl.version}</version>
      </dependency>

      <dependency>
        <groupId>mc4j</groupId>
        <artifactId>org-mc4j-ems</artifactId>
        <version>${ems.version}</version>
      </dependency>

      <dependency>
        <groupId>hibernate</groupId>
        <artifactId>hibernate3</artifactId>
        <version>${hibernate3.version}</version>
      </dependency>

      <dependency>
         <groupId>hibernate-annotations</groupId>
         <artifactId>hibernate-annotations</artifactId>
         <version>${hibernate-annotations.version}</version>
      </dependency>

      <dependency>
         <groupId>hibernate-entitymanager</groupId>
         <artifactId>hibernate-entitymanager</artifactId>
         <version>${hibernate-entitymanager.version}</version>
      </dependency>

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

      <dependency>
        <groupId>org.hyperic</groupId>
        <artifactId>sigar-dist</artifactId>
        <version>${sigar.version}</version>
        <type>zip</type>
      </dependency>

      <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-api</artifactId>
        <version>${richfaces.version}</version>
      </dependency>

      <dependency>
        <groupId>org.richfaces.framework</groupId>
        <artifactId>richfaces-impl</artifactId>
        <version>${richfaces.version}</version>
      </dependency>

      <dependency>
        <groupId>org.richfaces.ui</groupId>
        <artifactId>richfaces-ui</artifactId>
        <version>${richfaces.version}</version>
      </dependency>

      <dependency>
        <groupId>oswego-concurrent</groupId>
        <artifactId>concurrent</artifactId>
        <version>${concurrent.version}</version>
      </dependency>

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

      <dependency>
        <groupId>org.opensymphony.quartz</groupId>
        <artifactId>quartz-oracle</artifactId>
        <version>${quartz.version}</version>
      </dependency>

      <!-- Postgres JDBC driver -->
      <dependency>
        <groupId>postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>${postgresql.version}</version>
      </dependency>

      <dependency>
        <groupId>com.h2database</groupId>
        <artifactId>h2</artifactId>
        <version>${h2.version}</version>
      </dependency>

      <dependency>
        <groupId>net.sourceforge.jtds</groupId>
        <artifactId>jtds</artifactId>
        <version>${jtds.version}</version>
      </dependency>

      <dependency>
        <groupId>org.codehaus.groovy</groupId>
        <artifactId>groovy-all</artifactId>
        <version>1.7.5</version>
      </dependency>

      <dependency>
         <groupId>net.java.dev.jna</groupId>
         <artifactId>jna</artifactId>
         <version>${jna.version}</version>
      </dependency>
    </dependencies>

  </dependencyManagement>


  <dependencies>

    <dependency>
      <groupId>commons-logging</groupId>
      <artifactId>commons-logging</artifactId>
      <scope>provided</scope>
    </dependency>

    <!-- for the JAXB annotations -->
    <dependency>
       <groupId>javax.xml.bind</groupId>
       <artifactId>jaxb-api</artifactId>
       <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
      <version>1.2.14</version>
      <scope>provided</scope>
    </dependency>

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

    <!-- for the Nullable/NotNull annotations -->
    <dependency>
      <groupId>org.jetbrains</groupId>
      <artifactId>annotations</artifactId>
      <version>7.0.2</version>
      <scope>provided</scope>
    </dependency>

    <dependency>
      <groupId>net.sourceforge.cobertura</groupId>
      <artifactId>cobertura</artifactId>
      <version>${cobertura.version}</version>
      <scope>test</scope>
    </dependency>

  </dependencies>


  <build>

    <defaultGoal>install</defaultGoal>

     <pluginManagement>
       <plugins>
         <plugin>
           <artifactId>maven-antrun-plugin</artifactId>
           <version>1.6</version>
           <dependencies>
             <!-- We must declare this here to workaround
                  http://jira.codehaus.org/browse/MANTRUN-51.
                  Once we require Maven 3.0, this will no
                  no longer needed. -->
             <dependency>
               <groupId>net.sourceforge.cobertura</groupId>
               <artifactId>cobertura</artifactId>
               <version>${cobertura.version}</version>
             </dependency>
           </dependencies>
         </plugin>
         <plugin>
           <artifactId>maven-assembly-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-clean-plugin</artifactId>
           <version>2.4.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.3.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-deploy-plugin</artifactId>
           <version>2.5</version>
         </plugin>
         <plugin>
           <artifactId>maven-ear-plugin</artifactId>
           <version>2.4.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-enforcer-plugin</artifactId>
           <version>1.0-beta-1</version>
         </plugin>
         <plugin>
           <artifactId>maven-ejb-plugin</artifactId>
           <version>2.3</version>
         </plugin>
         <plugin>
           <artifactId>maven-idea-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-install-plugin</artifactId>
           <version>2.3.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-jar-plugin</artifactId>
           <version>2.3.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
           <version>2.7</version>
         </plugin>
         <plugin>
           <artifactId>maven-plugin-plugin</artifactId>
           <version>2.6</version>
         </plugin>
         <plugin>
           <artifactId>maven-rar-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-release-plugin</artifactId>
           <version>2.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-resources-plugin</artifactId>
           <version>2.4.3</version>
         </plugin>
         <plugin>
           <artifactId>maven-scm-plugin</artifactId>
           <version>1.4</version>
         </plugin>
         <plugin>
           <artifactId>maven-site-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-source-plugin</artifactId>
           <version>2.1.2</version>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.6</version>
            <configuration>
               <argLine>-Xms16M -Xmx256M</argLine>
            </configuration>
         </plugin>
         <plugin>
           <artifactId>maven-war-plugin</artifactId>
           <version>2.1</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
           <version>1.5</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>buildnumber-maven-plugin</artifactId>
           <version>1.0-beta-4</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>exec-maven-plugin</artifactId>
           <!-- NOTE: Version 1.2 of this plugin appears to be broken, so do not
                      upgrade to that version. -->
           <version>1.1</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>properties-maven-plugin</artifactId>
           <version>1.0-alpha-2</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>findbugs-maven-plugin</artifactId>
           <version>${findbugs.version}</version>
         </plugin>
       </plugins>
     </pluginManagement>


    <plugins>

      <!-- Set the 'maven.version' property to the version of Maven being used,
           so we can include the Maven version in the MANIFEST.MF files of all
           build artifacts. -->
      <plugin>
         <groupId>org.codehaus.mojo</groupId>
         <artifactId>build-helper-maven-plugin</artifactId>
         <executions>
           <execution>
             <phase>initialize</phase>
             <goals>
               <goal>maven-version</goal>
             </goals>
           </execution>
         </executions>
      </plugin>


      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <configuration>
            <!-- As of v2.4 of this plugin, the default delimiters are @*@ -
                 we want the old default of ${*} instead. -->
            <useDefaultDelimiters>false</useDefaultDelimiters>
            <delimiters>
                <delimiter>${*}</delimiter>
            </delimiters>
        </configuration>
      </plugin>

      <!-- Ensure all code compiles and runs on Java 6 or later. -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>
          <!-- invocation options -->
          <fork>true</fork>
          <meminitial>64M</meminitial>
          <maxmem>512M</maxmem>

          <!-- compiler options -->
          <source>1.6</source>
          <target>1.6</target>
          <optimize>false</optimize>
          <verbose>true</verbose>
          <compilerArgument>-Xlint</compilerArgument>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
               <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
               <Maven-Version>${maven.version}</Maven-Version>
               <Java-Version>${java.version}</Java-Version>
               <Java-Vendor>${java.vendor}</Java-Vendor>
               <Os-Name>${os.name}</Os-Name>
               <Os-Arch>${os.arch}</Os-Arch>
               <Os-Version>${os.version}</Os-Version>
               <Build-Number>${buildNumber}</Build-Number>
               <Build-Time>${buildTime}</Build-Time>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration>
          <ejbVersion>3.0</ejbVersion>
          <archive>
            <manifest>
               <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
               <addClasspath>true</addClasspath>
               <classpathPrefix>lib/</classpathPrefix>
            </manifest>
            <manifestEntries>
               <Maven-Version>${maven.version}</Maven-Version>
               <Java-Version>${java.version}</Java-Version>
               <Java-Vendor>${java.vendor}</Java-Vendor>
               <Os-Name>${os.name}</Os-Name>
               <Os-Arch>${os.arch}</Os-Arch>
               <Os-Version>${os.version}</Os-Version>
               <Build-Number>${buildNumber}</Build-Number>
               <Build-Time>${buildTime}</Build-Time>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-war-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
               <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
               <Maven-Version>${maven.version}</Maven-Version>
               <Java-Version>${java.version}</Java-Version>
               <Java-Vendor>${java.vendor}</Java-Vendor>
               <Os-Name>${os.name}</Os-Name>
               <Os-Arch>${os.arch}</Os-Arch>
               <Os-Version>${os.version}</Os-Version>
               <Build-Number>${buildNumber}</Build-Number>
               <Build-Time>${buildTime}</Build-Time>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-ear-plugin</artifactId>
        <configuration>
          <version>1.4</version>  <!-- JEE version -->
          <archive>
            <manifest>
               <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
               <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
            </manifest>
            <manifestEntries>
               <Maven-Version>${maven.version}</Maven-Version>
               <Java-Version>${java.version}</Java-Version>
               <Java-Vendor>${java.vendor}</Java-Vendor>
               <Os-Name>${os.name}</Os-Name>
               <Os-Arch>${os.arch}</Os-Arch>
               <Os-Version>${os.version}</Os-Version>
               <Build-Number>${buildNumber}</Build-Number>
               <Build-Time>${buildTime}</Build-Time>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.0.10</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[1.6,1.8)</version> <!-- 1.6.x, 1.7.x -->
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.3</version>
          </dependency>
        </dependencies>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <updateDependencies>false</updateDependencies>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-scm-plugin</artifactId>
        <dependencies>
          <dependency>
            <groupId>org.apache.maven.scm</groupId>
            <artifactId>maven-scm-provider-gitexe</artifactId>
            <version>1.3</version>
          </dependency>
        </dependencies>
      </plugin>

      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <trimStackTrace>false</trimStackTrace>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-idea-plugin</artifactId>
        <configuration>
          <ideaVersion>6.x</ideaVersion>
          <downloadJavadocs>true</downloadJavadocs>
          <downloadSources>true</downloadSources>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-assembly-plugin</artifactId>
        <configuration>
          <appendAssemblyId>false</appendAssemblyId>
        </configuration>
      </plugin>

    </plugins>

  </build>


  <repositories>

    <repository>
       <id>jboss-deprecated-repository</id>
       <name>JBoss Deprecated</name>
       <url>https://repository.jboss.org/maven2/</url>
       <releases>
         <enabled>true</enabled>
         <updatePolicy>never</updatePolicy>
       </releases>
       <!-- Explicitly disable snapshots, so Maven won't try to
            check for updates for snapshot internal (rhq-*) deps. -->
       <snapshots>
         <enabled>false</enabled>
       </snapshots>
    </repository>

    <repository>
       <id>jboss-public-repo-group</id>
       <name>JBoss Public Repository Group</name>
       <url>http://repository.jboss.org/nexus/content/groups/public/</url>
       <!-- Explicitly disable snapshots, so Maven won't try to
            check for updates for snapshot internal (rhq-*) deps. -->
       <snapshots>
         <enabled>false</enabled>
       </snapshots>
    </repository>

  </repositories>

  <pluginRepositories>

    <pluginRepository>
       <id>jboss-public-repo-group</id>
       <name>JBoss Public Repository Group</name>
       <url>http://repository.jboss.org/nexus/content/groups/public/</url>
    </pluginRepository>

  </pluginRepositories>

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

  </distributionManagement>


  <modules>
    <module>modules</module>
  </modules>


  <profiles>
    <profile>
        <id>ojdbc-driver</id>
        <activation>
            <property>
                <name>rhq.m2.repo.url.oracle</name>
            </property>
        </activation>

        <dependencies>
            <!-- Oracle JDBC driver - required only if you want to run the tests, or dbsetup, against Oracle.
                 Add a top level dependency if this profile is active to allow for db-required tests in any module.
                 The driver can not be packaged for OpenSource distributions due to licensing issues, and as such,
                 this profile should not be active by default. -->
            <dependency>
                <groupId>com.oracle</groupId>
                <artifactId>ojdbc5</artifactId>
                <version>${ojdbc5.version}</version>
                <scope>provided</scope>
            </dependency>
        </dependencies>
    </profile>

    <profile>
     <id>dev</id>

     <properties>
        <!-- The below prop can be used by antrun scripts to check if the dev profile is enabled. -->
        <dev.profile.active>true</dev.profile.active>
        <!-- This tells dbsetup (in the dbutils module) to use the dev DB conn props
             (rhq.dev.ds.*), rather than the test DB conn props (rhq.test.ds.*). -->
        <db>dev</db>
     </properties>

     <build>
      <plugins>

       <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <executions>
          <execution>
            <phase>validate</phase>
            <inherited>false</inherited>
            <configuration>
              <tasks>
                <echo>.                            !!!!!!! dev profile is active !!!!!!!</echo>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
       </plugin>

       <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <useFile>false</useFile>
        </configuration>
       </plugin>

      </plugins>
     </build>

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

      <!-- Set the java6.home prop to a Java6 JRE dir to enforce that only Java6 APIs are used. -->
      <profile>
         <id>check-java-api</id>
         <activation>
            <property>
               <name>java6.home</name>
            </property>
         </activation>

         <build>
           <plugins>
               <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                  <execution>
                    <phase>validate</phase>
                    <inherited>false</inherited>
                    <configuration>
                      <tasks>
                        <echo>java6.home=${java6.home}</echo>
                      </tasks>
                    </configuration>
                    <goals>
                      <goal>run</goal>
                    </goals>
                  </execution>
                </executions>
               </plugin>

              <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                  <compilerArguments>
                    <bootclasspath>${java6.home}/lib/rt.jar${path.separator}${java6.home}/lib/jsse.jar${path.separator}${java6.home}/lib/jce.jar</bootclasspath>
                  </compilerArguments>
                </configuration>
              </plugin>
            </plugins>
          </build>
      </profile>

      <!-- Use buildnumber plugin only if SVN metadata is present. -->
      <profile>
         <id>build-number-generation</id>
         <activation>
            <file>
               <exists>.svn</exists>
            </file>
         </activation>

         <build>
            <plugins>
               <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>buildnumber-maven-plugin</artifactId>
                  <executions>
                     <execution>
                        <phase>validate</phase>
                        <goals>
                           <goal>create</goal>
                        </goals>
                     </execution>
                     </executions>
                     <configuration>
                     <getRevisionOnlyOnce>true</getRevisionOnlyOnce>
                     <revisionOnScmFailure>0</revisionOnScmFailure>
                     <doCheck>false</doCheck>
                     <doUpdate>false</doUpdate>
                  </configuration>
               </plugin>
            </plugins>
         </build>
      </profile>

      <profile>
          <id>build-properties</id>
          <activation>
              <file>
                  <exists>.git</exists>
              </file>
          </activation>

          <build>
              <plugins>
                <plugin>
                  <artifactId>maven-antrun-plugin</artifactId>
                  <executions>
                      <execution>
                          <id>write-build-time-properties-file</id>
                          <goals>
                              <goal>run</goal>
                          </goals>
                          <phase>generate-sources</phase>
                          <configuration>
                              <tasks>
                                  <tstamp>
                                      <format property="buildTime" pattern="MM/dd/yy hh:mm aa z" locale="en,US" timezone="GMT" />
                                  </tstamp>
                                  <mkdir dir="target" />
                                  <echo file="target/build-time.properties" level="error">buildTime = ${buildTime}
                                  </echo>
                              </tasks>
                          </configuration>
                      </execution>

                      <execution>
                          <id>echo-build-properties</id>
                          <phase>compile</phase>
                          <inherited>false</inherited>
                          <goals>
                              <goal>run</goal>
                          </goals>
                          <configuration>
                              <tasks>
                                  <echo level="debug">buildTime = ${buildTime}</echo>
                                  <echo level="debug">buildNumber = ${buildNumber}</echo>
                              </tasks>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>

              <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>exec-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <id>generate-build-number-properties</id>
                          <phase>generate-sources</phase>
                          <goals>
                              <goal>exec</goal>
                          </goals>
                          <configuration>
                              <executable>git</executable>
                              <arguments>
                                  <argument>log</argument>
                                  <argument>--pretty=format:buildNumber = %h</argument>
                                  <argument>-n1</argument>
                              </arguments>
                              <outputFile>${project.build.directory}/build-number.properties</outputFile>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>

              <plugin>
                  <groupId>org.codehaus.mojo</groupId>
                  <artifactId>properties-maven-plugin</artifactId>
                  <executions>
                      <execution>
                          <id>read-build-properties</id>
                          <phase>process-sources</phase>
                          <goals>
                              <goal>read-project-properties</goal>
                          </goals>
                          <configuration>
                              <files>
                                  <file>${project.build.directory}/build-time.properties</file>
                                  <file>${project.build.directory}/build-number.properties</file>
                              </files>
                          </configuration>
                      </execution>
                  </executions>
              </plugin>
            </plugins>
          </build>
      </profile>

      <!-- This profile should be enabled when a release is being published. 
           It will ensure that sources and javadoc jars are built and published
           for each source module. -->
      <profile>
         <id>publish</id>

         <build>
            <plugins>

                <plugin>
                  <artifactId>maven-source-plugin</artifactId>
                  <executions>
                    <execution>
                      <id>attach-sources</id>
                      <goals>
                        <goal>jar</goal>
                      </goals>
                    </execution>
                  </executions>
                </plugin>

                <plugin>
                  <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.apache.maven.plugins</groupId>
                <artifactId>maven-jxr-plugin</artifactId>
                <version>2.2</version>
                <inherited>true</inherited>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>2.3.1</version>
                <configuration>
                    <xmlOutput>true</xmlOutput>
                    <onlyAnalyze>org.rhq.*,org.jboss.jopr.*</onlyAnalyze>
                    <effort>Max</effort>
                    <threshold>Default</threshold>
                </configuration>
                <inherited>true</inherited>
            </plugin>

            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>jdepend-maven-plugin</artifactId>
                <version>2.0-beta-2</version>
            </plugin>
<!--
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>2.7</version>
                <configuration>
                    <aggregate>true</aggregate>
                    <additionalJOption>-J-Xmx768m</additionalJOption>
                </configuration>
            </plugin>
-->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-report-plugin</artifactId>
                <version>2.6</version>
            </plugin>
<!--
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>emma-maven-plugin</artifactId>
                <version>1.0-alpha-2</version>
                <inherited>true</inherited>
            </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>

    <!-- more properties related to mvn site -->
    <licenses>
        <license>
            <name>GPL</name>
            <url>http://gnu.org</url>
        </license>
    </licenses>

    <developers>
        <developer>
            <name>Charles Crouch</name>
            <timezone>-6</timezone>
        </developer>
        <developer>
            <name>Jason Dobies</name>
            <timezone>-5</timezone>
            <roles>
                <role>retired</role>
            </roles>
        </developer>
        <developer>
            <name>Filip Drabeck</name>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <name>Greg Hinkle</name>
            <timezone>-5</timezone>
            <url>http://www.jroller.com/ghinkle/</url>
            <roles>
                <role>retired</role>
            </roles>
        </developer>
        <developer>
            <name>Lukas Krejci</name>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <name>Joseph Marques</name>
            <url>http://josephmarques.wordpress.com</url>
            <timezone>-5</timezone>
            <roles>
                <role>retired</role>
            </roles>
        </developer>
        <developer>
            <name>Fady Matar</name>
            <timezone>+2</timezone>
            <roles>
                <role>retired</role>
            </roles>
        </developer>
        <developer>
            <name>John 'Mazz' Mazzitelli</name>
            <timezone>-5</timezone>
            <url>http://management-platform.blogspot.com</url>
        </developer>
        <developer>
            <name>Simeon Pinder</name>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <name>Heiko W. Rupp</name>
            <email>hrupp@redhat.com</email>
            <url>http://pilhuhn.blogspot.com</url>
            <timezone>+1</timezone>
        </developer>
        <developer>
            <name>John Sanda</name>
            <url>http://johnsanda.blogspot.com</url>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <name>Jessica Sant</name>
            <timezone>-5</timezone>
            <roles>
                <role>retired</role>
            </roles>
        </developer>
        <developer>
            <name>Jay Shaughnessy</name>
            <timezone>-5</timezone>
        </developer>
        <developer>
            <name>Ian Springer</name>
            <timezone>-5</timezone>
        </developer>
    </developers>

    <contributors>
        <contributor>
            <name>Steve Millidge</name>
            <timezone>0</timezone>
        </contributor>
        <contributor>
            <name>Alex Kiefer</name>
            <timezone>+1</timezone>
        </contributor>
        <contributor>
            <name>Rafael Torres Coelho Soares</name>
            <timezone>-7</timezone>
        </contributor>
    </contributors>

    <mailingLists>
        <mailingList>
            <name>User List</name>
            <subscribe>https://fedorahosted.org/mailman/listinfo/rhq-users</subscribe>
            <unsubscribe>https://fedorahosted.org/mailman/listinfo/rhq-users</unsubscribe>
            <post>rhq-users@lists.fedorahosted.org</post>
            <archive>https://fedorahosted.org/pipermail/rhq-users/</archive>
        </mailingList>
        <mailingList>
            <name>Developer List</name>
            <subscribe>https://fedorahosted.org/mailman/listinfo/rhq-devel</subscribe>
            <unsubscribe>https://fedorahosted.org/mailman/listinfo/rhq-devel</unsubscribe>
            <post>rhq-devel@lists.fedorahosted.org</post>
            <archive>https://fedorahosted.org/pipermail/rhq-devel/</archive>
        </mailingList>
    </mailingLists>

</project>

