cleanup for restructuring
diff --git a/releng.wtpbuilder/components/jst-sdk/customTargets.xml b/releng.wtpbuilder/components/jst-sdk/customTargets.xml
index affee8c..b7a6575 100644
--- a/releng.wtpbuilder/components/jst-sdk/customTargets.xml
+++ b/releng.wtpbuilder/components/jst-sdk/customTargets.xml
@@ -15,8 +15,10 @@
     <target name="allElements">
         <echo level="info" message="Target:${target} " />
         <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
         <echo level="debug" message="buildDirectory: ${buildDirectory}" />
         <echo level="debug" message="baseLocation: ${baseLocation}" />
+        <echo level="debug" message="generic target: ${genericTargets}" />
         <ant
             antfile="${genericTargets}"
             target="${target}">
@@ -73,7 +75,7 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
+   <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
         <available
             property="mapsLocal"
             file="${buildDirectory}/maps/${env.RELENG}" />
@@ -97,19 +99,29 @@
             value="HEAD" />
 
 
-        <property
+        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>       
+       <property
             name="cvsPackage"
-            value="${env.RELENG}" />
-        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} " />
-        <echo level="info" message="cvsPackage = ${cvsPackage} " />
-
+            value="${env.RELENGMAPS}" />
+        <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
+        <echo level="debug" message="cvsPackage = ${cvsPackage} " />
         <cvs
             cvsRoot="${mapCvsRoot}"
             package="${cvsPackage}"
             dest="${buildDirectory}/maps"
-            tag="${mapVersionTag}" 
+            tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
-            reallyquiet="${env.CVS_REALLY_QUIET}"/>
+            reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
+        <cvs
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->     
+
         <cvs
             cvsRoot="${mapCvsRoot}"
             package="${env.RELENGJSF}"
@@ -117,6 +129,8 @@
             tag="${releng-jsf-mapVersionTag}" 
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+
+
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
             <param
@@ -124,13 +138,15 @@
                 value="${mapCvsRoot}" />
         </antcall>
 
-        <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
-            in releng-jsf that would be out of date -->
-        <copy todir="${buildDirectory}/maps/${env.RELENG}/maps">
-            <fileset dir="${buildDirectory}/maps/${env.RELENGJSF}/maps">
-                <include name="*.map" />
-            </fileset>
-        </copy>
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->    
 
     </target>
 
@@ -476,4 +492,11 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+  </target>
+
+
 </project>
diff --git a/releng.wtpbuilder/components/jst-sdk/dependency.xml b/releng.wtpbuilder/components/jst-sdk/dependency.xml
index 3bf0f77..e2f5a5e 100644
--- a/releng.wtpbuilder/components/jst-sdk/dependency.xml
+++ b/releng.wtpbuilder/components/jst-sdk/dependency.xml
@@ -25,15 +25,16 @@
 		</antcall>
 
 		<antcall target="getAndInstall">
-			<param name="groupId" value="dtp" />
-		</antcall>
-		<antcall target="getAndInstall">
 			<param name="groupId" value="eclipse" />
 		</antcall>
 		<antcall target="getAndInstall">
 			<param name="groupId" value="eclipseTestFramework" />
 		</antcall>
 
+		<antcall target="getAndInstall">
+			<param name="groupId" value="dtp" />
+		</antcall>
+
 	</target>
 
 
diff --git a/releng.wtpbuilder/components/jst.tests/customTargets.xml b/releng.wtpbuilder/components/jst.tests/customTargets.xml
index f92c3b5..e3c1369 100644
--- a/releng.wtpbuilder/components/jst.tests/customTargets.xml
+++ b/releng.wtpbuilder/components/jst.tests/customTargets.xml
@@ -2,6 +2,8 @@
     name="Build specific targets and properties"
     default="noDefault">
 
+    <property file="build.properties" />
+
     <property environment="env" />
 
     <!-- ===================================================================== -->
@@ -11,6 +13,7 @@
     <target name="allElements">
         <echo level="info"  message="Target:${target} " />
         <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
         <echo level="debug" message="buildDirectory: ${buildDirectory}" />
         <echo level="debug" message="baseLocation: ${baseLocation}" />
         <ant
@@ -71,7 +74,7 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
+    <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
         <available
             property="mapsLocal"
             file="${buildDirectory}/maps/${env.RELENG}" />
