<!--
  ~ 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 xmlns="http://maven.apache.org/ASSEMBLY/2.2.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 https://maven.apache.org/xsd/assembly-2.2.0.xsd">
  <id>final-distribution</id>
  <formats>
    <format>dir</format>
    <format>tgz</format>
  </formats>
  <includeBaseDirectory>true</includeBaseDirectory>
  <baseDirectory>zeppelin-${project.version}-bin</baseDirectory>

  <dependencySets>
    <dependencySet>
      <!-- Enable access to all projects in the current multimodule build!
      <useAllReactorProjects>true</useAllReactorProjects> -->
      <!-- Now, select which projects to include in this module-set. -->
      <includes>
        <include>${project.groupId}:zeppelin-web</include>
        <include>${project.groupId}:zeppelin-web-angular</include>
      </includes>
      <useProjectArtifact>false</useProjectArtifact>
      <useTransitiveDependencies>false</useTransitiveDependencies>
    </dependencySet>
    <dependencySet>
      <outputDirectory>/lib</outputDirectory>
      <excludes>
        <exclude>${project.groupId}:zeppelin-web</exclude>
        <exclude>${project.groupId}:zeppelin-web-angular</exclude>
      </excludes>
      <useProjectArtifact>false</useProjectArtifact>
      <useTransitiveFiltering>true</useTransitiveFiltering>
    </dependencySet>
  </dependencySets>

  <fileSets>
    <fileSet>
      <directory>../</directory>
      <includes>
        <include>README.md</include>
        <include>LICENSE*</include>
        <include>NOTICE</include>
      </includes>
    </fileSet>
    <fileSet>
      <directory>../bin</directory>
      <directoryMode>0755</directoryMode>
      <fileMode>0755</fileMode>
    </fileSet>
    <fileSet>
      <directory>../licenses</directory>
    </fileSet>
    <fileSet>
      <directory>../conf</directory>
      <excludes>
        <exclude>credentials.json</exclude>
        <exclude>interpreter.json</exclude>
        <exclude>notebook-authorization.json</exclude>
        <exclude>shiro.ini</exclude>
        <exclude>zeppelin-env.cmd</exclude>
        <exclude>zeppelin-env.sh</exclude>
        <exclude>zeppelin-site.xml</exclude>
      </excludes>
    </fileSet>
    <fileSet>
      <directory>../interpreter</directory>
    </fileSet>
    <fileSet>
      <directory>../notebook</directory>
    </fileSet>
    <fileSet>
      <directory>../plugins</directory>
    </fileSet>
    <fileSet>
      <directory>../k8s</directory>
    </fileSet>
    <fileSet>
      <directory>../scripts</directory>
    </fileSet>
    <fileSet>
      <outputDirectory>/lib/node_modules/zeppelin-vis</outputDirectory>
      <directory>../zeppelin-web/src/app/visualization</directory>
    </fileSet>
    <fileSet>
      <outputDirectory>/lib/node_modules/zeppelin-tabledata</outputDirectory>
      <directory>../zeppelin-web/src/app/tabledata</directory>
    </fileSet>
    <fileSet>
      <outputDirectory>/lib/node_modules/zeppelin-spell</outputDirectory>
      <directory>../zeppelin-web/src/app/spell</directory>
    </fileSet>
  </fileSets>
</assembly>
