Index: /branches/rk-oran/wirk2/ant-scripts/compile.xml
===================================================================
--- /branches/rk-oran/wirk2/ant-scripts/compile.xml	(revision 18922)
+++ /branches/rk-oran/wirk2/ant-scripts/compile.xml	(revision 18923)
@@ -4,10 +4,23 @@
 	<target name="compile">
 		<antcall target="checkout-gsdl-gli" />
+		<antcall target="drop-in-docs"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
 		<antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/compiled"/></antcall>
+		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/compiled/gli"/></antcall>
+
 		<antcall target="unzip-packages" />
 		<antcall target="get-winbin" />
 		<antcall target="insert-windows-perl"><param name="gsdl.basedir" value="compiled"/></antcall>
 		<antcall target="compile-c-code" />
-		<antcall target="compile-uninstaller" /> <!-- from rk2-targets -->
+
+		<!-- gli -->
+		<antcall target="compile-gli">
+			<param name="script.format" value="bat"/>
+			<param name="glibasedir"  value="${basedir}/compiled/gli"/>
+			<param name="gsdlbasedir" value="${basedir}/compiled"/>
+		</antcall>
+
+		<!-- uninstaller -->
+		<antcall target="compile-uninstaller" /> <!-- from init -->
+
 		<antcall target="build-demo-collection" />
 	</target>
Index: /branches/rk-oran/wirk2/ant-scripts/create-distribution.xml
===================================================================
--- /branches/rk-oran/wirk2/ant-scripts/create-distribution.xml	(revision 18922)
+++ /branches/rk-oran/wirk2/ant-scripts/create-distribution.xml	(revision 18923)
@@ -4,16 +4,12 @@
 	<target name="create-distribution">
 
-		<antcall target="export-gsdl-gli"><param name="dest" value="distributions/web"/></antcall>
-		<antcall target="drop-in-docs"><param name="gsdl.basedir" value="distributions/web"/></antcall>
-		<antcall target="gsdl-set-version-numbers"><param name="gsdl.basedir" value="${basedir}/distributions/web"/></antcall>
-		<antcall target="gli-set-version-numbers"><param name="glibasedir" value="${basedir}/distributions/web/gli"/></antcall>
+		<antcall target="copy-compiled-to-dist"/> <!-- from init -->
+		<antcall target="dist-clean-sourcecode"/> <!-- from rk2-targets -->
+		
 		<antcall target="insert-uninstaller"><param name="script-format" value="bat"/></antcall> <!-- from rk2-targets -->
 		<antcall target="dist-unzip-packages"/>
-		<antcall target="drop-in-binaries" />
-		<antcall target="drop-in-demo-collection" />
-		<!--Don't need because server.exe takes care of the gsdlhome path now-->
-		<!--<antcall target="drop-in-misc" />-->
-		<antcall target="compile-gli" />
+		
 		<antcall target="remove-unneeded-files" />
+		<antcall target="strip-svn-dirs"><param name="dir" value="${basedir}/distributions/web"/></antcall>
 		<antcall target="create-needed-empty-files"><param name="gsdl.basedir" value="distributions/web"/></antcall>
 
@@ -22,47 +18,6 @@
 	</target>
 
-	<target name="drop-in-binaries">
-		<echo level="info">Dropping compiled binaries into distribution</echo>
-		<delete dir="${basedir}/distributions/web/bin/windows" />
-		<copy todir="${basedir}/distributions/web/bin/windows">
-			<fileset dir="${basedir}/compiled/bin/windows" includes="**/*"/>
-		</copy>
-		<copy todir="distributions/web" file="compiled/bin/windows/server.exe"/>
-		<copy todir="distributions/web/cgi-bin/library" file="compiled/cgi-bin/library.cgi"/>
-		<copy todir="distributions/web/cgi-bin/oaiserver" file="compiled/cgi-bin/oaiserver.cgi"/>
-		
-		<echo level="info">Dropping LuceneWrapper.jar in place</echo>
-		<copy file="${basedir}/compiled/bin/java/LuceneWrapper.jar" todir="${basedir}/distributions/web/bin/java" />
-	</target>
-
-	<target name="drop-in-demo-collection">
-		<echo level="info">Dropping rebuilt demo collection into distribution</echo>
-		<delete dir="${basedir}/distributions/web/collect/demo" />
-		<copy todir="${basedir}/distributions/web/collect/demo">
-			<fileset dir="${basedir}/compiled/collect/demo" includes="**/*"/>
-		</copy>
-	</target>
-
-	<target name="drop-in-misc">
-		<echo level="info">Putting the default llssite.cfg at the root of the distribution</echo>
-		<copy todir="${basedir}/distributions/web" file="${wirk2.home}/resources/llssite.cfg" overwrite="true"/>
-	</target>
-	
-	<target name="compile-gli">
-		<echo>Compiling gli...</echo>
-		<exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makegli.bat"/>
-		
-		<echo>Creating jar...</echo>
-		<exec dir="${basedir}/distributions/web/gli" executable="${basedir}/distributions/web/gli/makejar.bat"/>
-		
-		<echo>Cleaning up intermediate files...</echo>
-		<delete dir="${basedir}/distributions/web/gli/jar"/>
-		<delete dir="${basedir}/distributions/web/gli/classes/org"/>
-		
-		<echo>Putting gli server jar in a better place</echo>
-		<move file="${basedir}/distributions/web/gli/GLIServer.jar" todir="${basedir}/distributions/web/bin/java" />
-	</target>
-
 	<target name="remove-unneeded-files">
+		<delete dir="distributions/web/uninstaller"/>
 		<delete file="${basedir}/distributions/web/gli/.greenstonestore" />
 		<delete dir="${basedir}/distributions/web/bin/linux" />