@@ -90,26 +93,35 @@
         <property
             name="mapVersionTag"
             value="HEAD" />
+
         <property
             name="releng-jsf-mapVersionTag"
             value="HEAD" />
 
 
-        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>
+        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>       
+       <property
+            name="cvsPackage"
+            value="${env.RELENGMAPS}" />
+        <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
+        <echo level="debug" message="cvsPackage = ${cvsPackage} " />
         <cvs
             cvsRoot="${mapCvsRoot}"
-            package="${env.RELENG}"
+            package="${cvsPackage}"
             dest="${buildDirectory}/maps"
             tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
         <cvs
-            cvsRoot="${mapCvsRoot}"
-            package="${env.RELENGJSF}"
-            dest="${buildDirectory}/maps"
-            tag="${releng-jsf-mapVersionTag}"
-            quiet="${env.CVS_QUIET}"
-            reallyquiet="${env.CVS_REALLY_QUIET}" />
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->  
+
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
             <param
@@ -117,13 +129,16 @@
                 value="${mapCvsRoot}" />
         </antcall>
 
-        <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
-            in releng-jsf that would be out of date -->
-        <copy todir="${buildDirectory}/maps/${env.RELENG}/maps">
-            <fileset dir="${buildDirectory}/maps/${env.RELENGJSF}/maps">
-                <include name="*.map" />
-            </fileset>
-        </copy>
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->          
+        
     </target>
 
     <target
@@ -150,6 +165,9 @@
         <dirname
             file="${ant.file}"
             property="component.dir" />
+        <echo level="debug" message="ant.file: ${ant.file}" />
+        <echo level="debug" message="component.dir: ${component.dir}" />
+
         <ant
             antfile="${component.dir}/dependency.xml"
             target="get">
@@ -220,7 +238,7 @@
 
 
     <!-- ===================================================================== -->
-    <!-- Steps to do to test the build results -->
+    <!-- Steps to test the build results -->
     <!-- ===================================================================== -->
     <target name="test"></target>
 
@@ -277,4 +295,10 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+  </target>
+
 </project>
diff --git a/releng.wtpbuilder/components/jst/customTargets.xml b/releng.wtpbuilder/components/jst/customTargets.xml
index a0b5e2f..471aed6 100644
--- a/releng.wtpbuilder/components/jst/customTargets.xml
+++ b/releng.wtpbuilder/components/jst/customTargets.xml
@@ -3,7 +3,11 @@
     default="noDefault">
 
     <property environment="env" />
-    
+
+    <property
+        name="buildDirectory"
+        value="${buildDirectory}" />
+            
     <!-- ===================================================================== -->
     <!-- Run a given ${target} on all elements being built -->
     <!-- Add on <ant> task for each top level element being built. -->
@@ -11,8 +15,10 @@
     <target name="allElements">
         <echo level="info" message="Target:${target} " />
         <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
         <echo level="debug" message="buildDirectory: ${buildDirectory}" />
         <echo level="debug" message="baseLocation: ${baseLocation}" />
+        <echo level="debug" message="generic target: ${genericTargets}" />
         <ant
             antfile="${genericTargets}"
             target="${target}">
@@ -74,8 +80,8 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
-    	<condition property="mapsLocal">
+   <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
+     	<condition property="mapsLocal">
     	  <and>
     	  	<available file="${buildDirectory}/maps/${env.RELENG}" />
     	  	<available file="${buildDirectory}/maps/${env.RELENGJSF}" />
@@ -101,22 +107,28 @@
             value="HEAD" />
             
             
-            
-        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>
+        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>       
+       <property
+            name="cvsPackage"
+            value="${env.RELENGMAPS}" />
+        <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
+        <echo level="debug" message="cvsPackage = ${cvsPackage} " />
         <cvs
             cvsRoot="${mapCvsRoot}"
-            package="${env.RELENG}"
+            package="${cvsPackage}"
             dest="${buildDirectory}/maps"
-            tag="${mapVersionTag}" 
+            tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
         <cvs
-            cvsRoot="${mapCvsRoot}"
-            package="${env.RELENGJSF}"
-            dest="${buildDirectory}/maps"
-            tag="${releng-jsf-mapVersionTag}" 
-            quiet="${env.CVS_QUIET}"
-            reallyquiet="${env.CVS_REALLY_QUIET}"/>
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->                              	
             
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
@@ -125,13 +137,15 @@
                 value="${mapCvsRoot}" />
         </antcall>
 
