try to modernize customTargets by refreshing from PDE/Build's current templates
- specifically try to get rid of the many useless variants of assemble.X.Y targets
diff --git a/releng/build-scripts/build/OTDT-Build/customTargets.xml b/releng/build-scripts/build/OTDT-Build/customTargets.xml
index 26c9fc1..41fbf9e 100644
--- a/releng/build-scripts/build/OTDT-Build/customTargets.xml
+++ b/releng/build-scripts/build/OTDT-Build/customTargets.xml
@@ -10,118 +10,73 @@
 -->
 <project name="Build specific targets and properties" default="noDefault" >
 
-
-	<condition property="isNightlyBuild">
-		<equals arg1="${buildType}" arg2="N"/>
-	</condition>
-	<property file="${buildDirectory}/version.properties"/>
-	<property name="buildLabel" value="${buildType}-${featureVersion}"/>
-	<property name="buildId" value="${featureVersion}"/>	
-	
 	<!-- ===================================================================== -->
 	<!-- Run a given ${target} on all elements being built -->
 	<!-- Add on <ant> task for each top level element being built. -->
 	<!-- ===================================================================== -->
+	<available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
+	<property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
+
+	<import file="${allElementsFile}" />
 	<target name="allElements">
-
-		<!-- org.eclipse.objectteams.otdt.core.patch is included from otdt -->
-
-		<ant antfile="${genericTargets}" target="${target}" >
-			<property name="type" value="feature" />
-			<property name="id" value="org.eclipse.objectteams.otequinox" />
-		</ant>
-
-		<ant antfile="${genericTargets}" target="${target}" >
-			<property name="type" value="feature" />
-			<property name="id" value="org.eclipse.objectteams.otdt" />
-		</ant>
-		
-	  	<condition property="really.run.tests">
-			<istrue value="${do.run.tests}"/> 
-		</condition>
-        
-		<antcall target="testElements" />
-
+		<antcall target="allElementsDelegator" />
 	</target>
-
-    <target name="testElements" if="really.run.tests">
-        <ant antfile="${genericTargets}" target="${target}" >
-            <property name="type" value="feature" />
-            <property name="id" value="org.eclipse.objectteams.otdt-tests" />
-        </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 -->
-	<!-- ===================================================================== -->
 	
-	<!-- org.eclipse.objectteams.otdt.core.patch is included from otdt -->
-	<!-- different features are gathered into two different locations:
-		OTDT	-> ${otdtUpdatesDir}
-		tests	-> ${testsUpdatesDirBase}/otdt 
-	-->
-    <target name="assemble.org.eclipse.objectteams.otequinox.p2">
-        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
-			<property name="p2.build.repo" value="file://${otdtUpdatesDir}"/>
-		</ant>
-    </target>
-    <target name="assemble.org.eclipse.objectteams.otequinox.group.group.group">
-        <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
-    </target>
-	<target name="assemble.org.eclipse.objectteams.otequinox">
-		<echo message="Not assembling org.eclipse.objectteams.otequinox, will create update.jars instead (later during the build)" />
-	</target>
-	<!-- Regarding the config "linux.gtk.*" see comment in build.properties -->
-	<target name="assemble.org.eclipse.objectteams.otequinox.linux.gtk.*">
-		<echo message="Not assembling org.eclipse.objectteams.otequinox.linux.gtk.*, will create update.jars instead (later during the build)" />
-	</target>
-    <target name="assemble.org.eclipse.objectteams.otdt.p2">
-            <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
-		<property name="p2.build.repo" value="file://${otdtUpdatesDir}"/>
-	</ant>
-    </target>
-    <target name="assemble.org.eclipse.objectteams.otdt.group.group.group">
-            <ant antfile="${assembleScriptName}" dir="${buildDirectory}"/>
-    </target>
-	<target name="assemble.org.eclipse.objectteams.otdt">
-		<echo message="Not assembling org.eclipse.objectteams.otdt, will create update.jars instead (later during the build)" />
-	</target>
-	<target name="assemble.org.eclipse.objectteams.otdt.linux.gtk.*">
-		<echo message="Not assembling org.eclipse.objectteams.otdt.linux.gtk.*, will create update.jars instead (later during the build)" />
+	<!-- ===================================================================== -->
+	<!-- ===================================================================== -->
+	<target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
+		<get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
+		<unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
 	</target>
 
