Index: /greenstone3/trunk/build.xml
===================================================================
--- /greenstone3/trunk/build.xml	(revision 19974)
+++ /greenstone3/trunk/build.xml	(revision 19975)
@@ -73,5 +73,5 @@
 
   <!-- get the fileset defining what is sourcecode -->
-  <import file="resources/xml/source-fileset.xml"/>
+  <import file="resources/xml/components.xml"/>
     
   <!-- version properties for external packages -->
@@ -1645,5 +1645,9 @@
 
   <target name="remove-source">
-    <delete includeEmptyDirs="true"><fileset dir="." defaultexcludes="false"><patternset refid="greenstone3.source.fileset"/></fileset></delete>
+    <delete includeEmptyDirs="true">
+      <fileset dir="." defaultexcludes="false">
+        <patternset refid="greenstone3.source.component"/>
+     </fileset>
+    </delete>
   </target>
 
Index: /greenstone3/trunk/resources/xml/components.xml
===================================================================
--- /greenstone3/trunk/resources/xml/components.xml	(revision 19975)
+++ /greenstone3/trunk/resources/xml/components.xml	(revision 19975)
@@ -0,0 +1,65 @@
+<!-- an ant project containing authoritative definitions of the components of greenstone3 -->
+<project name="components">
+
+	<!-- source component - files that get compiled and could be safely removed from a binary distribution -->
+	<patternset id="greenstone3.source.component">
+		<include name="src"/>
+		<include name="src/**/*"/>
+		<include name="gs2build/common-src"/>
+		<include name="gs2build/common-src/**/*"/>
+		<include name="gs2build/build-src"/>
+		<include name="gs2build/build-src/**/*"/>
+		<include name="gs2build/runtime-src"/>
+		<include name="gs2build/runtime-src/**/*"/>
+		<include name="gs2build/aclocal.m4"/>
+		<include name="gs2build/config.guess"/>
+		<include name="gs2build/config.h.in"/>
+		<include name="gs2build/config.sub"/>
+		<include name="gs2build/configure"/>
+		<include name="gs2build/configure.in"/>
+		<include name="gs2build/install-sh"/>
+		<include name="gs2build/Makefile.in"/>
+		<include name="gs2build/setup.bash"/>
+		<include name="gs2build/setup.bat"/>
+		<include name="gs2build/setup.csh"/>
+		<include name="gs2build/win32.mak"/>
+		<include name="gs2build/win32cfg.h"/>
+	</patternset>
+
+	<!-- imagemagick -->
+	<patternset id="greenstone3.imagemagick.component">
+		<include name="gs2build/bin/**/imagemagick"/>
+                <include name="gs2build/bin/**/imagemagick/**/*"/>
+	</patternset>
+
+        <!-- ghostscript -->
+        <patternset id="greenstone3.ghostscript.component">
+                <include name="gs2build/bin/**/ghostscript"/>
+                <include name="gs2build/bin/**/ghostscript/**/*"/>
+        </patternset>
+
+        <!-- ant -->
+        <patternset id="greenstone3.ant.component">
+                <include name="packages/ant"/>
+                <include name="packages/ant/**/*"/>
+        </patternset>
+
+        <!-- tomcat -->
+        <patternset id="greenstone3.tomcat.component">
+                <include name="packages/tomcat"/>
+                <include name="packages/tomcat/**/*"/>
+        </patternset>
+
+        <!-- all components - invert this set to get the core component -->
+        <patternset id="greenstone3.all.component">
+		<invert>
+			<patternset refid="greenstone3.source.component"/>
+			<patternset refid="greenstone3.imagemagick.component"/>
+			<patternset refid="greenstone3.ghostscript.component"/>
+			<patternset refid="greenstone3.ant.component"/>
+			<patternset refid="greenstone3.tomcat.component"/>
+		</invert>
+        </patternset>
+
+</project>
+
Index: eenstone3/trunk/resources/xml/source-fileset.xml
===================================================================
--- /greenstone3/trunk/resources/xml/source-fileset.xml	(revision 19974)
+++ 	(revision )
@@ -1,27 +1,0 @@
-<project name="source-fileset">
-	<!-- the authoritative fileset representing the source files of a greenstone3 installation -->
-	<patternset id="greenstone3.source.fileset">
-		<include name="src"/>
-		<include name="src/**/*"/>
-		<include name="gs2build/common-src"/>
-		<include name="gs2build/common-src/**/*"/>
-		<include name="gs2build/build-src"/>
-		<include name="gs2build/build-src/**/*"/>
-		<include name="gs2build/runtime-src"/>
-		<include name="gs2build/runtime-src/**/*"/>
-		<include name="gs2build/aclocal.m4"/>
-		<include name="gs2build/config.guess"/>
-		<include name="gs2build/config.h.in"/>
-		<include name="gs2build/config.sub"/>
-		<include name="gs2build/configure"/>
-		<include name="gs2build/configure.in"/>
-		<include name="gs2build/install-sh"/>
-		<include name="gs2build/Makefile.in"/>
-		<include name="gs2build/setup.bash"/>
-		<include name="gs2build/setup.bat"/>
-		<include name="gs2build/setup.csh"/>
-		<include name="gs2build/win32.mak"/>
-		<include name="gs2build/win32cfg.h"/>
-	</patternset>
-</project>
-