-        <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
-            in releng-jsf that would be out of date -->
-        <copy todir="${buildDirectory}/maps/${env.RELENG}/maps">
-            <fileset dir="${buildDirectory}/maps/${env.RELENGJSF}/maps">
-                <include name="*.map" />
-            </fileset>
-        </copy>
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->    
 
 
 
@@ -161,6 +175,9 @@
         <dirname
             file="${ant.file}"
             property="component.dir" />
+        <echo level="debug" message="ant.file: ${ant.file}" />
+        <echo level="debug" message="component.dir: ${component.dir}" />
+
         <ant
             antfile="${component.dir}/dependency.xml"
             target="get">
@@ -328,4 +345,10 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+  </target>
+
 </project>
diff --git a/releng.wtpbuilder/components/jst/dependency.xml b/releng.wtpbuilder/components/jst/dependency.xml
index 42c5730..09e0553 100644
--- a/releng.wtpbuilder/components/jst/dependency.xml
+++ b/releng.wtpbuilder/components/jst/dependency.xml
@@ -17,6 +17,14 @@
 			<param name="groupId" value="orbitthirdpartymap" />
 			<param name="base.install.dir" value="${buildDirectory}/maps/${env.RELENG}/maps/" />
 		</antcall>
+
+
+		<property name="pde.builder.path" value="${env.BUILD_HOME}/builders/${eclipse.builder.version}/${eclipse.builder}" />
+		<echo level="debug" message="pde.builder.path: ${pde.builder.path}" />
+		<echo level="debug" message="eclipse.builder.version: ${eclipse.builder.version}" />
+		<echo level="debug" message="eclipse.builder: ${eclipse.builder}" />
+
+
 		<antcall target="getAndInstall">
 			<param name="groupId" value="emf" />
 		</antcall>
diff --git a/releng.wtpbuilder/components/wst-sdk/customTargets.xml b/releng.wtpbuilder/components/wst-sdk/customTargets.xml
index 13f4b77..f2d5928 100644
--- a/releng.wtpbuilder/components/wst-sdk/customTargets.xml
+++ b/releng.wtpbuilder/components/wst-sdk/customTargets.xml
@@ -4,6 +4,10 @@
 
     <property environment="env" />
 
+    <property
+        name="buildDirectory"
+        value="${buildDirectory}" />
+
     <!-- ===================================================================== -->
     <!-- Run a given ${target} on all elements being built -->
     <!-- Add on <ant> task for each top level element being built. -->
@@ -11,6 +15,7 @@
     <target name="allElements">
         <echo level="info" message="Target:${target} " />
         <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
         <echo level="debug" message="buildDirectory: ${buildDirectory}" />
         <echo level="debug" message="baseLocation: ${baseLocation}" />
         <echo level="debug" message="generic target: ${genericTargets}" />
@@ -86,7 +91,7 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
+   <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
         <available
             property="mapsLocal"
             file="${buildDirectory}/maps/${env.RELENG}" />
@@ -100,15 +105,18 @@
         <property
             name="mapCvsRoot"
             value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
+
+        <!-- if not otherwise set, assume HEAD -->
         <property
             name="mapVersionTag"
             value="HEAD" />
+            
+        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>       
         <property
             name="cvsPackage"
-            value="${env.RELENG}" />
+            value="${env.RELENGMAPS}" />
         <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
         <echo level="debug" message="cvsPackage = ${cvsPackage} " />
-
         <cvs
             cvsRoot="${mapCvsRoot}"
             package="${cvsPackage}"
@@ -116,12 +124,33 @@
             tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
+        <cvs
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->    
+
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
             <param
                 name="mapCvsRoot"
                 value="${mapCvsRoot}" />
         </antcall>
+
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->    
+
     </target>
 
     <target
@@ -353,4 +382,10 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+    </target>
+
 </project>
diff --git a/releng.wtpbuilder/components/wst-sdk/dependency.xml b/releng.wtpbuilder/components/wst-sdk/dependency.xml
index 192f696..aa44bc0 100644
--- a/releng.wtpbuilder/components/wst-sdk/dependency.xml
+++ b/releng.wtpbuilder/components/wst-sdk/dependency.xml
@@ -32,6 +32,7 @@
 		<antcall target="getAndInstall">
 			<param name="groupId" value="eclipseTestFramework" />
 		</antcall>