-	<target name="assemble.org.eclipse.objectteams.otdt-tests.p2">
-        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">
-			<property name="p2.build.repo" value="file://${testsUpdatesDirBase}/otdt"/>
-		</ant>
-	</target>
-	<target name="assemble.org.eclipse.objectteams.otdt-tests.group.group.group">
-		<echo message="empty target" />
-	</target>
-	<target name="assemble.org.eclipse.objectteams.otdt-tests">
-		<ant antfile="${assembleScriptName}" dir="${buildDirectory}">
-			<property name="zipargs" value="" />
-		</ant>
-	</target>
-	<target name="assemble.org.eclipse.objectteams.otdt-tests.linux.gtk.*">
-		<antcall target="assemble.org.eclipse.objectteams.otdt-tests"/>
+	<target name="checkLocalBase">
+		<available file="${base}" property="skipBase" />
 	</target>
 
 	<!-- ===================================================================== -->
 	<!-- Check out map files from correct repository -->
-	<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->
+	<!-- Replace values for mapsCheckoutTag as desired. -->
 	<!-- ===================================================================== -->
-	<target name="getMapFiles">
-		<delete dir="${buildDirectory}/maps"/>
-		<mkdir dir="${buildDirectory}/maps"/>
+	<target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
+		<property name="mapsCheckoutTag" value="HEAD" />
+		<!-- orig:
+		<cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
+		-->
 		<property name="svn.map.url" value="${svn.repository.url}/${mapVersionTag}/${pathToMapFile}/${mapFileName}" />
 
 		<svn command="export" url="${svn.map.url}" dest="${buildDirectory}/maps/${mapFileName}" />
 	</target>
-	
+
+	<target name="checkLocalMaps">
+		<available property="skipMaps" file="${buildDirectory}/maps" />
+	</target>
+
+	<target name="tagMapFiles" if="tagMaps">
+		<!-- orig:
+		<cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
+		-->
+	</target>
+
+	<!-- ===================================================================== -->
+
+	<target name="clean" unless="noclean">
+		<antcall target="allElements">
+			<param name="target" value="cleanElement" />
+		</antcall>
+	</target>
+
+	<target name="gatherLogs">
+		<mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
+		<antcall target="allElements">
+			<param name="target" value="gatherLogs" />
+		</antcall>
+		<unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
+			<fileset dir="${buildDirectory}/features">
+				<include name="**/*.log.zip" />
+			</fileset>
+		</unzip>
+	</target>
+
 	<!-- ===================================================================== -->
 	<!-- Steps to do before setup -->
 	<!-- ===================================================================== -->
@@ -132,6 +87,7 @@
 	<!-- Steps to do after setup but before starting the build proper -->
 	<!-- ===================================================================== -->
 	<target name="postSetup">
+		<antcall target="getBaseComponents" />
 	</target>
 
 	<!-- ===================================================================== -->
@@ -151,6 +107,18 @@
 	</target>
 
 	<!-- ===================================================================== -->
+	<!-- Steps to do before the repositories are being processed -->
+	<!-- ===================================================================== -->
+	<target name="preProcessRepos">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after the repositories have been processed -->
+	<!-- ===================================================================== -->
+	<target name="postProcessRepos">
+	</target>
+	
+	<!-- ===================================================================== -->
 	<!-- Steps to do before generating the build scripts. -->
 	<!-- ===================================================================== -->
 	<target name="preGenerate">
@@ -160,9 +128,11 @@
 	<!-- Steps to do after generating the build scripts. -->
 	<!-- ===================================================================== -->
 	<target name="postGenerate">
+		<!-- orig:
+		<antcall target="clean" />
+		-->
 	</target>
 
-
 	<!-- ===================================================================== -->
 	<!-- Steps to do before running the build.xmls for the elements being built. -->
 	<!-- ===================================================================== -->
@@ -175,7 +145,6 @@
 	<target name="postProcess">
 	</target>
 
-
 	<!-- ===================================================================== -->
 	<!-- Steps to do before running assemble. -->
 	<!-- ===================================================================== -->
@@ -189,9 +158,28 @@
 	</target>
 
 	<!-- ===================================================================== -->
+	<!-- Steps to do before running package. -->
+	<!-- ===================================================================== -->
+	<target name="prePackage">
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do after  running package. -->
+	<!-- ===================================================================== -->
+	<target name="postPackage">
+	</target>
+
+	<!-- ===================================================================== -->
 	<!-- Steps to do after the build is done. -->
 	<!-- ===================================================================== -->
 	<target name="postBuild">
+		<antcall target="gatherLogs" />
+	</target>
+
+	<!-- ===================================================================== -->
+	<!-- Steps to do to test the build results -->
+	<!-- ===================================================================== -->
+	<target name="test">
 	</target>
 
 	<!-- ===================================================================== -->
@@ -200,7 +188,6 @@
 	<target name="publish">
 	</target>
 
-
 	<!-- ===================================================================== -->
 	<!-- Default target                                                        -->
 	<!-- ===================================================================== -->