<!--
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>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-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>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-json</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>uimaj-json.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimaj-v3migration-jcas</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>uimaj-v3migration-jcas.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimafit-core</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>uimafit-core.jar</outputFileNameMapping>
      <outputDirectory>lib</outputDirectory>
      <useProjectArtifact>false</useProjectArtifact>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </dependencySet>
    <dependencySet>
      <includes>
        <include>org.apache.uima:uimafit-cpe</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputFileNameMapping>uimafit-cpe.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>

    <!--  loggers and other lib 3rd party jars not renamed -->
    <dependencySet>
      <includes>
        <include>com.fasterxml.jackson.core:jackson-core</include>
        <include>org.bitbucket.mstrobel:procyon-compilertools</include>
        <include>org.bitbucket.mstrobel:procyon-core</include>
        <include>com.github.javaparser:javaparser-core</include>
        <include>org.slf4j:slf4j-api</include>
        <!-- hook to built-in Java backend for slf4j included -->
        <include>org.slf4j:slf4j-jdk14</include>
        <include>commons-io:commons-io</include>
        <include>org.apache.commons:commons-lang3</include>
        <include>org.springframework:spring-aop</include>
        <include>org.springframework:spring-beans</include>
        <include>org.springframework:spring-context</include>
        <include>org.springframework:spring-core</include>
        <include>org.springframework:spring-expression</include>
        <include>org.springframework:spring-jcl</include>
      </includes>
      <unpack>false</unpack>
      <scope>runtime</scope>
      <outputDirectory>lib</outputDirectory>
      <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>

    <!-- Documentation -->
    <fileSet>
      <directory>uimaj-documentation/target/site/</directory>
      <outputDirectory>docs</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
      <excludes>
        <exclude>**/maint.*</exclude>
        <exclude>**/maint/**</exclude>
      </excludes>
    </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>

    <!-- Copy the API Change reports -->
    <fileSet>
      <directory>uimaj-core/api-change-report</directory>
      <outputDirectory>uimaj-core/api-change-report</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
    <fileSet>
      <directory>uimaj-cpe/api-change-report</directory>
      <outputDirectory>uimaj-cpe/api-change-report</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
    <fileSet>
      <directory>uimaj-json/api-change-report</directory>
      <outputDirectory>uimaj-json/api-change-report</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
    <fileSet>
      <directory>uimafit-core/api-change-report</directory>
      <outputDirectory>uimafit-core/api-change-report</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
    <fileSet>
      <directory>uimafit-cpe/api-change-report</directory>
      <outputDirectory>uimafit-cpe/api-change-report</outputDirectory>
      <fileMode>644</fileMode>
      <directoryMode>755</directoryMode>
    </fileSet>
  </fileSets>

  <files>
    <!-- copy bin distr license and notice -->
    <file>
      <source>src/main/bin_distr_license_notices/LICENSE.txt</source>
      <outputDirectory></outputDirectory>
      <fileMode>644</fileMode>
    </file>
    <file>
      <source>src/main/bin_distr_license_notices/NOTICE.md</source>
      <outputDirectory></outputDirectory>
      <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>
    <file>
      <source>api-change-report.html</source>
      <outputDirectory>.</outputDirectory>
    </file>
  </files>
</assembly>