+		
 		<antcall target="getAndInstall">
 			<param name="groupId" value="dita" />
 		</antcall>
diff --git a/releng.wtpbuilder/components/wst.tests/build.properties b/releng.wtpbuilder/components/wst.tests/build.properties
index 64164a4..23bb688 100644
--- a/releng.wtpbuilder/components/wst.tests/build.properties
+++ b/releng.wtpbuilder/components/wst.tests/build.properties
@@ -17,12 +17,12 @@
 # Set collectingFolder and archivePrefix to . if you want to create archives without
 # trailing eclipse in the paths of the included files
 collectingFolder=eclipse
-
+logExtension=.xml
 # The prefix that will be used in the generated archive.
 # Does not make sense to use a different archivePrefix than collectingFolder, 
 # because zip wouldn't find any files to include into the target zip otherwise
 archivePrefix=eclipse
-logExtension=.xml
+
 # Whether or not to include debug info in the output jars
 javacDebugInfo=false 
 
diff --git a/releng.wtpbuilder/components/wst.tests/customTargets.xml b/releng.wtpbuilder/components/wst.tests/customTargets.xml
index 9660db7..9830a72 100644
--- a/releng.wtpbuilder/components/wst.tests/customTargets.xml
+++ b/releng.wtpbuilder/components/wst.tests/customTargets.xml
@@ -11,6 +11,7 @@
     <target name="allElements">
         <echo level="info" message="Target:${target} " />
         <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
         <echo level="debug" message="buildDirectory: ${buildDirectory}" />
         <echo level="debug" message="baseLocation: ${baseLocation}" />
         <ant
@@ -69,7 +70,7 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
+    <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
         <available
             property="mapsLocal"
             file="${buildDirectory}/maps/${env.RELENG}" />
@@ -83,12 +84,17 @@
         <property
             name="mapCvsRoot"
             value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
+
+        <!-- if not otherwise set, assume HEAD -->
         <property
             name="mapVersionTag"
             value="HEAD" />
-        <property
+
+
+        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>       
+       <property
             name="cvsPackage"
-            value="${env.RELENG}" />
+            value="${env.RELENGMAPS}" />
         <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
         <echo level="debug" message="cvsPackage = ${cvsPackage} " />
         <cvs
@@ -98,12 +104,32 @@
             tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
+        <cvs
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->              
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
             <param
                 name="mapCvsRoot"
                 value="${mapCvsRoot}" />
         </antcall>
+
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->          
+        
     </target>
 
     <target
@@ -279,4 +305,10 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+    </target>
+
 </project>
diff --git a/releng.wtpbuilder/components/wst/build.properties b/releng.wtpbuilder/components/wst/build.properties
index d64b428..23bb688 100644
--- a/releng.wtpbuilder/components/wst/build.properties
+++ b/releng.wtpbuilder/components/wst/build.properties
@@ -17,7 +17,7 @@
 # Set collectingFolder and archivePrefix to . if you want to create archives without
 # trailing eclipse in the paths of the included files
 collectingFolder=eclipse
-
+logExtension=.xml
 # The prefix that will be used in the generated archive.
 # Does not make sense to use a different archivePrefix than collectingFolder, 
 # because zip wouldn't find any files to include into the target zip otherwise
@@ -26,8 +26,6 @@
 # Whether or not to include debug info in the output jars
 javacDebugInfo=false 
 
-logExtension=.xml
-
 # Whether or not to fail the build if there are compiler errors
 javacFailOnError=true
 
diff --git a/releng.wtpbuilder/components/wst/customTargets.xml b/releng.wtpbuilder/components/wst/customTargets.xml
index f82dd63..769294e 100644
--- a/releng.wtpbuilder/components/wst/customTargets.xml
+++ b/releng.wtpbuilder/components/wst/customTargets.xml
@@ -4,6 +4,10 @@
 
     <property environment="env" />
 
+    <property
+        name="buildDirectory"
+        value="${buildDirectory}" />
+            
     <!-- ===================================================================== -->
     <!-- Run a given ${target} on all elements being built -->
     <!-- Add on <ant> task for each top level element being built. -->
