<?xml version="1.0" encoding="UTF-8"?>

<!--
    Copyright 2005-2006 The Apache Software Foundation
   
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
   
    http://www.apache.org/licenses/LICENSE-2.0
   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
-->

<project
  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xmlns="http://maven.apache.org/POM/4.0.0">
  
  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>incubator-activemq</groupId>
    <artifactId>activemq-parent</artifactId>
    <version>fuse-4.1.0.8</version>
  </parent>

  <artifactId>incubator-activemq</artifactId>
  <packaging>jar</packaging>
  <name>ActiveMQ :: Assembly</name>
  <description>Puts together the ActiveMQ distribution</description>

  <scm>
    <connection>scm:svn:http://svn.apache.org/repos/asf/incubator/activemq/trunk/assembly</connection>
    <developerConnection>scm:svn:http://svn.apache.org/repos/asf/incubator/activemq/trunk/assembly</developerConnection>
    <url>http://svn.apache.org/viewcvs.cgi/incubator/activemq/trunk/assembly</url>
  </scm> 

  <dependencies>
    
    <!-- activemq -->
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-core</artifactId>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-core</artifactId>
      <type>test-jar</type>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activeio-core</artifactId>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-console</artifactId>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-optional</artifactId>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-web</artifactId>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-jaas</artifactId>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-web-demo</artifactId>
      <type>war</type>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activecluster</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>${pom.groupId}</groupId>
      <artifactId>activemq-rar</artifactId>
      <type>rar</type>
      <optional>true</optional>
    </dependency>
    
    <!-- commons -->
    <dependency>
      <groupId>commons-httpclient</groupId>
      <artifactId>commons-httpclient</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-beanutils</groupId>
      <artifactId>commons-beanutils</artifactId>
    </dependency>
    <dependency>
      <groupId>commons-dbcp</groupId>
      <artifactId>commons-dbcp</artifactId>
      <version>1.2</version>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>commons-pool</groupId>
      <artifactId>commons-pool</artifactId>
      <optional>true</optional>
    </dependency>
    
    <dependency>
      <groupId>activesoap</groupId>
      <artifactId>jaxp-api</artifactId>
    </dependency>
    <dependency>
      <groupId>activemq</groupId>
      <artifactId>jmdns</artifactId>
    </dependency>
    <dependency>
      <groupId>xstream</groupId>
      <artifactId>xstream</artifactId>
    </dependency>
    <dependency>
      <groupId>xmlpull</groupId>
      <artifactId>xmlpull</artifactId>
    </dependency>
    <dependency>
      <groupId>mx4j</groupId>
      <artifactId>mx4j</artifactId>
    </dependency>
    <dependency>
      <groupId>mx4j</groupId>
      <artifactId>mx4j-remote</artifactId>
    </dependency>

    <dependency>
      <groupId>backport-util-concurrent</groupId>
      <artifactId>backport-util-concurrent</artifactId>
    </dependency>
    <dependency>
      <groupId>log4j</groupId>
      <artifactId>log4j</artifactId>
    </dependency>
    
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jms_1.1_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-jsp_2.0_spec</artifactId>
      <exclusions>
        <exclusion>
          <groupId>org.apache.geronimo.specs</groupId>
          <artifactId>geronimo-servlet_2.4_spec</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-j2ee-connector_1.5_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-j2ee-jacc_1.0_spec</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.geronimo.specs</groupId>
      <artifactId>geronimo-j2ee-management_1.0_spec</artifactId>
    </dependency>
    
    <dependency>
       <groupId>org.apache.xbean</groupId>
       <artifactId>xbean-spring</artifactId>
       <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty</artifactId>
    </dependency>
    <dependency>
      <groupId>org.mortbay.jetty</groupId>
      <artifactId>jetty-util</artifactId>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derby</artifactId>
      <optional>true</optional>
    </dependency>
    <dependency>
      <groupId>org.apache.derby</groupId>
      <artifactId>derbynet</artifactId>
      <optional>true</optional>
    </dependency>
    
    <dependency>
      <groupId>junit</groupId>
      <artifactId>junit</artifactId>
      <scope>test</scope>
    </dependency>
    
    <!-- dependencies specific to this module -->
    <dependency>
      <groupId>jrms</groupId>
      <artifactId>jrms</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xercesImpl</artifactId>
      <version>2.6.2</version>
    </dependency>
    <dependency>
      <groupId>xerces</groupId>
      <artifactId>xmlParserAPIs</artifactId>
      <version>2.6.2</version>
    </dependency>
    
  </dependencies>

  <build>
    
    <plugins>
      <!-- Configure which tests are included/excuded -->
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>1.1</version>
        <executions>
          <execution>
            <id>run-jar</id>
            <phase>package</phase>
            <configuration>
              <tasks>
                <jar destfile="target/run.jar" basedir="target/classes">
		              <include name="org/apache/activemq/console/Main*.class"/>
		              <manifest>
		                <attribute name="Main-Class" value="org.apache.activemq.console.Main"/>
		              </manifest>
                </jar>
              </tasks>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <configuration>
          <forkMode>pertest</forkMode>
          <excludes>
            <!-- These tests run too slow to execute as part of the unit tests -->
            <exclude implementation="java.lang.String">**/DefaultStoreBrokerTest.*</exclude>
            <exclude implementation="java.lang.String">**/ActiveIOTransportBrokerTest.*</exclude>
            <!-- These tests fails -->
            <exclude implementation="java.lang.String">**/SpringTest.*</exclude>
            <exclude implementation="java.lang.String">**/*QuickJournalRecoveryBrokerTest.*</exclude>
          </excludes>
          <includes>
            <include implementation="java.lang.String">**/*RetroactiveConsumerTestWithDestinationBasedBufferTest.*</include>
          </includes>
        </configuration>
      </plugin>
      <plugin>
        <groupId>incubator-activemq</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <version>${pom.version}</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <goals>
              <goal>createbundle</goal>
            </goals>
            <configuration>
              <includes>activemq-core,activemq-console,activeio-core,activemq-jaas,activemq-optional,backport-util-concurrent,commons-logging,geronimo-jms_1.1_spec,geronimo-j2ee-management_1.0_spec,derby</includes>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-assembly-plugin</artifactId>
        <version>2.1</version>
        <executions>
          <execution>
            <id>unix-bin</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                 <descriptor>src/main/descriptors/unix-bin.xml</descriptor>  
              </descriptors>
              <finalName>${pom.artifactId}-${pom.version}</finalName>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
          </execution>
          <execution>
            <id>windows-bin</id>
            <phase>package</phase>
            <goals>
              <goal>single</goal>
            </goals>
            <configuration>
              <descriptors>
                 <descriptor>src/main/descriptors/windows-bin.xml</descriptor>  
              </descriptors>
              <finalName>${pom.artifactId}-${pom.version}</finalName>
              <appendAssemblyId>false</appendAssemblyId>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <!-- plugin>
        <groupId>incubator-activemq</groupId>
        <artifactId>maven-activemq-plugin</artifactId>
        <version>${pom.version}</version>
        <configuration>
          <configFile>${basedir}/src/release/conf/activemq.xml</configFile>
          <url>broker:(tcp://localhost:61616)?useJmx=false</url>
        </configuration>
      </plugin -->
    </plugins>
  </build>

</project>
