<!--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>
  
  <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>
                
        <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>
                
        <binaries> 
          <includeDependencies>false</includeDependencies>
          <unpack>true</unpack>
          <outputDirectory>.</outputDirectory>
          <attachmentClassifier>embedded-dist</attachmentClassifier>
        </binaries>
      
    </moduleSet>
    
    </moduleSets>  
</assembly>
