<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>1.3.0.GA</version>
  <packaging>pom</packaging>

  <name>RHQ</name>
  <description>parent POM for all RHQ modules</description>
  <url>http://rhq-project.org/</url>
  <inceptionYear>2008</inceptionYear>

  <organization>
    <name>RHQ Project Advisory Board (Hyperic &amp; Red Hat, Inc.)</name>
    <url>http://rhq-project.org/</url>
  </organization>

  <scm>
    <connection>scm:svn:http://svn.rhq-project.org/repos/rhq/tags/RHQ_1_3_0_GA</connection>
    <developerConnection>scm:svn:http://svn.rhq-project.org/repos/rhq/tags/RHQ_1_3_0_GA</developerConnection>
  </scm>

  <issueManagement>
    <system>jira</system>
    <url>http://jira.rhq-project.org/</url>
  </issueManagement>

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

    <scm.branch>trunk</scm.branch>
    <scm.module.path />

    <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 -->
    <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>
    <jaxb-api.version>2.1</jaxb-api.version>
    <jaxb-impl.version>2.1.6</jaxb-impl.version>
    <jsf-api.version>1.2_12</jsf-api.version>
    <jsf-impl.version>1.2_12</jsf-impl.version>
    <ojdbc14.version>10.2.0.4.0</ojdbc14.version>
    <ojdbc5.version>11.1.0.7.0</ojdbc5.version>
    <ems.version>1.2.11</ems.version>
    <postgresql.version>8.3-604.jdbc3</postgresql.version>
    <h2.version>1.1.117</h2.version>
    <jtds.version>1.2.2</jtds.version>
    <richfaces.version>3.3.0.GA</richfaces.version>
    <sigar.version>1.6.3.82</sigar.version>
    <quartz.version>1.6.5</quartz.version>

    <!-- defaults for datasource used by dbsetup, unit+integration tests, and dev container build -
         these may be overridden in ~/.m2/settings.xml -->
    <rhq.test.ds.connection-url>jdbc:postgresql://127.0.0.1:5432/rhq</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.db-name>rhq</rhq.test.ds.db-name>
    <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>

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

    <!-- 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.jbossws</groupId>
         <artifactId>jbossws-native-dist</artifactId>
         <version>${jbossws-native-dist.version}</version>
         <type>zip</type>
      </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>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> 

    </dependencies>

  </dependencyManagement>

  <dependencies>

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

    <dependency>
      <groupId>i18nlog</groupId>
      <artifactId>i18nlog</artifactId>
      <version>1.0.9</version>
    </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>5.9</version>
      <scope>test</scope>
      <classifier>jdk15</classifier>
    </dependency>

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

  </dependencies>

  <build>

    <defaultGoal>install</defaultGoal>

     <pluginManagement>
       <plugins>
         <plugin>
           <artifactId>maven-antrun-plugin</artifactId>
           <version>1.3</version>
         </plugin>
         <plugin>
           <artifactId>maven-assembly-plugin</artifactId>
           <version>2.2-beta-2</version>
         </plugin>
         <plugin>
           <artifactId>maven-clean-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-compiler-plugin</artifactId>
           <version>2.0.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-dependency-plugin</artifactId>
           <version>2.0</version>
         </plugin>
         <plugin>
           <artifactId>maven-deploy-plugin</artifactId>
           <version>2.3</version>
         </plugin>
         <plugin>
           <artifactId>maven-ear-plugin</artifactId>
           <version>2.3.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-enforcer-plugin</artifactId>
           <version>1.0-alpha-3</version>
         </plugin>
         <plugin>
           <artifactId>maven-ejb-plugin</artifactId>
           <version>2.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-install-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-jar-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-javadoc-plugin</artifactId>
           <version>2.4</version>
         </plugin>
         <plugin>
           <artifactId>maven-plugin-plugin</artifactId>
           <version>2.4.1</version>
         </plugin>
         <plugin>
           <artifactId>maven-rar-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-release-plugin</artifactId>
           <!-- NOTE: If http://jira.codehaus.org/browse/MRELEASE-300 resurfaces,
                      it may be necessary to rollback to 2.0-beta-6. -->
           <version>2.0-beta-9</version>
         </plugin>
         <plugin>
           <artifactId>maven-resources-plugin</artifactId>
           <version>2.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-site-plugin</artifactId>
           <version>2.0-beta-6</version>
         </plugin>
         <plugin>
           <artifactId>maven-source-plugin</artifactId>
           <version>2.0.4</version>
         </plugin>
         <plugin>
            <artifactId>maven-surefire-plugin</artifactId>
            <version>2.4.2</version>
         </plugin>
         <plugin>
           <artifactId>maven-war-plugin</artifactId>
           <version>2.1-alpha-1</version>
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>build-helper-maven-plugin</artifactId>
           <version>1.3</version>         
         </plugin>
         <plugin>
           <groupId>org.codehaus.mojo</groupId>
           <artifactId>buildnumber-maven-plugin</artifactId>
           <version>1.0-beta-3</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>validate</phase>
             <goals>
               <goal>maven-version</goal>
             </goals>
           </execution>
         </executions>
      </plugin>
    
      <!-- Set the 'buildNumber' property to the current SVN revision, or to '0'
           if an SVN revision cannot be determined, so we can include the SVN
           revision in the MANIFEST.MF files of all build artifacts. -->
      <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>
             <timestampFormat>{0, date, long} {0, time, long}</timestampFormat>
          </configuration>
      </plugin>
    
      <!-- Ensure all code compiles and runs on Java 5 or later. -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <configuration>          
          <!-- invocation options -->
          <fork>true</fork>
          <meminitial>128M</meminitial>
          <maxmem>512M</maxmem>
          
          <!-- compiler options -->
          <source>1.5</source>
          <target>1.5</target>
          <optimize>false</optimize>          
        </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>${timestamp}</Build-Time>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-versions</id>
            <goals>
              <!-- IMPORTANT: Use enforce goal, rather than enforce-once goal, otherwise reactor
                              builds will fail due to http://jira.codehaus.org/browse/MENFORCER-11 -->
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <requireMavenVersion>
                  <version>2.0.10</version>
                </requireMavenVersion>
                <requireJavaVersion>
                  <version>[1.5,1.8)</version> <!-- 1.5.x, 1.6.x, 1.7.x -->
                </requireJavaVersion>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>

      <plugin>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <autoVersionSubmodules>true</autoVersionSubmodules>
          <updateDependencies>false</updateDependencies>
        </configuration>
      </plugin>

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

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

    </plugins>

    <extensions>

      <!-- Add support for scm URLs in the distributionManagement section. -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-scm</artifactId>
        <version>1.0-beta-4</version>
      </extension>

      <!-- Add support for dav URLs in the distributionManagement section. -->
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>1.0-beta-2</version>
      </extension>

    </extensions>

  </build>

  <repositories>
    <repository>
      <id>jboss</id>
      <name>JBoss Repository</name>
      <url>http://repository.jboss.org/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <pluginRepositories>
    <pluginRepository>
      <id>jboss</id>
      <name>JBoss Plugin Repository</name>
      <url>http://repository.jboss.org/maven2/</url>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </pluginRepository>
  </pluginRepositories>

  <distributionManagement>
    <repository>
      <!-- Copy the distribution jar file to a local checkout of the JBoss repository.
           This variable can be set in ~/.m2/settings.xml or $M2_HOME/conf/settings.xml. -->
      <id>repository.jboss.org</id>
      <url>file://${maven.repository.root}</url>
    </repository>

    <snapshotRepository>
      <id>jboss-snapshots</id>
      <name>JBoss Snapshot Repository</name>
      <url>dav:https://snapshots.jboss.org/maven2/</url>
    </snapshotRepository>
  </distributionManagement>

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

  <profiles>

    <profile>
        <id>ojdbc-driver</id>

        <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>ojdbc14</groupId>
                <artifactId>ojdbc14</artifactId>
                <version>${ojdbc14.version}</version>
                <scope>provided</scope>
            </dependency>

            <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>
     </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 java5.home prop to a Java5 JRE dir to enforce that only Java5 APIs are used. -->
      <profile>
         <id>check-java-api</id>

         <activation>
            <property>
               <name>java5.home</name>
            </property>
         </activation>

         <build>
           <plugins>
              <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                  <compilerArguments>
                    <bootclasspath>${java5.home}/lib/rt.jar${path.separator}${java5.home}/lib/jsse.jar${path.separator}${java5.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>

  </profiles>

</project>