<?xml version="1.0" encoding="UTF-8"?>
<!--
    Licensed to the Apache Software Foundation (ASF) under one or more
    contributor license agreements.  See the NOTICE file distributed with
    this work for additional information regarding copyright ownership.
    The ASF licenses this file to You 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.
-->
<component>
  <!--<id>common-bin</id>-->

  <fileSets>
    <!-- Copy over files that should not get the line endings converted -->
    <fileSet>
      <directory>src/release</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>bin/*.jar</include>
        <include>conf/*.ts</include>
        <include>conf/*.ks</include>
        <include>conf/*.cert</include>
      </includes>
    </fileSet>
    
    <!-- Copy over all sample configurations -->
    <fileSet>
      <directory>src/sample-conf</directory>
      <outputDirectory>conf/</outputDirectory>
      <includes>
        <include>activemq-*.xml</include>
      </includes>
    </fileSet>

    <!-- lets copy the portions of the admin web app we need - as we can't exclude stuff from the WAR -->
    <fileSet>
      <directory>../activemq-web-console/src/main/webapp</directory>
      <outputDirectory>/webapps/admin</outputDirectory>
      <excludes>
        <exclude>**/activemq.xml</exclude>
        <exclude>**/webconsole-embedded.xml</exclude>
      </excludes>
    </fileSet>
    <fileSet>
      <directory>../activemq-web-console/target/classes</directory>
      <outputDirectory>/webapps/admin/WEB-INF/classes</outputDirectory>
      <includes>
        <include>**/*.class</include>
      </includes>
    </fileSet>

    <!-- the web demo -->
    <fileSet>
      <directory>../activemq-web-demo/src/main/webapp</directory>
      <outputDirectory>/webapps/demo</outputDirectory>
      <excludes>
        <exclude>**/activemq.xml</exclude>
        <exclude>**/webconsole-embedded.xml</exclude>
      </excludes>
    </fileSet>

    <!-- the file server -->
    <fileSet>
      <directory>../activemq-fileserver/src/main/webapp</directory>
      <outputDirectory>/webapps/fileserver</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>../activemq-fileserver/target/classes</directory>
      <outputDirectory>/webapps/fileserver/WEB-INF/classes</outputDirectory>
      <includes>
        <include>**/*.class</include>
      </includes>
    </fileSet>
  </fileSets> 
  
  <dependencySets>
    
    <!-- Copy over jar files -->
    <dependencySet>
      <outputDirectory>/bin</outputDirectory>
      <unpack>false</unpack>
      <outputFileNameMapping>run.jar</outputFileNameMapping>
      <includes>
        <include>${pom.groupId}:activemq-run</include>
      </includes>
    </dependencySet>

    <dependencySet>
      <outputDirectory>/webapps/camel</outputDirectory>
      <unpack>true</unpack>
      <unpackOptions>
        <excludes>
          <exclude>**/applicationContext.xml</exclude>
          <!-- ignore jars already in distro -->
          <exclude>**/act*.jar</exclude>
          <exclude>**/ant*.jar</exclude>
          <exclude>**/aop*.jar</exclude>
<!--
          <exclude>**/asm*.jar</exclude>
