Index: /release-kits/mark2/ant-scripts/create-components.xml
===================================================================
--- /release-kits/mark2/ant-scripts/create-components.xml	(revision 17423)
+++ /release-kits/mark2/ant-scripts/create-components.xml	(revision 17423)
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="mark2-create-components" default="create-components">
+
+	<!-- create components from the distribution folder -->
+	<target name="create-components">
+		<antcall target="prepare-to-create-components" />
+		<antcall target="create-core-component" />
+		<antcall target="create-sourcecode-component" />
+	</target>
+	
+	<target name="prepare-to-create-components">
+		<delete dir="components"/>
+		<mkdir dir="components/tmp"/>
+	</target>
+
+	<target name="create-core-component">
+		<antcall target="prepare-core-component" />
+		<antcall target="compress-core-component" />
+	</target>
+
+	<target name="create-sourcecode-component">
+		<antcall target="prepare-sourcecode-component" />
+		<antcall target="compress-sourcecode-component" />	
+	</target>
+	
+	<target name="prepare-core-component">
+		<mkdir dir="components/tmp/core"/>
+		<copy todir="components/tmp/core" overwrite="true">
+			<fileset dir="distributions/web">
+				<include name="**/*"/>
+
+				<!-- sourcecode -->
+				<exclude name="common-src/**/*"/>
+				<exclude name="runtime-src/**/*"/>
+				<exclude name="build-src/**/*"/>
+
+			</fileset>
+		</copy>
+		<zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" includes="**/*"/>
+	</target>
+	
+	<target name="compress-core-component">
+		<sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
+	</target>
+	
+	<target name="prepare-sourcecode-component">
+		<mkdir dir="components/tmp/sourcecode"/>
+		<copy todir="components/tmp/sourcecode" overwrite="true">
+			<fileset dir="distributions/web">
+				<include name="common-src/**/*"/>
+				<include name="runtime-src/**/*"/>
+				<include name="build-src/**/*"/>
+			</fileset>
+		</copy>
+				
+		<zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" includes="**/*"/>
+	</target>
+		
+	<target name="compress-sourcecode-component">
+		<sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
+	</target>
+	
+</project>
Index: /release-kits/mark3/ant-scripts/create-components.xml
===================================================================
--- /release-kits/mark3/ant-scripts/create-components.xml	(revision 17423)
+++ /release-kits/mark3/ant-scripts/create-components.xml	(revision 17423)
@@ -0,0 +1,123 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<project name="mark3-create-components" default="create-components">
+
+	<!-- create components from the distribution folder -->
+	<target name="create-components">
+		<antcall target="prepare-to-create-components" />
+		<antcall target="create-core-component" />
+		<antcall target="create-sourcecode-component" />
+		<antcall target="create-ant-component" />
+		<antcall target="create-tomcat-component" />
+	</target>
+
+	<target name="prepare-to-create-components">
+		<delete dir="components"/>
+		<mkdir dir="components/tmp"/>
+	</target>
+		
+	<target name="create-core-component">
+		<antcall target="prepare-core-component" />
+		<antcall target="compress-core-component" />
+	</target>
+
+	<target name="create-sourcecode-component">
+		<antcall target="prepare-sourcecode-component" />
+		<antcall target="compress-sourcecode-component" />	
+	</target>
+		
+	<target name="create-ant-component">
+		<antcall target="prepare-ant-component" />
+		<antcall target="compress-ant-component" />	
+	</target>
+		
+	<target name="create-tomcat-component">
+		<antcall target="prepare-tomcat-component" />
+		<antcall target="compress-tomcat-component" />	
+	</target>
+	
+	<target name="prepare-core-component">
+
+		<mkdir dir="components/tmp/core"/>
+				
+		<copy todir="components/tmp/core" overwrite="true">
+			<fileset dir="distribution/greenstone3">
+				<include name="**/*"/>
+
+				<!-- exclude sourcecode -->
+				<include name="src/**/*"/>
+				<exclude name="gs2build/common-src/**/*"/>
+				<exclude name="gs2build/build-src/**/*"/>
+				<exclude name="gs2build/runtime-src/**/*"/>
+				
+				<!-- exclude ant -->
+				<exclude name="packages/ant/**/*"/>
+
+				<!-- exclude tomcat -->
+				<exclude name="packages/tomcat/**/*"/>
+
+			</fileset>
+		</copy>
+		
+		<!-- do some cleanup -->
+		<delete dir="components/tmp/core/gs2build/common-src"/>
+		<delete dir="components/tmp/core/gs2build/build-src"/>
+		<delete dir="components/tmp/core/gs2build/runtime-src"/>
+		<delete dir="components/tmp/core/gs2build/bin/windows/imagemagick"/>
+		<delete dir="components/tmp/core/gs2build/bin/windows/ghostscript"/>
+				
+		<zip destfile="components/core.comp" basedir="components/tmp/core" compress="false" />
+	</target>
+	
+	<target name="compress-core-component">
+		<sevenzip task="encode" input="components/core.comp" output="components/core.lzma" dictionnary="26"/>
+	</target>
+	
+	<target name="prepare-sourcecode-component">
+		<mkdir dir="components/tmp/sourcecode"/>
+		<copy todir="components/tmp/sourcecode" overwrite="true">
+				<fileset dir="distribution/greenstone3">
+					<include name="src/**/*"/>
+					<include name="gs2build/common-src/**/*"/>
+					<include name="gs2build/build-src/**/*"/>
+					<include name="gs2build/runtime-src/**/*"/>
+				</fileset>
+		</copy>
+				
+		<zip destfile="components/sourcecode.comp" basedir="components/tmp/sourcecode" compress="false" />
+	</target>
+		
+	<target name="compress-sourcecode-component">
+		<sevenzip task="encode" input="components/sourcecode.comp" output="components/sourcecode.lzma" dictionnary="26"/>
+	</target>
+	
+	<target name="prepare-ant-component">
+		<mkdir dir="components/tmp/ant"/>
+		<copy todir="components/tmp/ant" overwrite="true">
+			<fileset dir="distribution/greenstone3/packages">
+				<include name="ant/**/*"/>
+			</fileset>
+		</copy>
+		
+		<zip destfile="components/ant.comp" basedir="components/tmp/ant" compress="false" />
+	</target>
+		
+	<target name="compress-ant-component">
+		<sevenzip task="encode" input="components/ant.comp" output="components/ant.lzma" dictionnary="26"/>
+	</target>
+	
+	<target name="prepare-tomcat-component">
+		<mkdir dir="components/tmp/tomcat"/>
+		<copy todir="components/tmp/tomcat" overwrite="true">
+			<fileset dir="distribution/greenstone3/packages">
+				<include name="tomcat/**/*"/>
+			</fileset>
+		</copy>
+		
+		<zip destfile="components/tomcat.comp" basedir="components/tmp/tomcat" compress="false" />
+	</target>
+		
+	<target name="compress-tomcat-component">
+		<sevenzip task="encode" input="components/tomcat.comp" output="components/tomcat.lzma" dictionnary="26"/>
+	</target>	
+	
+</project>
