Securing a state that yields a successful build based on 3.7RC1 despite bug 345830
Cleanup pending.

diff --git a/releng/build-scripts/build/OT-Compiler/build.properties b/releng/build-scripts/build/OT-Compiler/build.properties
index 71fd724..bd7bbab 100644
--- a/releng/build-scripts/build/OT-Compiler/build.properties
+++ b/releng/build-scripts/build/OT-Compiler/build.properties
@@ -13,3 +13,20 @@
 J2SE-1.5=/shared/common/jdk-1.5.0-22.x86_64/jre/lib/charsets.jar:/shared/common/jdk-1.5.0-22.x86_64/jre/lib/jce.jar:/shared/common/jdk-1.5.0-22.x86_64/jre/lib/jsse.jar:/shared/common/jdk-1.5.0-22.x86_64/jre/lib/rt.jar
 #J2SE-1.5=/opt/public/common/ibm-java2-ppc64-50/jre/lib/vm.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/core.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/charsets.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/graphics.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/security.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmpkcs.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmorb.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmcfw.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmorbapi.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmjcefw.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmjgssprovider.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmjsseprovider2.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmjaaslm.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/ibmcertpathprovider.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/server.jar:/opt/public/common/ibm-java2-ppc64-50/jre/lib/xml.jar
 
+# no other publishing besides p2!
+configs=
+
+skipBase=true
+base=${build.root.dir}
+# baseLocation is set from run.xml
+eclipseBuildId=SDK-3.6RC3
+eclipseDrop=${eclipseBuildId}-201005271700
+eclipseURL=/home/data/httpd/download.eclipse.org/eclipse/downloads/drops/${eclipseDrop}
+eclipseBaseURL=${eclipseURL}/eclipse-${eclipseBuildId}-linux-gtk-${basearch}.tar.gz
+
+p2.gathering=true
+p2.build.repo=file://${build.root.dir}/../updateSite
+skipMirroring=true
+#skipDirector=true
+p2.metadata.repo.name="Object Teams Updates"
+
diff --git a/releng/build-scripts/build/OT-Compiler/customTargets.xml b/releng/build-scripts/build/OT-Compiler/customTargets.xml
index 4777fab..7ad0c3e 100644
--- a/releng/build-scripts/build/OT-Compiler/customTargets.xml
+++ b/releng/build-scripts/build/OT-Compiler/customTargets.xml
@@ -27,7 +27,7 @@
 

 		<ant antfile="${genericTargets}" target="${target}" >

 			<property name="type" value="feature" />

-			<property name="id" value="org.eclipse.objectteams.otdt" />

+			<property name="id" value="org.eclipse.objectteams.otdt.core.patch" />

 		</ant>

 	</target>

 

@@ -37,12 +37,17 @@
 	<!-- ${assembleScriptName}) but may also add pre and post processing -->

 	<!-- Add one target for each root element and each configuration -->

 	<!-- ===================================================================== -->

-	<target name="assemble.org.eclipse.objectteams.otdt">

-		<ant antfile="${assembleScriptName}" dir="${buildDirectory}">

-			<property name="zipargs" value="" />

-		</ant>

+	<target name="assemble.org.eclipse.objectteams.otdt.core.patch.group.group.group">

+		<echo message="Skipping zip assembly"/>

 	</target>

 

+	<property name="assemble.org.eclipse.objectteams.otdt.core.patch.p2" value="true" />

+ 	<target   name="assemble.org.eclipse.objectteams.otdt.core.patch.p2">

+        <ant antfile="${assembleScriptName}" dir="${buildDirectory}">

+			<property name="p2.build.repo" value="file://${otdtUpdatesDir}"/>

+		</ant>

+ 	</target>

+

 	<!-- ===================================================================== -->

 	<!-- Check out map files from correct repository -->

 	<!-- Replace values for cvsRoot, package and mapVersionTag as desired. -->

@@ -76,9 +81,6 @@
 	<!-- Steps to do after fetching the build elements -->

 	<!-- ===================================================================== -->

 	<target name="postFetch">

-		<property name="meta.dir" value="${buildDirectory}/plugins/org.eclipse.jdt.core/META-INF"/>

-		<echo message="### Use Bootstrap_MANIFEST.MF in ${meta.dir} ###" />