@@ -11,6 +15,7 @@
     <target name="allElements">
         <echo level="info" message="Target:${target} " />
         <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
         <echo level="debug" message="buildDirectory: ${buildDirectory}" />
         <echo level="debug" message="baseLocation: ${baseLocation}" />
         <echo level="debug" message="generic target: ${genericTargets}" />
@@ -86,7 +91,7 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
+   <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
         <available
             property="mapsLocal"
             file="${buildDirectory}/maps/${env.RELENG}" />
@@ -100,12 +105,17 @@
         <property
             name="mapCvsRoot"
             value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
+            
+        <!-- if not otherwise set, assume HEAD -->
         <property
             name="mapVersionTag"
             value="HEAD" />
+            
+            
+        <echo level="info" message="${mapCvsRoot} ${mapVersionTag} "></echo>       
         <property
             name="cvsPackage"
-            value="${env.RELENG}" />
+            value="${env.RELENGMAPS}" />
         <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
         <echo level="debug" message="cvsPackage = ${cvsPackage} " />
 
@@ -116,12 +126,35 @@
             tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
+        <cvs
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->                              	
+
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
             <param
                 name="mapCvsRoot"
                 value="${mapCvsRoot}" />
         </antcall>
+
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->    
+
+
+
     </target>
 
     <target
@@ -356,4 +389,10 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+  </target>
+  
 </project>
