<!--This script builds a zip for Teiid Server Installation -->
<assembly>

	<id>wildfly-dist</id>

	<formats>
		<format>zip</format>
		<format>dir</format>
	</formats>

	<includeBaseDirectory>false</includeBaseDirectory>
	<baseDirectory>teiid-${project.version}</baseDirectory>

	<fileSets>

		<fileSet>
			<directory>kits/wildfly/modules</directory>
			<outputDirectory>${wildfly-module-root}</outputDirectory>
			<filtered>true</filtered>
			<includes>
				<include>**/*</include>
			</includes>
		</fileSet>

        <fileSet>
            <directory>kits/wildfly/standalone</directory>
            <outputDirectory>standalone</outputDirectory>
            <filtered>true</filtered>
            <includes>
                <include>**/*</include>
            </includes>
        </fileSet>
        
        <fileSet>
            <directory>kits/wildfly/bin</directory>
            <outputDirectory>bin</outputDirectory>
            <filtered>true</filtered>
            <includes>
                <include>**/*</include>
            </includes>
        </fileSet>
                
		<fileSet>
			<directory>src/main/resources/schema</directory>
			<includes>
				<include>jboss-teiid.xsd</include>
			</includes>
			<outputDirectory>docs/schema</outputDirectory>
		</fileSet>
		
		<fileSet>
            <directory>kits/wildfly/docs/teiid</directory>
            <outputDirectory>docs/teiid</outputDirectory>
        </fileSet>
		
        <fileSet>
            <directory>kits/wildfly</directory>
            <includes>
                <include>layers.conf</include>
            </includes>
            <outputDirectory>modules</outputDirectory>
        </fileSet>		

	</fileSets>

	<!-- these have external dependent clients like connectors -->
	<dependencySets>
		<dependencySet>
			<outputDirectory>${wildfly-module-root}/org/jboss/teiid/common-core/main</outputDirectory>
			<includes>
				<include>org.jboss.teiid:teiid-common-core</include>
			</includes>
			<useProjectArtifact>false</useProjectArtifact>
			<unpack>false</unpack>
			<useTransitiveDependencies>false</useTransitiveDependencies>
		</dependencySet>
	
		<dependencySet>
			<outputDirectory>${wildfly-module-root}/org/jboss/teiid/api/main</outputDirectory>
			<includes>
				<include>org.jboss.teiid:teiid-api</include>
			</includes>
			<useProjectArtifact>false</useProjectArtifact>
			<unpack>false</unpack>
			<useTransitiveDependencies>false</useTransitiveDependencies>
		</dependencySet>
	
		<dependencySet>
			<outputDirectory>${wildfly-module-root}/org/jboss/teiid/client/main</outputDirectory>
			<includes>
				<include>org.jboss.teiid:teiid-client</include>
			</includes>
			<useProjectArtifact>false</useProjectArtifact>
			<unpack>false</unpack>
			<useTransitiveDependencies>false</useTransitiveDependencies>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>net.sf.saxon:Saxon-HE</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/net/sf/saxon/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>nux:nux</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/nux/nux/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>org.wololo:jts2geojson</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/org/wololo/jts2geojson/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>org.osgeo:proj4j</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/org/osgeo/proj4j/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>com.vividsolutions:jts</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/com/vividsolutions/jts/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<useTransitiveDependencies>true</useTransitiveDependencies>
			<includes>
				<include>io.swagger:swagger-jaxrs</include>
				<include>io.swagger:swagger-core</include>
				<include>io.swagger:swagger-models</include>
				<include>io.swagger:swagger-annotations</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/io/swagger/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>com.fasterxml.jackson.dataformat:jackson-dataformat-yaml</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/com/fasterxml/jackson/dataformat/yaml/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>com.fasterxml.jackson.dataformat:jackson-dataformat-xml</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/com/fasterxml/jackson/dataformat/xml/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>com.fasterxml.jackson.datatype:jackson-datatype-joda</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/com/fasterxml/jackson/datatype/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>com.google.code.findbugs:annotations</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/com/google/code/findbugs/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
		<dependencySet>
			<includes>
				<include>org.reflections:reflections</include>
			</includes>
			<outputDirectory>${wildfly-module-root}/org/reflections/main</outputDirectory>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>


		<!-- These are Teiid internal dependencies; to make JCA work -->
		<dependencySet>
		    <outputDirectory>${wildfly-module-root}/org/jboss/teiid/main</outputDirectory>
			<includes>
				<include>org.jboss.teiid:teiid-jboss-integration</include>
				<include>org.jboss.teiid:teiid-metadata</include>
				<include>org.jboss.teiid:teiid-runtime</include>
				<include>org.jboss.teiid:teiid-engine</include>
			</includes>
            <useProjectArtifact>true</useProjectArtifact>
		</dependencySet>

		<!-- This is separated out so that we can avoid dragging in transitive 
			dependencies, using pom build the adminshell correctly -->
		<dependencySet>
		   <outputDirectory>${wildfly-module-root}/org/jboss/teiid/admin/main</outputDirectory>
			<includes>
				<include>org.jboss.teiid:teiid-admin</include>
			</includes>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>

		<dependencySet>
		    <outputDirectory>${wildfly-module-root}/org/jboss/teiid/main</outputDirectory>
			<includes>
				<include>org.jboss.teiid:teiid-jboss-admin</include>
			</includes>
			<useProjectArtifact>false</useProjectArtifact>
		</dependencySet>
	</dependencySets>
</assembly>