-->
          <exclude>**/camel-*.jar</exclude>
          <exclude>**/commons*.jar</exclude>
          <exclude>**/groovy*.jar</exclude>
          <exclude>**/jackson*.jar</exclude>
          <exclude>**/jaxb*.jar</exclude>
          <exclude>**/jdom*.jar</exclude>
          <exclude>**/jettison*.jar</exclude>
          <exclude>**/jruby*.jar</exclude>
          <exclude>**/jstl*.jar</exclude>
          <exclude>**/rome*.jar</exclude>
          <exclude>**/sitemesh*.jar</exclude>
          <exclude>**/slf4j-*.jar</exclude>
          <exclude>**/spring-*.jar</exclude>
          <exclude>**/standard*.jar</exclude>
          <exclude>**/stax*.jar</exclude>
          <!-- exclude unused javascript  -->
          <exclude>**/bespin/</exclude>
          <exclude>**/dijit/</exclude>
          <exclude>**/dojo/</exclude>
          <exclude>**/dojox/</exclude>
        </excludes>
      </unpackOptions>
      <includes>
        <include>org.apache.camel:camel-web:war</include>
      </includes>
    </dependencySet>
    
    <dependencySet>
      <outputDirectory>/</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <includes>
        <include>${pom.groupId}:activemq-all</include>
      </includes>
    </dependencySet>
    <dependencySet>
      <outputDirectory>/lib</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <includes>
        <include>commons-logging:commons-logging</include>
        <include>${pom.groupId}:activemq-core</include>
        <include>${pom.groupId}:activemq-console</include>
        <include>${pom.groupId}:activemq-jaas</include>
        <include>${pom.groupId}:kahadb</include>
        <include>org.apache.activemq.protobuf:activemq-protobuf</include>
        <include>org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec</include>
        <include>org.apache.geronimo.specs:geronimo-jms_1.1_spec</include>
        <include>org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec</include>
        <include>${pom.groupId}:activemq-web</include>

        <!-- camel -->
        <include>org.apache.camel:camel-core</include>
        <include>org.apache.camel:camel-spring</include>
        <include>org.apache.camel:camel-jetty</include>
        <include>org.apache.camel:camel-jms</include>
        <include>org.apache.activemq:activemq-camel</include>
				<!-- Java 5 only -->
        <include>javax.xml.bind:jaxb-api</include>
        <include>javax.activation:activation</include>
        <include>com.sun.xml.bind:jaxb-impl</include>
        <include>stax:stax-api</include>
        <include>stax:stax</include>
      </includes>
    </dependencySet>
    <dependencySet>
      <outputDirectory>/lib/optional</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <includes>
        <include>${pom.groupId}:activemq-rar</include>
        <include>${pom.groupId}:activemq-optional</include>
        <include>${pom.groupId}:activemq-pool</include>
        <include>${pom.groupId}:activemq-xmpp</include>
        <include>${pom.groupId}:activemq-fuse</include>
        <include>${pom.groupId}:activecluster</include>
        <include>${pom.groupId}:activemq-spring</include>
        <include>${pom.groupId}:activeio-core</include>
        <include>${pom.groupId}:activemq-jmdns_1.0</include>
        <include>commons-beanutils:commons-beanutils</include>
        <include>commons-collections:commons-collections</include>
        <include>commons-httpclient:commons-httpclient</include>
        <include>commons-dbcp:commons-dbcp</include>
        <include>commons-pool:commons-pool</include>
        <include>commons-codec:commons-codec</include>
        <include>commons-net:commons-net</include>
        <include>commons-lang:commons-lang</include>
        <include>log4j:log4j</include>
        <include>org.apache.geronimo.specs:geronimo-j2ee-connector_1.5_spec</include>
        <include>org.apache.xbean:xbean-spring</include>
        <include>org.springframework:spring-aop</include>
        <include>org.springframework:spring-core</include>
        <include>org.springframework:spring-beans</include>
        <include>org.springframework:spring-context</include>
        <include>org.springframework:spring-tx</include>
        <include>org.springframework:spring-jms</include>
        <include>org.springframework:spring-asm</include>
        <include>org.springframework:spring-expression</include>
        <include>com.thoughtworks.xstream:xstream</include>
        <include>xpp3:xpp3</include>
        <include>org.codehaus.woodstox:woodstox-core-asl</include>
        <include>org.codehaus.woodstox:stax2-api</include>
        <include>org.springframework.ws:spring-oxm-tiger</include>
        <include>org.codehaus.jettison:jettison</include>
        <include>org.apache.velocity:velocity</include>
        <include>net.sf.josql:josql</include>
        <include>org.jasypt:jasypt</include>
        <include>com.ibm.icu:icu4j</include>
      </includes>
    </dependencySet>
    <dependencySet>
      <outputDirectory>/lib/web</outputDirectory>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <includes>
        <include>org.springframework:spring-web</include>
        <include>org.springframework:spring-webmvc</include>
        <include>org.eclipse.jetty.aggregate:jetty-all-server</include>
        <include>org.eclipse.jetty:jetty-websocket</include>
        <include>org.apache.geronimo.specs:geronimo-servlet_2.5_spec</include>
        <include>org.slf4j:slf4j-api</include>
        <include>org.slf4j:slf4j-jcl</include>

        <!-- JSP support -->
        <include>org.mortbay.jetty:jsp-2.1-glassfish</include>
        <include>org.mortbay.jetty:jsp-api-2.1-glassfish</include>
        <include>org.eclipse.jdt:core</include>

        <!-- JSTL and other web stuff -->
        <include>opensymphony:sitemesh</include>

        <!-- Atom/RSS support -->
        <include>rome:rome</include>
        <include>jdom:jdom</include>
        <!--  Camel web dependencies -->
        <include>org.fusesource.commonman:commons-management</include>
      </includes>
    </dependencySet>
    
    <dependencySet>
      <outputDirectory>/webapps/console</outputDirectory>
      <unpack>true</unpack>
      <scope>runtime</scope>
      <includes>
        <include>org.fusesource:fuse-web-console:war:war</include>
      </includes>
      <unpackOptions>
      	<excludes>
        	<exclude>**/activemq.xml</exclude>
        	<exclude>**/fuse-console.xml</exclude>
      	</excludes>
      </unpackOptions>
    </dependencySet>
  </dependencySets>
</component>
