<!--
  vi:ts=2:sw=2:expandtab
-->
<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">

  <!-- Parent -->
  <parent>
    <groupId>org.jboss</groupId>
    <artifactId>jboss-parent</artifactId>
    <!-- 

    This should be re-enabled after Plugin
    configuration makes it into 
    release-pom.xml.  Otherwise all builds
    will break.


    <version>4-beta-2</version> -->
    <version>3</version>
  </parent>

  <!-- POM Model Version -->
  <modelVersion>4.0.0</modelVersion>

  <!-- Artifact Information -->
  <groupId>org.jboss.ejb3</groupId>
  <artifactId>jboss-ejb3-build</artifactId>
  <version>1.0.0</version>
  <packaging>pom</packaging>
  <name>JBoss EJB 3.0 Build POM</name>
  <url>http://labs.jboss.com/jbossejb3</url>
  <description>The JBoss EJB 3.0 Build POM</description>

  <!-- EJB3 Developers -->
  <developers>
    <developer>
      <name>Carlo de Wolf</name>
      <email>carlo.dewolf@jboss.com</email>
      <organization>JBoss, a division of Red Hat, Inc.</organization>
      <organizationUrl>http://www.jboss.com</organizationUrl>
      <roles>
        <role>Project Lead</role>
      </roles>
      <timezone>+1</timezone>
    </developer>
    <developer>
      <name>Andrew Lee Rubinger</name>
      <email>andrew.rubinger@jboss.org</email>
      <organization>JBoss, a division of Red Hat, Inc.</organization>
      <organizationUrl>http://www.jboss.com</organizationUrl>
      <roles>
        <role>Developer</role>
      </roles>
      <timezone>-5</timezone>
    </developer>
  </developers>

  <!-- SCM -->
  <scm>
    <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-build-1.0.0</connection>
    <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-build-1.0.0</developerConnection>
    <url>http://anonsvn.jboss.org/repos/jbossas/projects/ejb3/tags/jboss-ejb3-build-1.0.0</url>
  </scm>  
  
  <!-- Issues -->
  <issueManagement>
    <system>jira</system>
    <url>http://jira.jboss.com/jira/browse/EJBTHREE</url>
  </issueManagement>

  <repositories>
    <!-- APIviz repository -->
    <repository>
      <id>apiviz.release</id>
      <name>APIviz releases</name>
      <url>http://apiviz.googlecode.com/svn/site/repo/mvn/release</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

  <!-- Properties -->
  <properties>

    <!-- Versioning -->

    <!-- 
      
      These versions will be picked up by 
      individual project POMs, should be centralized
      here such that all modules of EJB3 have the same 
      dependencies.
      
    -->

    <!--  
      
      External
      
    -->
          
    <version.ant_ant>1.6.5</version.ant_ant>
    <version.commons-validator_commons-validator>1.3.1</version.commons-validator_commons-validator>
    <version.junit_junit>4.4</version.junit_junit>
    <version.org.jboss.aop_jboss-aop>2.0.0.GA</version.org.jboss.aop_jboss-aop>
    <version.org.jboss.aop_jboss-aop-aspects>2.0.0.CR7</version.org.jboss.aop_jboss-aop-aspects>
    <version.org.jboss.deployers>2.0.0.CR5</version.org.jboss.deployers>
    <version.org.jboss.microcontainer>2.0.0.CR5</version.org.jboss.microcontainer>
    <version.org.jboss.ws_jbossws-spi>1.0.3.GA</version.org.jboss.ws_jbossws-spi>
   
    <!-- Miscellaneous -->
    <jvmargs />

  </properties>

  <!-- Build Configurations -->
  <build>
    <outputDirectory>${ejb3.outputDirectory}</outputDirectory>
    <testOutputDirectory>${ejb3.testOutputDirectory}</testOutputDirectory>
    <finalName>${artifactId}</finalName>
    <plugins>

      <!-- Compiler -->
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <inherited>true</inherited>
        <configuration>
          <source>1.5</source>
          <target>1.5</target>
          <showDeprecation>false</showDeprecation>
          <showWarnings>true</showWarnings>
          <optimize>true</optimize>
          <compilerVersion>1.5</compilerVersion>
          <fork>true</fork>
          <executable>${JAVA_HOME}/bin/javac</executable>          
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>enforce-banned-dependencies</id>
            <goals>
              <goal>enforce</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <rules>
            <bannedDependencies>
              <excludes>
                <!-- deprecated, should be org.jboss:jboss-common-core -->
                <exclude>jboss:jboss-common-core</exclude>
                <!-- deprecated, should be org.jboss.remoting:jboss-remoting -->
                <exclude>jboss:jboss-remoting</exclude>
                <exclude>jboss.remoting:jboss-remoting</exclude>
                <!-- deprecated, should be org.jboss:jboss-test -->
                <exclude>jboss:jboss-test</exclude>
                <!-- deprecated, should be javassist:javassist -->
                <exclude>org.jboss:javassist</exclude>
                <!-- deprecated, should be org.jboss.metadata:jboss-metadata -->
                <exclude>org.jboss:jboss-metadata</exclude>
                <!-- deprecated, should be org.jboss.integration:jboss-transaction-spi -->
                <exclude>org.jboss:jboss-transaction-spi</exclude>
                <!-- deprecated, split up into multiple components -->
                <exclude>org.jboss.microcontainer:jboss-container</exclude>
                <!-- deprecated, should be org.jboss.deployers:jboss-deployers-core-spi -->
                <exclude>org.jboss.microcontainer:jboss-deployers-core-spi</exclude>
                <!-- deprecated, should be org.jboss.deployers:jboss-deployers-impl -->
                <exclude>org.jboss.microcontainer:jboss-deployers-impl</exclude>
                <!-- deprecated, should be org.jboss.deployers:jboss-deployers-spi -->
                <exclude>org.jboss.microcontainer:jboss-deployers-spi</exclude>
              </excludes>
            </bannedDependencies>
            <requireMavenVersion>
              <version>[2.0.9,2.1)</version>
            </requireMavenVersion>
          </rules>
        </configuration>
      </plugin>

      <plugin>
        <artifactId>maven-javadoc-plugin</artifactId>
        <configuration>
          <doclet>net.gleamynode.apiviz.APIviz</doclet>
          <docletArtifact>
            <groupId>net.gleamynode.apiviz</groupId>
            <artifactId>apiviz</artifactId>
            <version>1.0.3</version>
          </docletArtifact>
        </configuration>
      </plugin>

      <!-- Surefire (Tests) Plugin -->

      <!-- 
        
        To pass JVM Arguments (ie. Remote Debugging w/ suspend),
        pass "maven.surefire.debug" as system property, ie:
        
        mvn test -Dmaven.surefire.debug="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8787"
        
      -->
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <redirectTestOutputToFile>true</redirectTestOutputToFile>
          <printSummary>true</printSummary>
          <!-- To allow override from the command line, see SUREFIRE-319 -->
          <testFailureIgnore>${maven.test.failure.ignore}</testFailureIgnore>
          <includes>
            <include>**/*TestCase.java</include>
            <include>**/*TestSuite.java</include>
          </includes>
          <forkMode>always</forkMode>
          <argLine>-ea</argLine>
        </configuration>
      </plugin>

      <!-- Maven Release Plugin Configuration -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-release-plugin</artifactId>
        <configuration>
          <tagBase>
            https://svn.jboss.org/repos/jbossas/projects/ejb3/tags
          </tagBase>
        </configuration>
      </plugin>

      <!-- Maven RAR Plugin Configuration -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-rar-plugin</artifactId>
        <configuration>
          <includeJar>true</includeJar>
          <rarSourceDirectory>src/main/java</rarSourceDirectory>
          <raXmlFile>src/main/resources/META-INF/ra.xml</raXmlFile>
        </configuration>
      </plugin>

      <!-- JBoss Deploy Plugin -->
      <plugin>
        <groupId>org.jboss.maven.plugins</groupId>
        <artifactId>maven-jboss-deploy-plugin</artifactId>
        <version>1.6</version>
        <executions>
          <execution>
            <goals>
              <goal>jboss-deploy</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <!-- Should be defined in local ~/.m2/settings.xml -->
          <jbossDeployRoot>${jboss.repository.root}</jbossDeployRoot>
          <groupId>jboss</groupId>
          <removeArtifactVersion>true</removeArtifactVersion>
        </configuration>
        <inherited>true</inherited>
      </plugin>

    </plugins>
  </build>

  <!-- Reporting -->
  <reporting>
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-project-info-reports-plugin</artifactId>
        <reportSets>
          <reportSet>
            <reports>
              <report>dependencies</report>
              <report>issue-tracking</report>
              <report>license</report>
              <report>scm</report>
            </reports>
          </reportSet>
        </reportSets>
      </plugin>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>findbugs-maven-plugin</artifactId>
        <version>1.0.0</version>
      </plugin>
    </plugins>
  </reporting>

  <!-- Dependencies -->
  <dependencyManagement>
    <dependencies>

      <dependency>
        <groupId>javax.activation</groupId>
        <artifactId>activation</artifactId>
        <version>1.0.2</version>
      </dependency>
    
      <!-- Apache Commons Validator -->
      <dependency>
        <groupId>commons-validator</groupId>
        <artifactId>commons-validator</artifactId>
        <version>
          ${version.commons-validator_commons-validator}
        </version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-log4j</artifactId>
        <version>2.0.5.GA</version>
        <scope>runtime</scope>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.logging</groupId>
        <artifactId>jboss-logging-spi</artifactId>
        <version>2.0.5.GA</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-common-core</artifactId>
        <version>2.2.5.GA</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.metadata</groupId>
        <artifactId>jboss-metadata</artifactId>
        <version>1.0.0.CR16</version>
      </dependency>
 
      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-mdr</artifactId>
        <version>2.0.0.CR3</version>
      </dependency>
 
      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-transaction-spi</artifactId>
        <version>5.0.0.Beta4</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss</groupId>
        <artifactId>jboss-reflect</artifactId>
        <version>2.0.0.CR1</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.naming</groupId>
        <artifactId>jnpserver</artifactId>
        <version>5.0.0.CR1</version>
        <scope>test</scope>
      </dependency>
      
      <!-- JBoss AOP -->
      <dependency>
        <groupId>org.jboss.aop</groupId>
        <artifactId>jboss-aop</artifactId>
        <version>${version.org.jboss.aop_jboss-aop}</version>
      </dependency>

      <!-- JBoss AOP Aspects -->
      <dependency>
        <groupId>org.jboss.aop</groupId>
        <artifactId>jboss-aop-aspects</artifactId>
        <version>${version.org.jboss.aop_jboss-aop-aspects}</version>
      </dependency>

      <!-- Aspects Commons -->
      <dependency>
        <groupId>org.jboss.aspects</groupId>
        <artifactId>jboss-aspects-common</artifactId>
        <version>1.0.0.Beta1</version>
        <scope>test</scope>
      </dependency>
      
      <!-- Remoting Aspects -->
      <dependency>
        <groupId>org.jboss.aspects</groupId>
        <artifactId>jboss-remoting-aspects</artifactId>
        <version>1.0.1.CR4</version>
      </dependency>

      <!-- JavaEE APIs -->      
      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-ejb-api</artifactId>
        <version>3.0.0.CR1</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-jacc-api</artifactId>
        <version>1.1.0.CR1</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-jaspi-api</artifactId>
        <version>1.0.0.CR1</version>
      </dependency>
    
      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-jca-api</artifactId>
        <version>1.5.0.CR1</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-persistence-api</artifactId>
        <version>3.0.0.CR1</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-servlet-api</artifactId>
        <version>2.5.0.CR1</version>
      </dependency>

      <dependency>
        <groupId>org.jboss.javaee</groupId>
        <artifactId>jboss-jms-api</artifactId>
        <version>1.1.0.CR1</version>
      </dependency>
      
      <!-- JBoss Microcontainer -->
      <dependency>
        <groupId>org.jboss.microcontainer</groupId>
        <artifactId>jboss-kernel</artifactId>
        <version>${version.org.jboss.microcontainer}</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.deployers</groupId>
        <artifactId>jboss-deployers-core-spi</artifactId>
        <version>${version.org.jboss.deployers}</version>
      </dependency>
      
      <dependency>
        <groupId>org.jboss.deployers</groupId>
        <artifactId>jboss-deployers-spi</artifactId>
        <version>${version.org.jboss.deployers}</version>
      </dependency>

       <dependency>
        <groupId>org.jboss.ws</groupId>
        <artifactId>jbossws-spi</artifactId>
        <version>${version.org.jboss.ws_jbossws-spi}</version>
      </dependency>

      <!-- JBoss Test -->
      <dependency>
        <groupId>org.jboss.test</groupId>
        <artifactId>jboss-test</artifactId>
        <version>1.1.0.GA</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>org.jboss.jbossas</groupId>
        <artifactId>jboss-server-manager</artifactId>
        <version>0.1.0.GA</version>
      </dependency>  
      
      <!-- JUnit -->
      <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>${version.junit_junit}</version>
        <scope>test</scope>
      </dependency>

      <dependency>
        <groupId>trove</groupId>
        <artifactId>trove</artifactId>
        <version>1.0.2</version>
      </dependency>

    </dependencies>
  </dependencyManagement>

  <profiles>
  
    <profile>
      <id>default</id>
      <activation>
        <activeByDefault>true</activeByDefault>
      </activation>
      <properties>
        <ejb3.outputDirectory>target/classes</ejb3.outputDirectory>
        <ejb3.testOutputDirectory>
          target/tests-classes
        </ejb3.testOutputDirectory>
      </properties>
    </profile>
        
    <profile>
      <id>eclipse</id>
      <build>
        <defaultGoal>process-test-resources</defaultGoal>
        <plugins>
          <plugin>
            <artifactId>maven-eclipse-plugin</artifactId>
            <executions>
              <execution>
                <id>eclipse</id>
                <phase>process-test-resources</phase>
                <goals>
                  <goal>eclipse</goal>
                </goals>
              </execution>
            </executions>
            <configuration>
              <downloadSources>true</downloadSources>
              <buildOutputDirectory>${ejb3.outputDirectory}</buildOutputDirectory>
            </configuration>
          </plugin>
        </plugins>
      </build>
      <properties>
        <ejb3.outputDirectory>eclipse-target/classes</ejb3.outputDirectory>
        <ejb3.testOutputDirectory>eclipse-target/tests-classes</ejb3.testOutputDirectory>
      </properties>
    </profile>
    
  </profiles>
  
</project>
