<!--
  ~ 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>bin</id>
  <formats>
    <format>tar.gz</format>
    <format>zip</format>
  </formats>
  <fileSets>
    <fileSet>      
      <directory>target/generated-resources/appassembler/jsw/archiva/apps</directory>
      <outputDirectory>apps</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/conf</directory>
      <outputDirectory>conf</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/lib</directory>
      <outputDirectory>lib</outputDirectory>
      <excludes>
        <!-- avoid what is pulled in by the appassembler plugin, and the archiva dependencies -->
        <exclude>archiva-*</exclude>
        <exclude>maven-metadata-appassembler.xml</exclude>
      </excludes>
      <fileMode>0755</fileMode>
    </fileSet> 
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/logs</directory>
      <outputDirectory>logs</outputDirectory>
    </fileSet>
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
      <outputDirectory>bin</outputDirectory>
      <includes>   
         <include>archiva</include>           
      </includes>
      <fileMode>0755</fileMode>
      <lineEnding>unix</lineEnding>
    </fileSet>
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
      <outputDirectory>bin</outputDirectory>
      <includes>   
         <include>wrapper-linux-x86-32</include>
         <include>wrapper-linux-x86-64</include>
         <include>wrapper-macosx-universal-32</include>
         <include>wrapper-solaris-x86-32</include>
         <include>wrapper-solaris-sparc-32</include>
         <include>wrapper-solaris-sparc-64</include>
      </includes>
      <fileMode>0755</fileMode>
    </fileSet>
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
      <outputDirectory>bin</outputDirectory>
      <includes>        
        <include>archiva.bat</include>
      </includes>
      <fileMode>0755</fileMode>
      <lineEnding>dos</lineEnding>
    </fileSet>
    <fileSet>
      <directory>target/generated-resources/appassembler/jsw/archiva/bin</directory>
      <outputDirectory>bin</outputDirectory>
      <includes>   
        <include>wrapper-windows-x86-32.exe</include>
      </includes>
      <fileMode>0755</fileMode>
    </fileSet>
    <fileSet>
      <directory>target/maven-shared-archive-resources/META-INF/</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>NOTICE</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>src/main/resources/</directory>
      <outputDirectory>/</outputDirectory>
      <includes>
        <include>LICENSE</include>
      </includes>
    </fileSet>
  </fileSets>
  <dependencySets>
    <dependencySet>
      <unpack>true</unpack>
      <outputDirectory>apps/archiva</outputDirectory>
      <includes>
        <include>org.apache.archiva:archiva-webapp</include>
      </includes>
    </dependencySet>
    <dependencySet>
      <unpack>true</unpack>
      <includes>
        <include>org.apache.archiva:archiva-docs:zip:docs</include>
      </includes>
    </dependencySet>
  </dependencySets>
</assembly>

