<!--This script builds a zip for ModeShape server Installation -->
<assembly>
	<id>jboss-wf8-dist</id>
	<formats>
		<format>zip</format>
	</formats>
	<includeBaseDirectory>false</includeBaseDirectory>
	<baseDirectory>/</baseDirectory>

	<fileSets>
		<!-- The modules part of the kit -->
		<fileSet>
			<directory>../deploy/jbossas/kit/jboss-wf8</directory>
			<outputDirectory>${jboss.kit.modules.location}</outputDirectory>
            <excludes>
                <exclude>standalone/**</exclude>
                <exclude>domain/**</exclude>
            </excludes>
            <filtered>true</filtered>
		</fileSet>

		<!-- The configuration part -->
		<fileSet>
			<directory>../deploy/jbossas/kit/jboss-wf8</directory>
			<outputDirectory>/</outputDirectory>
            <includes>
                <include>standalone/**</include>
                <include>domain/**</include>
            </includes>
            <filtered>true</filtered>
		</fileSet>

		<!-- ModeShape subsystem XSD(s) -->
		<fileSet>
			<directory>../deploy/jbossas/modeshape-jbossas-subsystem/src/main/resources/schema/</directory>
			<includes>
				<include>modeshape_*.xsd</include>
			</includes>
			<outputDirectory>docs/schema</outputDirectory>
		</fileSet>
    </fileSets>

    <files>
        <!-- Deployment for the ModeShape RESTful service WAR -->
        <file>
            <source>
                ../deploy/jbossas/modeshape-jbossas-web-rest-war/target/modeshape-jbossas-web-rest-war-${project.version}.war
            </source>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/main/deployments</outputDirectory>
            <destName>modeshape-rest.war</destName>
        </file>

        <!-- Deployment for the ModeShape WebDAV service WAR -->
        <file>
            <source>
                ../deploy/jbossas/modeshape-jbossas-web-webdav-war/target/modeshape-jbossas-web-webdav-war-${project.version}.war
            </source>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/main/deployments</outputDirectory>
            <destName>modeshape-webdav.war</destName>
        </file>

        <!-- Deployment for the ModeShape CMIS service WAR -->
        <file>
            <source>../deploy/jbossas/modeshape-jbossas-cmis-war/target/modeshape-jbossas-cmis-war-${project.version}.war
            </source>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/main/deployments</outputDirectory>
            <destName>modeshape-cmis.war</destName>
        </file>

        <!-- Deployment for the ModeShape Explorer -->
        <file>
            <source>../deploy/jbossas/modeshape-jbossas-explorer-war/target/modeshape-jbossas-explorer-war-${project.version}.war
            </source>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/main/deployments</outputDirectory>
            <destName>modeshape-explorer.war</destName>
        </file>
    </files>

    <dependencySets>
        <!--Hibernate Search's EAP kit -->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}</outputDirectory>
            <includes>
                <include>org.hibernate:hibernate-search-modules</include>
            </includes>
            <unpack>true</unpack>
        </dependencySet>

		<!-- Module for the standard JCR API -->
		<dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/javax/jcr/main</outputDirectory>
			<includes>
				<include>javax.jcr:jcr</include>
			</includes>
			<unpack>false</unpack>
		</dependencySet>

		<!-- Module for the ModeShape API (extension of the JCR API) -->
		<dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/jcr/api/main</outputDirectory>
			<includes>
				<include>org.modeshape:modeshape-jcr-api:jar</include>
			</includes>
			<unpack>false</unpack>
		</dependencySet>

        <!--Commons module-->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/common/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-common:jar</include>
            </includes>
            <unpack>false</unpack>
        </dependencySet>

        <!-- Module for the ModeShape engine (and dependencies) -->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-jcr:jar</include>
                <include>org.modeshape:modeshape-jbossas-subsystem:jar</include>
                <include>org.modeshape:modeshape-schematic:jar</include>
            </includes>
            <unpack>false</unpack>
        </dependencySet>

        <!-- Module for Tika (self-contained) -->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/apache/tika/${tika.version}</outputDirectory>
            <includes>
                <include>org.apache.tika:*:jar</include>
                <include>org.apache.commons:commons-compress:jar</include>
                <include>org.tukaani:*:jar</include>
                <include>org.apache.james:apache-mime4j-core:jar</include>
                <include>org.apache.james:apache-mime4j-dom:jar</include>
                <include>org.apache.pdfbox:*:jar</include>
                <include>org.apache.poi:*:jar</include>
                <include>org.apache.xmlbeans:*:jar</include>
                <include>org.apache.geronimo.specs:*:jar</include>
                <include>dom4j:dom4j:jar</include>
                <include>asm:asm:jar</include>
                <include>commons-codec:commons-codec:jar</include>
                <include>commons-logging:commons-logging:jar</include>
                <include>com.googlecode.juniversalchardet:juniversalchardet:jar</include>
                <include>javassist:javassist:jar</include>
                <include>org.ccil.cowan.tagsoup:*:jar</include>
                <include>org.gagravarr:*:jar</include>
                <include>com.googlecode.mp4parser:*:jar</include>
                <!-- 
                The following are not currently included by default; see ModeShape's parent POM
                <include>org.bouncycastle:*:jar</include>
                -->
            </includes>
        </dependencySet>

        <!-- Module for MapDB (self-contained) -->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/mapdb/${mapdb.version}</outputDirectory>
            <includes>
                <include>org.mapdb:*:jar</include>
            </includes>
        </dependencySet>

        <!--Connectors-->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/connector/git/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-connector-git:jar</include>
                <include>org.eclipse.jgit:org.eclipse.jgit:jar</include>
                <include>com.jcraft:jsch:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/connector/jdbc/metadata/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-connector-jdbc-metadata:jar</include>
                <include>c3p0:c3p0:jar</include>
            </includes>
        </dependencySet>

        <!--Sequencers-->
        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/ddl/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-ddl:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/image/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-images:jar</include>
                <include>com.drewnoakes:metadata-extractor:jar</include>
                <include>com.adobe.xmp:xmpcore:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/java/main</outputDirectory>
            <useTransitiveDependencies>true</useTransitiveDependencies>
            <includes>
                <include>org.modeshape:modeshape-sequencer-java:jar</include>
                <include>javassist:javassist:jar</include>
                <include>org.eclipse*:common:jar:${eclipse.equinox.common.version}</include>
                <include>org.eclipse*:core:jar:${eclipse.jdt.core.version}</include>
                <include>org.eclipse*:resources:jar:${eclipse.core.resources.version}</include>
                <include>org.eclipse*:expressions:jar:${eclipse.core.expressions.version}</include>
                <include>org.eclipse*:preferences:jar:${eclipse.equinox.preferences.version}</include>
                <include>org.eclipse*:runtime:jar:${eclipse.core.runtime.version}</include>
                <include>org.eclipse*:osgi:jar:${eclipse.osgi.version}</include>
                <include>org.eclipse*:jobs:jar:${eclipse.core.jobs.version}</include>
                <include>org.eclipse*:registry:jar:${eclipse.equinox.registry.version}</include>
                <include>org.eclipse*:contenttype:jar:${eclipse.core.contenttype.version}</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/mp3/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-mp3:jar</include>
                <include>org:jaudiotagger:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/msoffice/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-msoffice:jar</include>
                <include>org.apache*:poi:jar</include>
                <include>org.apache*:poi-scratchpad:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/sramp/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-sramp:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/teiid/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-teiid:jar</include>
                <include>com.beust:jcommander:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/text/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-text:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/wsdl/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-wsdl:jar</include>
                <include>wsdl4j:wsdl4j:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/xml/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-xml:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/xsd/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-xsd:jar</include>
                <include>org.eclipse*:xsd:jar:${eclipse.xsd.version}</include>
                <include>org.eclipse*:common:jar:${eclipse.emf.common.version}</include>
                <include>org.eclipse*:ecore:jar:${eclipse.emf.ecore.version}</include>
                <include>org.eclipse*:ecore-change:jar:${eclipse.emf.ecorechange.version}</include>
                <include>org.eclipse*:ecore-xmi:jar:${eclipse.emf.ecorexmi.version}</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/sequencer/zip/main</outputDirectory>
            <includes>
                <include>org.modeshape:modeshape-sequencer-zip:jar</include>
            </includes>
        </dependencySet>

        <dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/extractor/tika/main</outputDirectory>
            <useTransitiveDependencies>true</useTransitiveDependencies>
            <includes>
                <include>org.modeshape:modeshape-extractor-tika:jar</include>
            </includes>
        </dependencySet>

		<!-- Module for the ModeShape JDBC driver -->
		<dependencySet>
            <useProjectArtifact>false</useProjectArtifact>
            <outputDirectory>${jboss.kit.modules.location}/org/modeshape/jdbc/main</outputDirectory>
			<includes>
				<include>org.modeshape:modeshape-jdbc-local:jar</include>
			</includes>
			<unpack>false</unpack>
		</dependencySet>
    </dependencySets>
</assembly>