-		<move file="${meta.dir}/Bootstrap_MANIFEST.MF" tofile="${meta.dir}/MANIFEST.MF" overwrite="yes" />

 	</target>

 

 	<!-- ===================================================================== -->

@@ -123,10 +125,6 @@
 	<!-- Steps to do after the build is done. -->

 	<!-- ===================================================================== -->

 	<target name="postBuild">

-		<copy file="${buildDirectory}/${buildLabel}/org.eclipse.objectteams.otdt-${buildId}.zip" tofile="${build.root.dir}/org.eclipse.objectteams.otdt-${buildId}.zip" />

-

-		<echo message="### Insert OT Compiler in ${baseLocation} ###"/>

-		<unzip src="${build.root.dir}/org.eclipse.objectteams.otdt-${buildId}.zip" dest="${baseLocation}"/>

 	</target>

 

 	<!-- ===================================================================== -->

diff --git a/releng/build-scripts/build/otdt_prerequisites.sh b/releng/build-scripts/build/otdt_prerequisites.sh
index 00613a0..b7f2872 100644
--- a/releng/build-scripts/build/otdt_prerequisites.sh
+++ b/releng/build-scripts/build/otdt_prerequisites.sh
@@ -48,11 +48,11 @@
 
 # VERSIONS:
 # Eclipse SKD build identifier:
-EVERSION=3.7M7
+EVERSION=3.7RC1
 # Architecture (as used by OSGi):
 ARCH=`arch`
 # used only locally:
-DROP=${BASEDIR}/drops/S-3.7M7-201104280848
+DROP=${BASEDIR}/drops/S-3.7RC1-201105122000
 
 # EXPORT: archive file of the base eclipse SDK build:
 ECLIPSE_SDK_TGZ=${DROP}/eclipse-SDK-${EVERSION}-linux-gtk-${ARCH}.tar.gz
@@ -61,4 +61,5 @@
 ECLIPSE_TESTLIB_ZIP=${DROP}/eclipse-test-framework-${EVERSION}.zip
 
 # EXPORT: where to find previously published plugins&features:
-PUBLISHED_UPDATES=${HOME}/downloads/objectteams/updates/ot0.8
+PUBLISHED_UPDATES=${HOME}/downloads/objectteams/updates/ot2.0
+
diff --git a/releng/build-scripts/build/run.properties b/releng/build-scripts/build/run.properties
index ee23ef8..55168fe 100644
--- a/releng/build-scripts/build/run.properties
+++ b/releng/build-scripts/build/run.properties
@@ -23,12 +23,12 @@
 # Version dependent names:
 
 # Details of the Eclipse SDK build upon:
-run.eclipseScriptDir=plugins/org.eclipse.pde.build_3.7.0.v20110418/scripts
-org.eclipse.equinox.launcher_jar=org.eclipse.equinox.launcher_1.2.0.v20110321-2120.jar
+run.eclipseScriptDir=plugins/org.eclipse.pde.build_3.7.0.v20110512-1320/scripts
+org.eclipse.equinox.launcher_jar=org.eclipse.equinox.launcher_1.2.0.v20110502.jar
 
 # for patching our patch feature to match this version with any suffix:
-jdt.feature.version=3.7.0.v20110331
-jdt.feature.version.next=3.7.0.v20110332
+jdt.feature.version=3.7.0.v20110505-0800
+jdt.feature.version.next=3.7.0.v20110505-0801
 
 # SVN Support for PDE BUILD:
 # (Note: this file must be provided in ${OTScriptDir}/lib)
diff --git a/releng/build-scripts/build/run.xml b/releng/build-scripts/build/run.xml
index 2d90488..74d70da 100644
--- a/releng/build-scripts/build/run.xml
+++ b/releng/build-scripts/build/run.xml
@@ -122,6 +122,12 @@
 		<antcall target="createOTDTEclipse"/>
 	</target>
 
+	<target name="ot-compiler-build" depends="setupProperties,checkOS" description="build only the compiler (for debugging the build)">
+		<echo message="Starting BuildProcess in ${build.root.dir}"/>
+		<antcall target="verifyAntInstall"/>
+		<antcall target="createOTCompilerEclipse"/>
+	</target>
+
 	<target name="ot-junit-run" depends="setupProperties,checkOS" description="Run tests without building">
 		<echo message="Starting Testrun ${test.root.dir}"/>
 		<antcall target="runAllTests" />
