<?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.
-->
<assembly>
  <!-- id typically identifies the "type" (src vs bin etc) of the assembly -->
  <id>java-broker-bin</id>
  <includeBaseDirectory>false</includeBaseDirectory>
  <formats>
    <format>tar.gz</format>
    <format>zip</format>
  </formats>

  <fileSets>
  <!-- Apache Licensing -->
    <fileSet>
      <directory>../../resources</directory>
      <outputDirectory>qpid-${qpid.version}</outputDirectory>
      <includes>
          <include>DISCLAIMER</include>
          <include>LICENSE.txt</include>
          <include>NOTICE.txt</include>
          <include>README.txt</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>../..</directory>
      <outputDirectory>qpid-${qpid.version}</outputDirectory>
      <includes>
          <include>*.txt</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>../../src/main/release-docs</directory>
      <outputDirectory>qpid-${qpid.version}/docs</outputDirectory>
      <includes>
          <include>RELEASE_NOTES.txt</include>
      </includes>
    </fileSet>

    <!-- Metadata Jar -->
    <fileSet>
      <directory>target</directory>
      <outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
      <includes>
          <include>qpid-incubating.jar</include>
      </includes>
    </fileSet>
  </fileSets>
  <files>
    <!-- due to a bug in the assembly plugin (MASSEMBLY-153) you have
         to use decimal numbers to specify fileMode -->
    <file>
      <source>../../common/etc/qpid-run.conf</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>qpid-run.conf</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../etc/config.xml</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>config.xml</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../etc/jmxremote.access</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>jmxremote.access</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../etc/log4j.xml</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>log4j.xml</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../etc/passwd</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>passwd</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../etc/qpid-server.conf</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>qpid-server.conf</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../etc/virtualhosts.xml</source>
      <outputDirectory>qpid-${qpid.version}/etc</outputDirectory>
      <destName>virtualhosts.xml</destName>
      <fileMode>420</fileMode>
    </file>
    <file>
      <source>../../common/bin/qpid-run</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>qpid-run</destName>
      <fileMode>473</fileMode>
    </file>
    <file>
      <source>../bin/qpid-passwd</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>qpid-passwd</destName>
      <fileMode>473</fileMode>
    </file>
    <file>
      <source>../bin/qpid-server</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>qpid-server</destName>
      <fileMode>473</fileMode>
    </file>
    <file>
      <source>../bin/qpid-server.bat</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>qpid-server.bat</destName>
      <fileMode>473</fileMode>
    </file>
    <file>
      <source>../bin/run.bat</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>run.bat</destName>
      <fileMode>473</fileMode>
    </file>
    <file>
      <source>../bin/run.sh</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>run.sh</destName>
      <fileMode>473</fileMode>
    </file>
    <file>
      <source>../bin/runAll</source>
      <outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
      <destName>runAll</destName>
      <fileMode>473</fileMode>
    </file>
  </files>

  <dependencySets>
    <dependencySet>
      <outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
      <unpack>false</unpack>
      <!-- This needs to be tidied up QPID-280 -->
      <excludes>
        <exclude>org.apache.qpid:qpid-broker-distribution</exclude>
        <exclude>org.apache.qpid.management:org.apache.qpid.management.ui</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.commands</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.contenttype</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.expressions</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.jobs</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.runtime</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.auth</exclude>
        <exclude>org.eclipse.core:org.eclipse.core.runtime.compatibility.registry</exclude>
        <exclude>org.eclipse.equinox:org.eclipse.equinox.common</exclude>
        <exclude>org.eclipse.equinox:org.eclipse.equinox.preferences</exclude>
        <exclude>org.eclipse.equinox:org.eclipse.equinox.registry</exclude>
        <exclude>org.eclipse.help:org.eclipse.help</exclude>
        <exclude>org.eclipse.jface:org.eclipse.jface</exclude>
        <exclude>org.eclipse.osgi:org.eclipse.osgi</exclude>
        <exclude>org.eclipse.swt:org.eclipse.swt</exclude>
        <exclude>org.eclipse.swt:org.eclipse.swt.win32.win32.x86</exclude>
        <exclude>org.eclipse.ui:org.eclipse.ui</exclude>
        <exclude>org.eclipse.ui:org.eclipse.ui.forms</exclude>
        <exclude>org.eclipse.ui:org.eclipse.ui.workbench</exclude>
      </excludes>
    </dependencySet>
  </dependencySets>
</assembly>