diff --git a/releng.wtpbuilder/components/wtp-patches-tests/build.properties b/releng.wtpbuilder/components/wtp-patches-tests/build.properties
new file mode 100644
index 0000000..2f5bd06
--- /dev/null
+++ b/releng.wtpbuilder/components/wtp-patches-tests/build.properties
@@ -0,0 +1,39 @@
+###############################################################################
+# Copyright (c) 2003, 2006 IBM Corporation and others.
+# All rights reserved. This program and the accompanying materials 
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+# 
+# Contributors:
+#     IBM Corporation - initial API and implementation
+###############################################################################
+
+# patch feature
+patchFeature=org.eclipse.wtp.patch.tests.assembly.feature
+
+# The CVS tag to use when fetching the map files from the repository
+mapVersionTag=R1_5_5_patches
+runPackager=true
+
+# This is a subdirectory of $buildDirectory
+# Set collectingFolder and archivePrefix to . if you want to create archives without
+# trailing eclipse in the paths of the included files
+collectingFolder=eclipse
+
+# The prefix that will be used in the generated archive.
+# Does not make sense to use a different archivePrefix than collectingFolder, 
+# because zip wouldn't find any files to include into the target zip otherwise
+archivePrefix=eclipse
+logExtension=.xml
+# Whether or not to include debug info in the output jars
+javacDebugInfo=false 
+
+# Whether or not to fail the build if there are compiler errors
+javacFailOnError=true
+
+##################################################
+# Asks the compiler for verbose output.  This should be set to true in order for *.bin.log files to be generated when
+# using the JDT Compiler Adapter to compile.
+javacVerbose=true
+
diff --git a/releng.wtpbuilder/components/wtp-patches-tests/customTargets.xml b/releng.wtpbuilder/components/wtp-patches-tests/customTargets.xml
new file mode 100644
index 0000000..ec586d1
--- /dev/null
+++ b/releng.wtpbuilder/components/wtp-patches-tests/customTargets.xml
@@ -0,0 +1,308 @@
+<project
+    name="Build specific targets and properties"
+    default="noDefault">
+
+    <property file="build.properties" />
+
+    <property environment="env" />
+
+    <!-- ===================================================================== -->
+    <!-- Run a given ${target} on all elements being built -->
+    <!-- Add on <ant> task for each top level element being built. -->
+    <!-- ===================================================================== -->
+    <target name="allElements">
+        <echo level="info" message="Target:${target} " />
+        <echo level="debug" message="basedir: ${basedir}" />
+        <echo level="debug" message="component: ${component}" />
+        <echo level="debug" message="buildDirectory: ${buildDirectory}" />
+        <echo level="debug" message="baseLocation: ${baseLocation}" />
+        <ant
+            antfile="${genericTargets}"
+            target="${target}">
+            <property
+                name="type"
+                value="feature" />
+            <property
+                name="id"
+                value="${patchFeature}" />
+        </ant>
+    </target>
+
+    <!-- ===================================================================== -->
+    <!-- Targets to assemble the built elements for particular configurations  -->
+    <!-- These generally call the generated assemble scripts (named in -->
+    <!-- ${assembleScriptName}) but may also add pre and post processing -->
+    <!-- Add one target for each root element and each configuration -->
+    <!-- ===================================================================== -->
+
+    <target name="assemble.org.eclipse.wtp.patch.tests.assembly.feature">
+        <property
+            name="archiveName"
+            value="wtp-patches-tests-${buildLabel}.zip" />
+        <ant
+            antfile="${assembleScriptName}"
+            dir="${buildDirectory}" />
+    </target>
+
+    <target name="prePackage" />
+
+
+    <target name="postPackage">
+        <property
+            name="archiveName"
+            value="wtp-patches-tests-${buildLabel}.zip" />
+
+        <ant
+            antfile="${wtp.builder.home}/scripts/build/buildutilities.xml"
+            target="unpackUpdateJarsAndCreateZippedPackages">
+            <property
+                name="buildDirectory"
+                value="${buildDirectory}" />
+            <property
+                name="buildLabel"
+                value="${buildLabel}" />
+            <property
+                name="archiveName"
+                value="${archiveName}" />
+        </ant>
+
+    </target>
+
+    <!-- ===================================================================== -->
+    <!-- Check out map files from correct repository -->
+    <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
+    <!-- ===================================================================== -->
+  <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
+      <available
+          property="mapsLocal"
+          file="${buildDirectory}/maps/${env.RELENG}" />
+  </target>
+    <target
+        name="getMapFiles"
+        depends="checkLocal"
+        unless="mapsLocal">
+
+        <!-- ***  change the repo info -->
+        <property
+            name="mapCvsRoot"
+            value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
+        <property
+            name="mapVersionTag"
+            value="HEAD" />
+        <property
+            name="cvsPackage"
+            value="${env.RELENGMAPS}" />
+        <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
+        <echo level="debug" message="cvsPackage = ${cvsPackage} " />
+        <cvs
+            cvsRoot="${mapCvsRoot}"
+            package="${cvsPackage}"
+            dest="${buildDirectory}/maps"
+            tag="${mapVersionTag}"
+            quiet="${env.CVS_QUIET}"
+            reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
+    	<cvs
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />
+-->                              	
+        <!--tag the map files project-->
+        <antcall target="tagMapFiles">
+            <param
+                name="mapCvsRoot"
+                value="${mapCvsRoot}" />
+        </antcall>
+    	
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->
+    	
+    </target>
+
+    <target
+        name="tagMapFiles"
+        if="tagMaps">
+        <cvs
+            cvsRoot="${mapCvsRoot}"
+            dest="${buildDirectory}/maps"
+            command="tag v${buildType}${timestamp}"
+            quiet="${env.CVS_QUIET}"
+            reallyquiet="${env.CVS_REALLY_QUIET}" />
+    </target>
+
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do before setup -->
+    <!-- ===================================================================== -->
+    <target name="preSetup"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do after setup but before starting the build proper -->
+    <!-- ===================================================================== -->
+    <target name="postSetup">
+        <dirname
+            file="${ant.file}"
+            property="component.dir" />
+        <echo level="debug" message="ant.file: ${ant.file}" />
+        <echo level="debug" message="component.dir: ${component.dir}" />
+
+        <ant
+            antfile="${component.dir}/dependency.xml"
+            target="get">
+            <property
+                name="dependency.properties"
+                value="${buildDirectory}/maps/${env.RELENG}/maps/dependencies.properties" />
+            <property
+                name="base.install.dir"
+                value="${buildRoot}" />
+        </ant>
+        <!--fetch the additional pieces to build wst tests -->
+    	<!--
+        <property
+            name="featureOnly"
+            value="false" />
+        <property
+            name="featureAndPlugins"
+            value="true" />
+        <property
+            name="featuresRecursively"
+            value="true" />
+        <ant
+            antfile="genericTargets.xml"
+            dir="${pde.build.scripts}"
+            target="fetchElement">
+            <property
+                name="type"
+                value="feature" />
+            <property
+                name="id"
+                value="org.eclipse.wst" />
+        </ant>
+        -->
+    </target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do before fetching the build elements -->
+    <!-- ===================================================================== -->
+    <target name="preFetch"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do after fetching the build elements -->
+    <!-- ===================================================================== -->
+    <target name="postFetch"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do before generating the build scripts. -->
+    <!-- ===================================================================== -->
+    <target name="postGenerate">
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Steps to do after generating the build scripts. -->
+    <!-- ===================================================================== -->
+    <target name="preGenerate"></target>
+
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do before running the build.xmls for the elements being built. -->
+    <!-- ===================================================================== -->
+    <target name="preProcess"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do after running the build.xmls for the elements being built. -->
+    <!-- ===================================================================== -->
+    <target name="postProcess">
+
+        <condition property="logsAvailable">
+            <istrue value="${javacVerbose}" />
+        </condition>
+        <antcall target="gatherLogs" />
+
+    </target>
+
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do before running assemble. -->
+    <!-- ===================================================================== -->
+    <target name="preAssemble"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do after  running assemble. -->
+    <!-- ===================================================================== -->
+    <target name="postAssemble"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do after the build is done. -->
+    <!-- ===================================================================== -->
+    <target name="postBuild"></target>
+
+
+
+    <!-- ===================================================================== -->
+    <!-- Steps to test the build results -->
+    <!-- ===================================================================== -->
+    <target name="test"></target>
+
+    <!-- ===================================================================== -->
+    <!-- Steps to do to publish the build results -->
+    <!-- ===================================================================== -->
+    <target name="publish"></target>
+    <!-- ===================================================================== -->
+    <!-- Helper targets -->
+    <!-- ===================================================================== -->
+    <target
+        name="gatherLogs"
+        if="logsAvailable">
+        <mkdir dir="${buildDirectory}/${buildLabel}/testcompilelogs" />
+        <echo level="debug"  message="logExtension: ${logExtension}" />
+        <antcall target="allElements">
+            <param
+                name="target"
+                value="gatherLogs" />
+            <param
+                name="logExtension"
+                value="${logExtension}" />
+        </antcall>
+        <unzip
+            dest="${buildDirectory}/${buildLabel}/testcompilelogs"
+            overwrite="true">
+            <fileset
+                dir="${buildDirectory}/features/${patchFeature}">
+                <include name="**/*.log.zip" />
+            </fileset>
+        </unzip>
+
+
+    </target>
+
+    <target
+        name="clean"
+        unless="noclean">
+        <antcall target="allElements">
+            <param
+                name="target"
+                value="cleanElement" />
+        </antcall>
+    </target>
+    <!-- ===================================================================== -->
+    <!-- Default target                                                        -->
+    <!-- ===================================================================== -->
+    <target name="noDefault">
+        <echo level="error" 
+            message="You must specify a target when invoking this file" />
+    </target>
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+  </target>
+</project>
diff --git a/releng.wtpbuilder/components/wtp-patches-tests/dependency.xml b/releng.wtpbuilder/components/wtp-patches-tests/dependency.xml
new file mode 100644
index 0000000..1a795e7
--- /dev/null
+++ b/releng.wtpbuilder/components/wtp-patches-tests/dependency.xml
@@ -0,0 +1,58 @@
+<?xml version="1.0"?>
+<!-- ====================================================================== 
+    Properties that must be passed to this script:
+    base.install.dir
+    dependencyTargets
+    local.cache.dir
+    dependency.properties
+
+    
+    ====================================================================== -->
+<project name="test" default="get">
+
+	<target name="get">
+		<antcall target="getAndInstall">
+			<param name="groupId" value="emf" />
+		</antcall>
+		<antcall target="getAndInstall">
+			<param name="groupId" value="gef" />
+		</antcall>
+
+		<antcall target="getAndInstall">
+			<param name="groupId" value="eclipse" />
+		</antcall>
+		<antcall target="getAndInstall">
+			<param name="groupId" value="eclipseTestFramework" />
+		</antcall>
+
+
+		<!-- for patch builds, also get a whole released version to 
+	    compile against -->
+		<antcall target="getAndInstall">
+			<param name="groupId" value="wtp" />
+		</antcall>
+		<!-- including tests -->
+		<antcall target="getAndInstall">
+			<param name="groupId" value="wtp-wst-test" />
+		</antcall>
+		<antcall target="getAndInstall">
+			<param name="groupId" value="wtp-jst-test" />
+		</antcall>
+	</target>
+
+
+	<target name="getAndInstall">
+		<ant antfile="${dependencyTargets}" target="checkDependency">
+			<property name="groupId" value="${groupId}" />
+		</ant>
+		<ant antfile="${dependencyTargets}" target="installDependency">
+			<property name="groupId" value="${groupId}" />
+			<property name="install.destination" value="${base.install.dir}" />
+		</ant>
+	</target>
+
+
+
+
+</project>
+
diff --git a/releng.wtpbuilder/components/wtp-patches/customTargets.xml b/releng.wtpbuilder/components/wtp-patches/customTargets.xml
index 837cee1..635c92c 100644
--- a/releng.wtpbuilder/components/wtp-patches/customTargets.xml
+++ b/releng.wtpbuilder/components/wtp-patches/customTargets.xml
@@ -37,7 +37,6 @@
     <!-- Add one target for each root element and each configuration -->
     <!-- ===================================================================== -->
 
