Update build for Kepler M3 and integrate improvements

- Introduce Eclipse-SourceRef headers in build.
- Disable baseline-repository due to bug 393977.
- Update to Eclipse Platform 4.3 M3.
- Clean up local Maven p2 repository.
diff --git a/features/org.eclipse.rap.tools.feature/.project b/features/org.eclipse.rap.tools.feature/.project
index 3b3c485..5b73ecd 100644
--- a/features/org.eclipse.rap.tools.feature/.project
+++ b/features/org.eclipse.rap.tools.feature/.project
@@ -1,7 +1,7 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <projectDescription>
 	<name>org.eclipse.rap.tools.feature</name>
-	<comment></comment> 
+	<comment></comment>  
 	<projects>
 	</projects>
 	<buildSpec>
diff --git a/releng/org.eclipse.rap.tools.releng/pom.xml b/releng/org.eclipse.rap.tools.releng/pom.xml
index e68e9c2..721fcf8 100644
--- a/releng/org.eclipse.rap.tools.releng/pom.xml
+++ b/releng/org.eclipse.rap.tools.releng/pom.xml
@@ -24,9 +24,12 @@
   <properties>
     <tycho-version>0.16.0</tycho-version>
     <tycho-extras-version>${tycho-version}</tycho-extras-version>
-    <base-platform>4.3milestones/S-4.3M2-201209201300</base-platform>
+    <base-platform>4.3milestones/S-4.3M3-201210312000</base-platform>
     <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    <tycho.scmUrl>scm:git:git://git.eclipse.org/gitroot/rap/org.eclipse.rap.tools.git</tycho.scmUrl>
+    <!-- disabled due to bug 393977
     <baseline-repository>http://download.eclipse.org/rt/rap/nightly/tooling/</baseline-repository>
+     -->
   </properties>
 
   <prerequisites>
@@ -86,6 +89,11 @@
             <artifactId>tycho-buildtimestamp-jgit</artifactId>
             <version>${tycho-extras-version}</version>
           </dependency>
+          <dependency> 
+            <groupId>org.eclipse.tycho.extras</groupId> 
+            <artifactId>tycho-sourceref-jgit</artifactId> 
+            <version>${tycho-extras-version}</version> 
+          </dependency> 
         </dependencies>
         <configuration>
           <timestampProvider>jgit</timestampProvider>
@@ -93,6 +101,9 @@
             pom.xml
           </jgit.ignore>
           <format>yyyyMMdd-HHmm</format>
+          <sourceReferences> 
+            <generate>true</generate> 
+          </sourceReferences> 
         </configuration>
       </plugin>
 
@@ -100,6 +111,7 @@
         <groupId>org.eclipse.tycho</groupId>
         <artifactId>tycho-p2-plugin</artifactId>
         <version>${tycho-version}</version>
+        <!-- disabled due to bug 393977
         <configuration>
           <baselineRepositories>
             <repository>
@@ -107,6 +119,7 @@
             </repository>
           </baselineRepositories>
         </configuration>
+         -->
       </plugin>
 
       <plugin>
diff --git a/releng/org.eclipse.rap.tools.releng/scripts/build-environment.sh b/releng/org.eclipse.rap.tools.releng/scripts/build-environment.sh
index b82bad8..05d30f4 100755
--- a/releng/org.eclipse.rap.tools.releng/scripts/build-environment.sh
+++ b/releng/org.eclipse.rap.tools.releng/scripts/build-environment.sh
@@ -1,7 +1,16 @@
 # This script sets up environment variables for the RAP builds
 #
 
-export MVN=/opt/public/common/apache-maven-3.0.3/bin/mvn
-export ECLIPSE_HOME=/shared/rt/rap/build-runtimes/eclipse-3.6.2
-export SIGNING_LOCATION=/opt/public/download-staging.priv/rt/rap
+echo "***********************************************************************"
 
+export MVN=${MVN:-"/opt/public/common/apache-maven-3.0.4/bin/mvn"}
+echo "Maven path: ${MVN}"
+
+export ECLIPSE_HOME=${ECLIPSE_HOME:-"/shared/rt/rap/build-runtimes/eclipse"}
+echo "Eclipse location: ${ECLIPSE_HOME}"
+
+export SIGNING_LOCATION=${SIGNING_LOCATION:-"/opt/public/download-staging.priv/rt/rap"}
+echo "Signing location: ${SIGNING_LOCATION}"
+
+export MAVEN_LOCAL_REPO_PATH=${MAVEN_LOCAL_REPO_PATH:-"/shared/rt/rap/m2/repository"}
+echo "Local Maven repository location: ${MAVEN_LOCAL_REPO_PATH}"
diff --git a/releng/org.eclipse.rap.tools.releng/scripts/tools-build.sh b/releng/org.eclipse.rap.tools.releng/scripts/tools-build.sh
index 59c9bc4..8d569d7 100755
--- a/releng/org.eclipse.rap.tools.releng/scripts/tools-build.sh
+++ b/releng/org.eclipse.rap.tools.releng/scripts/tools-build.sh
@@ -20,6 +20,13 @@
 rm -rf "$WORKSPACE"/*.zip
 
 ######################################################################
+# clean up local Maven repository to circumvent p2 cache problems
+for II in .cache .meta p2 ; do
+  echo "Remove directory ${MAVEN_LOCAL_REPO_PATH}/${II}" 
+  rm -r ${MAVEN_LOCAL_REPO_PATH}/${II}
+done
+
+######################################################################
 # Generate reference documentation
 
 cd "$WORKSPACE/org.eclipse.rap.tools"