@@ -206,6 +212,7 @@
 	            <arg value="-Dbuilder=${builder-otcompiler}"/>
 	            <arg value="-D${installmode}=true"/> <!-- <- obsolete? -->
 		    	<arg value="-Dcomponent.short=OT-Compiler"/>
+			<arg value="-DotdtUpdatesDir=${otdtUpdatesDir}"/>
 	            <arg value="-Dconfigs=*,*,*"/>
 	            <arg value="-Dbaseos=${os}"/>
 	            <arg value="-Dbasews=${ws}"/>
@@ -214,7 +221,7 @@
 	            <arg value="-Dtest.eclipseDir=${test.eclipseDir}"/>
 	            <arg value="-DmapVersionTag=${mapVersionTag}"/>
 	            <arg value="-DpathToMapFile=${pathToMapFile}"/>
-		    	<arg value="-DmapFileName=ot-compiler.map"/>
+		    	<arg value="-DmapFileName=otdt.map"/>
 		    	<arg value="-Dsvn.repository.url=${svn.repository.url}"/>
 	            <arg value="-Declipse-app.tgz=${eclipse-app.tgz}"/>
 	            <arg value="-Declipse.tests.zip=${eclipse.tests.zip}"/>
@@ -222,6 +229,11 @@
 	            <jvmarg value="${vm.args}"/>
 	            <jvmarg value="${vm.args2}"/>
         </java>
+        <ant antfile="${OTScriptDir}/p2helper.xml" target="installFeature" dir="${baseLocation}">
+            <property name="feature" value="org.eclipse.objectteams.otdt.core.patch.feature.group"/>
+            <property name="sourceUpdatesDir" value="${otdtUpdatesDir}"/>
+            <property name="targetEclipseDir" value="${baseLocation}"/>
+        </ant>
 		<!-- At this point a zip file containing the new jdt.core-plugin exists in 
 		     ${build.root.dir}/org.eclipse.objectteams.otdt-${buildId}.zip
 		     which has already been installed into ${baseLocation} as to replace the 
diff --git a/releng/build-scripts/build/test.properties b/releng/build-scripts/build/test.properties
index 59297c2..b7d5e16 100644
--- a/releng/build-scripts/build/test.properties
+++ b/releng/build-scripts/build/test.properties
@@ -1,13 +1,19 @@
 # versions of test plugins:
 
-org.eclipse.jdt.core.tests.builder=org.eclipse.jdt.core.tests.builder_3.4.0.v_B53
+# pasted output from processSDKmap.sh:
+# ----
+org.eclipse.jdt.core.tests.builder=org.eclipse.jdt.core.tests.builder_3.4.0.v_B59
+org.eclipse.test.performance=org.eclipse.test.performance_3.6.0.v20101027
+org.eclipse.jdt.debug.tests=org.eclipse.jdt.debug.tests_3.1.200.v20110509
+org.eclipse.jdt.ui.tests=org.eclipse.jdt.ui.tests_3.7.0.v20110505-0800
+org.eclipse.jdt.ui.tests.refactoring=org.eclipse.jdt.ui.tests.refactoring_3.7.0.v20110511-0800
+# ----
+
+# tests referenced without version qualifier:
 org.eclipse.jdt.core.tests.compiler=org.eclipse.jdt.core.tests.compiler_3.4.0

 org.eclipse.jdt.core.tests.model=org.eclipse.jdt.core.tests.model_3.4.0

-org.eclipse.test.performance=org.eclipse.test.performance_3.6.0.v20101027

-org.eclipse.jdt.debug.tests=org.eclipse.jdt.debug.tests_3.1.200.v20110418
-org.eclipse.jdt.ui.tests=org.eclipse.jdt.ui.tests_3.7.0.v20110427-1800
-org.eclipse.jdt.ui.tests.refactoring=org.eclipse.jdt.ui.tests.refactoring_3.7.0.v20110427-1800
-# this is part of eclipse-test-framework and holds library.xml:

+
+# this is part of eclipse-test-framework and holds library.xml:
 org.eclipse.test=org.eclipse.test_3.3.100

 

 org.eclipse.objectteams.otdt.tests=org.eclipse.objectteams.otdt.tests_1.3.0