-    <!-- name's can not be variable? -->
     <target name="assemble.org.eclipse.wtp.patch.assembly.feature">
         <property
             name="archiveName"
@@ -78,7 +77,7 @@
     <!-- Check out map files from correct repository -->
     <!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
     <!-- ===================================================================== -->
-    <target name="checkLocal">
+    <target name="checkLocal" depends="check.useLocalMaps" if="useLocalMaps">
         <available
             property="mapsLocal"
             file="${buildDirectory}/maps/${env.RELENG}" />
@@ -92,23 +91,53 @@
         <property
             name="mapCvsRoot"
             value=":${cvsProtocol}:${cvsUser}@${cvsServer}:${cvsRoot}" />
+            
+        <!-- if not otherwise set, assume HEAD -->
         <property
             name="mapVersionTag"
             value="HEAD" />
-        <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} "></echo>
+
+
+
+
+            
+        <property
+            name="cvsPackage"
+            value="${env.RELENGMAPS}" />
+        <echo level="debug" message="${mapCvsRoot} ${mapVersionTag} " />
+        <echo level="debug" message="cvsPackage = ${cvsPackage} " />
         <cvs
             cvsRoot="${mapCvsRoot}"
-            package="${env.RELENG}"
+            package="${cvsPackage}"
             dest="${buildDirectory}/maps"
             tag="${mapVersionTag}"
             quiet="${env.CVS_QUIET}"
             reallyquiet="${env.CVS_REALLY_QUIET}" />
