<!--This script builds a zip for Teiid Server Installation -->
<assembly>
  
  <id>embedded-dist</id>
  
  <formats>
    <format>zip</format>
  </formats>
  
  <includeBaseDirectory>false</includeBaseDirectory>
  <baseDirectory>teiid-${project.version}</baseDirectory>

  <fileSets>
    <fileSet>
        <directory>target/kits/embedded</directory>
        <outputDirectory>/</outputDirectory>      
        <includes>
          <include>**/*.sh</include>
        </includes>   
        <fileMode>755</fileMode>  
    </fileSet> 
          
    <fileSet>
        <directory>target/kits/embedded</directory>
        <outputDirectory>/</outputDirectory>      
        <excludes>
          <exclude>**/*.sh</exclude>
        </excludes>      
    </fileSet>
  </fileSets>

  <dependencySets>
     <dependencySet>
        <includes>
          <include>org.slf4j:slf4j-api:jar</include>
        </includes>
        <outputDirectory>optional</outputDirectory>
        <unpack>false</unpack>
        <useTransitiveDependencies>true</useTransitiveDependencies>
        <scope>provided</scope>
     </dependencySet>
      <dependencySet>
        <includes>
          <include>com.h2database:h2:jar</include>
        </includes>
        <outputDirectory>optional/jdbc/h2</outputDirectory>
        <unpack>false</unpack>
        <useTransitiveDependencies>false</useTransitiveDependencies>
        <scope>provided</scope>
      </dependencySet>
      <dependencySet>
          <includes>
             <include>org.jboss.narayana.jta:narayana-jta:jar</include>
          </includes>
          <outputDirectory>lib</outputDirectory>
          <unpack>false</unpack>
          <useTransitiveDependencies>false</useTransitiveDependencies>
          <scope>provided</scope>
      </dependencySet>
      <dependencySet>
          <includes>
              <include>org.jboss.ironjacamar:ironjacamar-jdbc:jar</include>
              <include>org.jboss.ironjacamar:ironjacamar-core-api:jar</include>
              <include>org.jboss.ironjacamar:ironjacamar-core-impl:jar</include>
              <include>org.jboss.ironjacamar:ironjacamar-common-api:jar</include>
              <include>org.jboss.ironjacamar:ironjacamar-common-impl:jar</include>
              <include>org.jboss.ironjacamar:ironjacamar-common-spi:jar</include>
              <include>org.jboss.ironjacamar:ironjacamar-spec-api:jar</include>
              <include>org.jboss:jboss-transaction-spi:jar</include>
          </includes>
          <outputDirectory>optional/jdbc/tm</outputDirectory>
          <unpack>false</unpack>
          <scope>provided</scope>
       </dependencySet>
   </dependencySets>
  
  <moduleSets>
    
    <moduleSet>
      <useAllReactorProjects>true</useAllReactorProjects>
      <includes>
        <include>org.jboss.teiid:teiid-admin</include>
      </includes>
      <binaries>
        <includeDependencies>false</includeDependencies>
        <unpack>false</unpack>
        <outputDirectory>lib</outputDirectory>
      </binaries>
    </moduleSet>    
            
    <!-- These are Teiid internal dependencies; to make JCA work -->
    <moduleSet>
        <includeSubModules>true</includeSubModules>
        <useAllReactorProjects>true</useAllReactorProjects>

        <includes>
            <include>org.jboss.teiid:teiid-runtime</include>            
        </includes>

        <binaries>
            <includeDependencies>true</includeDependencies>
            <unpack>false</unpack>
            <dependencySets>
                <dependencySet>
                    <excludes>
                        <exclude>io.netty:netty</exclude>
                    </excludes>
                    <useProjectArtifact>true</useProjectArtifact>
                    <unpack>false</unpack>
                    <useTransitiveDependencies>true</useTransitiveDependencies>
                </dependencySet>
                <dependencySet>
                    <outputDirectory>optional</outputDirectory>
                    <includes>
                        <include>io.netty:netty</include>
                    </includes>
                    <useProjectArtifact>false</useProjectArtifact>
                    <unpack>false</unpack>
                    <useTransitiveDependencies>true</useTransitiveDependencies>
                </dependencySet>
            </dependencySets>
            <outputDirectory>lib</outputDirectory>
        </binaries>
    </moduleSet>
   
    <!-- **************************************************************************
                        These are built in translators  
         **************************************************************************-->
    <!-- ******************************************************** 
        These are built in resource-adapters  
        *********************************************************-->
    <moduleSet>
        <useAllReactorProjects>true</useAllReactorProjects>
        
        <includes>
            <include>org.jboss.teiid.connectors:connector-*</include>
        </includes>
        
        <excludes>
            <exclude>org.jboss.teiid.connectors:connector-salesforce-34</exclude>
        </excludes>
                
        <binaries> 
          <includeDependencies>false</includeDependencies>
          <unpack>true</unpack>
          <outputDirectory>.</outputDirectory>
          <attachmentClassifier>embedded-dist</attachmentClassifier>
        </binaries>
      
    </moduleSet>
    
    
    <!-- **************************************************************************
                        These are built in translators  
         **************************************************************************-->
    <moduleSet>
        <useAllReactorProjects>true</useAllReactorProjects>
        
        <includes>
            <include>org.jboss.teiid.connectors:translator-*</include>
        </includes>
        
        <excludes>
            <exclude>org.jboss.teiid.connectors:translator-salesforce-34</exclude>
        </excludes>
                
        <binaries> 
          <includeDependencies>false</includeDependencies>
          <unpack>true</unpack>
          <outputDirectory>.</outputDirectory>
          <attachmentClassifier>embedded-dist</attachmentClassifier>
        </binaries>
      
    </moduleSet>
    
    </moduleSets>  
</assembly>
