<!--
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>tar.bz2</format-->  <!-- to speed up builds -->
    <format>zip</format>
  </formats>
  
  <includeBaseDirectory>true</includeBaseDirectory>
  
  <baseDirectory>/apache-uima</baseDirectory>
  
  
  <dependencySets>
    <!-- Because our artifactIds are uimaj-xxx but our jars are uima-xxx,
    I need a separate dependency set for each module so that I can
    specify the jar file name.  If we didn't have this inconsistency
    we could have a single dependencySet that included all modules
    and had an outputFileNameMapping of ${project.artifactId}.jar -->
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-bootstrap</include>
      </includes>
      <unpack>false</unpack>
      <outputFileNameMapping>uimaj-bootstrap.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode> 
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-core</include>
      </includes>
      <unpack>false</unpack>
      <outputFileNameMapping>uima-core.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-cpe</include>
      </includes>
      <unpack>false</unpack>
      <outputFileNameMapping>uima-cpe.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-document-annotation</include>
      </includes>
      <unpack>false</unpack>
      <outputFileNameMapping>uima-document-annotation.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-examples</include>
      </includes>
      <unpack>false</unpack>
      <outputFileNameMapping>uima-examples.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-tools</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>uima-tools.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-adapter-soap</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>uima-adapter-soap.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-adapter-vinci</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping> uima-adapter-vinci.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:jVinci</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>jVinci.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
    
    <!-- Copy each eclipse plugin into the /eclipsePlugins dir of the distribution -->
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-ep-cas-editor</include>
        <include>org.apache.uima:uimaj-ep-cas-editor-ide</include>
        <include>org.apache.uima:uimaj-ep-configurator</include>
        <include>org.apache.uima:uimaj-ep-debug</include>
        <include>org.apache.uima:uimaj-ep-jcasgen</include>
        <include>org.apache.uima:uimaj-ep-pear-packager</include>
        <include>org.apache.uima:uimaj-ep-runtime</include>
        <include>org.apache.uima:uimaj-ep-launcher</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputDirectory>eclipsePlugins</outputDirectory>
      <outputFileNameMapping>${artifact.build.finalName}.jar</outputFileNameMapping>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode> 
      <directoryMode>755</directoryMode>        
    </dependencySet>
  </dependencySets>
  
  <!-- Add other files - scripts, documentation, examples -->
  <fileSets>
    <fileSet>
      <directory>src/main/scripts</directory>
      <outputDirectory>bin</outputDirectory>
      <includes><include>*.sh</include></includes>
      <fileMode>755</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>
    <fileSet>
      <directory>src/main/scripts</directory>
      <outputDirectory>bin</outputDirectory>
      <excludes><exclude>*.sh</exclude></excludes>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>
    <fileSet>
      <directory>src/main/properties</directory>
      <outputDirectory>config</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>
    
    <!-- copy standard top level files -->        
    <fileSet>
      <directory>.</directory>
      <outputDirectory></outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode> 
      <includes>
        <include>README*</include>
        <include>readme*</include>
        <include>RELEASE_NOTES*</include>
        <include>Release-Notes*</include>
        <include>issuesFixed/**</include>      
      </includes>       
    </fileSet>
    
    <fileSet>
      <directory>target/site/apidocs</directory>
      <outputDirectory>docs/d/api</outputDirectory>
      <excludes>
        <exclude>options</exclude>
        <exclude>packages</exclude>
        <exclude>files</exclude>
        <exclude>argfile</exclude>        
      </excludes>
      <fileMode>444</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>

    <!-- docbooks -->
    <fileSet>
      <directory>uima-docbook-overview-and-setup/target/site/</directory>
      <outputDirectory>docs</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>
    <fileSet>
      <directory>uima-docbook-references/target/site</directory>
      <outputDirectory>docs</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>    
    <fileSet>
      <directory>uima-docbook-tools/target/site</directory>
      <outputDirectory>docs</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>    
    <fileSet>
      <directory>uima-docbook-tutorials-and-users-guides/target/site</directory>
      <outputDirectory>docs</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>
    
    <!-- examples -->
    <fileSet>
      <directory>uimaj-examples/src/main</directory>
      <outputDirectory>examples</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
      <includes>
        <include>deploy/**</include>
        <include>descriptors/**</include>
        <include>resources/**</include>
        <include>run_configuration/**</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>uimaj-examples/src/main/java</directory>
      <outputDirectory>examples/src</outputDirectory>
      <excludes>
        <exclude>org/apache/uima/examples/xmi/XmiEcoreCasConsumer.java</exclude>
        <exclude>org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java</exclude>
        <exclude>org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java</exclude>
      </excludes>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>        
    </fileSet>
    <fileSet>
      <directory>uimaj-examples/src/main/data</directory>
      <outputDirectory>examples/data</outputDirectory>
      <fileMode>644</fileMode>
      <!-- next mode 777 because some examples write into dir
           and we want to eliminate failures due to write permissions -->
      <directoryMode>777</directoryMode>        
    </fileSet>
  </fileSets>
 
  <files>
    <!-- copy bin distr license and notice -->
    <file>
      <source>src/main/readme/LICENSE</source>
      <outputDirectory></outputDirectory>
      <fileMode>644</fileMode>
    </file>
    <file> 
      <source>src/main/readme/NOTICE-without-jackson</source>
      <outputDirectory></outputDirectory>
      <destName>NOTICE</destName>
      <fileMode>644</fileMode>    
    </file>
        
    <file>
      <source>uimaj-examples/src/main/eclipseProject/project</source>
      <outputDirectory>examples</outputDirectory>
      <destName>.project</destName>
      <fileMode>644</fileMode> 
    </file>
    <file>
      <source>uimaj-examples/src/main/eclipseProject/classpath</source>
      <outputDirectory>examples</outputDirectory>
      <destName>.classpath</destName>
      <fileMode>644</fileMode> 
    </file>
    <file>
      <source>uimaj-examples/src/main/eclipseProject/ecore_src_readme.txt</source>
      <outputDirectory>examples/ecore_src</outputDirectory>
      <destName>readme.txt</destName>
      <fileMode>644</fileMode> 
    </file>
    <file>
      <source>uimaj-examples/src/main/java/org/apache/uima/examples/xmi/XmiEcoreCasConsumer.java</source>
      <outputDirectory>examples/ecore_src/org/apache/uima/examples/xmi</outputDirectory>
      <fileMode>644</fileMode> 
    </file>
    <file>
      <source>uimaj-examples/src/main/java/org/apache/uima/examples/xmi/Ecore2UimaTypeSystem.java</source>
      <outputDirectory>examples/ecore_src/org/apache/uima/examples/xmi</outputDirectory>
      <fileMode>644</fileMode> 
    </file>
    <file>
      <source>uimaj-examples/src/main/java/org/apache/uima/examples/xmi/UimaTypeSystem2Ecore.java</source>
      <outputDirectory>examples/ecore_src/org/apache/uima/examples/xmi</outputDirectory>
      <fileMode>644</fileMode> 
    </file>
  </files>
</assembly>