+<!--
+        <cvs
+                  cvsRoot="${mapCvsRoot}"
+                  package="${env.RELENGMAPS}"
+                  dest="${buildDirectory}/maps"
+                  tag="${mapVersionTag}"
+                  quiet="${env.CVS_QUIET}"
+                  reallyquiet="${env.CVS_REALLY_QUIET}" />            	
+-->                              	
         <!--tag the map files project-->
         <antcall target="tagMapFiles">
             <param
                 name="mapCvsRoot"
                 value="${mapCvsRoot}" />
         </antcall>
+    	
+      <!-- copy all maps to the same place. Be sure to copy only "maps", as there may be "dependancies" etc, 
+          that could be out of date -->
+    	<!-- turns out this "one flat directory" appears not needed!
+      <copy todir="${buildDirectory}/maps/${env.RELENG}/maps" flatten="true">
+          <fileset dir="${buildDirectory}/maps/">
+          	<include name="**/*.map" />
+          </fileset>
+      </copy>
+    	-->    	
     </target>
 
     <target
@@ -135,6 +164,9 @@
         <dirname
             file="${ant.file}"
             property="component.dir" />
+        <echo level="debug" message="ant.file: ${ant.file}" />
+        <echo level="debug" message="component.dir: ${component.dir}" />
+
         <ant
             antfile="${component.dir}/dependency.xml"
             target="get">
@@ -225,6 +257,7 @@
         name="gatherLogs"
         if="logsAvailable">
         <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+        <echo level="debug"  message="logExtension: ${logExtension}" />
         <antcall target="allElements">
             <param
                 name="target"
@@ -259,4 +292,10 @@
             message="You must specify a target when invoking this file" />
     </target>
 
+  <target name="check.useLocalMaps">
+      <condition property="useLocalMaps">
+          <equals arg1="${env.USE_LOCAL_MAPS}" arg2="true" />
+      </condition>
+  </target>
+	
 </project>