sync recent changes
diff --git a/buildsystem/bootstrap.sh b/buildsystem/bootstrap.sh
index 0773cda..f437d79 100644
--- a/buildsystem/bootstrap.sh
+++ b/buildsystem/bootstrap.sh
@@ -109,8 +109,10 @@
 then
     BRANCH_NM=${BRANCH}
     BRANCH=branches/${BRANCH}/
+    JAVA_HOME=/shared/common/ibm-java-ppc64-60-SR7
 else
     BRANCH_NM="trunk"
+    JAVA_HOME=/shared/rt/eclipselink/sapjvm_6
 fi
 
 echo "Target     ='${TARGET}'"
@@ -143,7 +145,6 @@
 HOME_DIR=/shared/rt/eclipselink
 BOOTSTRAP_BLDFILE=bootstrap.xml
 UD2M_BLDFILE=uploadDepsToMaven.xml
-#JAVA_HOME=/shared/common/ibm-java-jdk-ppc-60
 JAVA_HOME=/shared/common/ibm-java-ppc64-60-SR7
 ANT_HOME=/shared/common/apache-ant-1.7.0
 LOG_DIR=${HOME_DIR}/logs
@@ -455,7 +456,7 @@
     ##
     VERSION=`cat ${DATED_LOG} | grep -m1 "EL version" | cut -d= -f2 | tr -d '\047'`
     BUILD_STR=`cat ${DATED_LOG} | grep -m1 version.string | cut -d= -f2 | tr -d '\047'`
-    echo "Generating summary email for ${VERSION} build (${BUILD_STR})."
+    echo "Generating summary email for ${VERSION} build '${BUILD_STR}'."
 
     ## find the current revision
     ##
@@ -491,7 +492,7 @@
         ## Capture any 'allowed' compiler errors
         ##
         cat ${DATED_LOG} | grep -n '[javac]*errors' > ${COMPILE_RESULT_FILE}
-        
+
         ## make sure TESTDATA_FILE is empty
         ##
         if [ -f ${TESTDATA_FILE} ]
@@ -505,7 +506,7 @@
         then
             CAVEAT_TXT=" Signing failed. P2 not generated!"
         fi
-    
+
         ## run routine to generate test results file and generate MAIL_SUBJECT based upon exit status
         ##
         genTestSummary ${SORTED_RESULT_FILE} ${TESTDATA_FILE}
@@ -541,7 +542,7 @@
         LOGPREFIX=BuildFail
         echo "Build had issues to be resolved."
     fi
-    
+
     if [ \( "${BUILD_FAILED}" = "true" \) -o \( "${TESTS_FAILED}" = "true" \) ]
     then
         cp ${DATED_LOG} ${FailedNFSDir}/${LOGPREFIX}${LOGFILE_NAME}
diff --git a/buildsystem/buildCompositeP2.sh b/buildsystem/buildCompositeP2.sh
new file mode 100644
index 0000000..3538abc
--- /dev/null
+++ b/buildsystem/buildCompositeP2.sh
@@ -0,0 +1,119 @@
+# !/bin/sh
+#set -x
+
+RELEASE_SITE_DIR=/home/data/httpd/download.eclipse.org/rt/eclipselink/updates
+RELEASE_SITE_NAME="EclipseLink Release Repository"
+MILESTONE_SITE_DIR=/home/data/httpd/download.eclipse.org/rt/eclipselink/milestone-updates
+MILESTONE_SITE_NAME="EclipseLink Milestone Repository"
+NIGHTLY_SITE_DIR=/home/data/httpd/download.eclipse.org/rt/eclipselink/nightly-updates
+NIGHTLY_SITE_NAME="EclipseLink Nightly Build Repository"
+CMD_ERROR=false
+SITE_DIR=$1
+SITE_NAME=$2
+if [ "${SITE_DIR}" = "release" ]
+then
+    SITE_DIR=${RELEASE_SITE_DIR}
+    SITE_NAME=${RELEASE_SITE_NAME}
+fi
+if [ "${SITE_DIR}" = "milestone" ]
+then
+    SITE_DIR=${MILESTONE_SITE_DIR}
+    SITE_NAME=${MILESTONE_SITE_NAME}
+fi
+if [ "${SITE_DIR}" = "nightly" ]
+then
+    SITE_DIR=${NIGHTLY_SITE_DIR}
+    SITE_NAME=${NIGHTLY_SITE_NAME}
+fi
+
+if [ "${SITE_DIR}" = "" ]
+then
+    echo "ERROR: Site location must be specified!"
+    CMD_ERROR=true
+fi
+if [ ! -d ${SITE_DIR} ]
+then
+    echo "ERROR: Need to generate the children repositories before generating the composite!"
+    CMD_ERROR=true
+fi
+if [ "${SITE_NAME}" = "" ]
+then
+    echo "ERROR: Site name must be specified!"
+    CMD_ERROR=true
+fi
+if [ "${CMD_ERROR}" = "true" ]
+then
+            echo "USAGE: ./buildCompositeP2.sh site_dir site_name"
+            echo "   where:"
+            echo "      site_dir  = the location of the compositeRepository with"
+            echo "                  child repositories already present under it"
+            echo "      site_name = string designating the compositeRepository name"
+            exit
+fi
+
+# safe temp directory
+tmp=${TMPDIR-/tmp}
+tmp=$tmp/somedir.$RANDOM.$RANDOM.$RANDOM.$$
+(umask 077 && mkdir $tmp) || {
+  echo "Could not create temporary directory! Exiting." 1>&2
+  exit 1
+}
+
+#------- Subroutines -------#
+unset genContent
+genContent() {
+    # Generate the nightly build table
+    echo "<?xml version='1.0' encoding='UTF-8'?>" > $tmp/content.xml
+    echo "<?compositeMetadataRepository version='1.0.0'?>" >> $tmp/content.xml
+    echo "<repository name='&quot;${SITE_NAME}&quot;' type='org.eclipse.equinox.internal.p2.metadata.repository.CompositeMetadataRepository' version='1.0.0'>" >> $tmp/content.xml
+    echo "  <properties size='1'>" >> $tmp/content.xml
+    echo "    <property name='p2.timestamp' value='1267023743270'/>" >> $tmp/content.xml
+    echo "  </properties>" >> $tmp/content.xml
+    echo "  <children size='${child_count}'>" >> $tmp/content.xml
+    echo "    <child location='categories'/>" >> $tmp/content.xml
+    cat $tmp/children.xml >> $tmp/content.xml
+    echo "  </children>" >> $tmp/content.xml
+    echo "</repository>" >> $tmp/content.xml
+}
+
+unset genArtifact
+genArtifact() {
+    # Generate the nightly build table
+    echo "<?xml version='1.0' encoding='UTF-8'?>" > $tmp/artifact.xml
+    echo "<?compositeArtifactRepository version='1.0.0'?>" >> $tmp/artifact.xml
+    echo "<repository name='&quot;${SITE_NAME}&quot;' type='org.eclipse.equinox.internal.p2.artifact.repository.CompositeArtifactRepository' version='1.0.0'>" >> $tmp/artifact.xml
+    echo "  <properties size='1'>" >> $tmp/artifact.xml
+    echo "    <property name='p2.timestamp' value='1267023743270'/>" >> $tmp/artifact.xml
+    echo "  </properties>" >> $tmp/artifact.xml
+    echo "  <children size='${child_count}'>" >> $tmp/artifact.xml
+    echo "    <child location='categories'/>" >> $tmp/artifact.xml
+    cat $tmp/children.xml >> $tmp/artifact.xml
+    echo "  </children>" >> $tmp/artifact.xml
+    echo "</repository>" >> $tmp/artifact.xml
+}
+
+unset genChildren
+genChildren() {
+    for child in `ls -dr [0-9]*` ; do
+        child_count=`expr $child_count + 1`
+        echo "    <child location='${child}'/>" >> $tmp/children.xml
+    done
+}
+
+#------- MAIN -------#
+cd ${SITE_DIR}
+echo "generating Composite Repository..."
+echo "    At:     '${SITE_DIR}'"
+echo "    Called: '${SITE_NAME}'"
+
+#  child_count is 1 because there will always be a child
+#  for the categories (which wo't be counted)
+child_count=1
+genChildren
+genArtifact
+genContent
+
+# Copy the completed file to the server, and cleanup
+mv -f $tmp/content.xml  ${SITE_DIR}/compositeContent.xml
+mv -f $tmp/artifact.xml ${SITE_DIR}/compositeArtifacts.xml
+rm -rf $tmp
diff --git a/buildsystem/buildNightlyList.sh b/buildsystem/buildNightlyList.sh
index 5f88b87..be6ba9a 100644
--- a/buildsystem/buildNightlyList.sh
+++ b/buildsystem/buildNightlyList.sh
@@ -4,6 +4,7 @@
 export JAVA_HOME=/shared/common/ibm-java-jdk-ppc-60
 export PATH=${JAVA_HOME}/bin:/usr/bin:/usr/local/bin:${PATH}
 
+GeneratedDownloadPage=downloads.xml
 BaseDownloadURL="http://www.eclipse.org/downloads/download.php?file=/rt/eclipselink/nightly"
 BaseDisplayURL="http://download.eclipse.org/rt/eclipselink/nightly"
 BaseDownloadNFSDir="/home/data/httpd/download.eclipse.org/rt/eclipselink"
@@ -16,7 +17,7 @@
 tmp=${TMPDIR-/tmp}
 tmp=$tmp/somedir.$RANDOM.$RANDOM.$RANDOM.$$
 (umask 077 && mkdir $tmp) || {
-  echo "Could not create temporary directory! Exiting." 1>&2 
+  echo "Could not create temporary directory! Exiting." 1>&2
   exit 1
 }
 
@@ -47,7 +48,7 @@
     echo "            <th align=\"center\"> </th>                                      " >> $tmp/index.xml
     echo "            <th colspan=\"8\" align=\"center\"> Nightly Testing Results </th>" >> $tmp/index.xml
     echo "          </tr>                                                              " >> $tmp/index.xml
-    
+
     #    Generate each table row depending upon available content
     for contentdir in `ls -dr [0-9]*` ; do
         cd $contentdir
@@ -142,5 +143,5 @@
 echo "</sections>                                                                               " >> $tmp/index.xml
 
 # Copy the completed file to the server, and cleanup
-mv -f $tmp/index.xml  ${BaseDownloadNFSDir}/downloads.xml
+mv -f $tmp/index.xml  ${BaseDownloadNFSDir}/${GeneratedDownloadPage}
 rm -rf $tmp
diff --git a/buildsystem/cleanNightly.sh b/buildsystem/cleanNightly.sh
index 3b68d01..d8dac10 100644
--- a/buildsystem/cleanNightly.sh
+++ b/buildsystem/cleanNightly.sh
@@ -1,32 +1,69 @@
 # !/bin/sh
-set -x
-
+#set -x
 
 version=1.1.4
-mavenVersion=${version}-SNAPSHOT
 BaseDownloadNFSDir="/home/data/httpd/download.eclipse.org/rt/eclipselink"
 buildir=/shared/rt/eclipselink
 
 cd ${buildir}
-num_files=10
+if [ "input" == "release" ]
+then
+    # When releasing clear all nightly builds
+    num_builds=0
+    num_p2_builds=0
+    num_maven_builds=0
+else
+    num_builds=10
+    num_p2_builds=5
+    # Maven: 5 builds * 9 files/build = 45
+    num_maven_files=45
+fi
 
-# leave only the last 10 build dirs for the version on the download server
+### Download Site ###
+#      leave only the last 10 build dirs for the version on the download server
 index=0
-for contentdir in `ls -dr ${BaseDownloadNFSDir}/nightly/${version}/[0-9]*` ; do
+removed=0
+cd ${BaseDownloadNFSDir}/nightly/${version}
+for contentdir in `ls -dr [0-9]*` ; do
     index=`expr $index + 1`
-    if [ $index -gt $num_files ] ; then
+    if [ $index -gt $num_builds ] ; then
+        echo "Removing ${contentdir}..."
         rm -r $contentdir
+        removed=`expr $removed + 1`
     fi
 done
+echo "Removed $removed direcories from ${BaseDownloadNFSDir}/nightly/${version}."
 
-# leave only last 5 days worth of files in the maven repository
+### P2 Site ###
+#      leave only the last "num_p2_builds" builds for the version in the nightly P2 repos
 index=0
-# 5 days worth of files - 9 files per day
-num_files=45
-for mvnfile in `ls -r ${BaseDownloadNFSDir}/maven.repo/org/eclipse/persistence/eclipselink/${mavenVersion}/eclipse*.* ` ; do
-        index=`expr $index + 1`
-        if [ $index -gt $num_files ] ; then
-           rm $mvnfile
-        fi
+removed=0
+cd ${BaseDownloadNFSDir}/nightly-updates
+for contentdir in `ls -dr ${version}*` ; do
+    index=`expr $index + 1`
+    if [ $index -gt $num_p2_builds ] ; then
+        echo "Removing ${contentdir}..."
+        rm -r $contentdir
+        removed=`expr $removed + 1`
+    fi
 done
+echo "Removed $removed direcories from ${BaseDownloadNFSDir}/nightly-updates."
 
+### Maven Site ###
+#      leave only last 5 days worth of files in the maven repository
+cd ${BaseDownloadNFSDir}/maven.repo/org/eclipse/persistence
+for mvncomp in `ls -d *eclipse*` ; do
+    index=0
+    removed=0
+    cd ${BaseDownloadNFSDir}/maven.repo/org/eclipse/persistence/${mvncomp}/${version}-SNAPSHOT
+    for mvnfile in `ls -r ${mvncomp}*.*` ; do
+        index=`expr $index + 1`
+        if [ $index -gt $num_maven_files ] ; then
+           echo "Removing ${mvnfile}..."
+           rm $mvnfile
+           removed=`expr $removed + 1`
+        fi
+    done
+    echo "Removed $removed files from ${BaseDownloadNFSDir}/maven.repo/org/eclipse/persistence/${mvncomp}/${version}-SNAPSHOT."
+done
+cd ${buildir}
diff --git a/buildsystem/oraclebuild.sh b/buildsystem/oraclebuild.sh
new file mode 100644
index 0000000..a8d6f91
--- /dev/null
+++ b/buildsystem/oraclebuild.sh
@@ -0,0 +1,368 @@
+# !/bin/sh
+
+THIS=$0
+PROGNAME=`basename ${THIS}`
+CUR_DIR=`dirname ${THIS}`
+umask 0002
+TARGET=oracle
+TARG_NM="oracle"
+BRANCH=$1
+
+
+##-- Convert "BRANCH" to BRANCH_NM (version or trunk) and BRANCH (svn branch path)
+#    BRANCH_NM is used for reporting and naming purposes
+#    BRANCH    is used to quailify the actual Branch path
+if [ ! "${BRANCH}" = "" ]
+then
+    BRANCH_NM=${BRANCH}
+    BRANCH=branches/${BRANCH}/
+else
+    BRANCH_NM="trunk"
+fi
+
+echo "Target     ='${TARGET}'"
+echo "Target name='${TARG_NM}'"
+echo "Branch     ='${BRANCH}'"
+echo "Branch name='${BRANCH_NM}'"
+
+SVN_EXEC=`which svn`
+if [ $? -ne 0 ]
+then
+    echo "Cannot autofind svn executable. Using default value."
+    SVN_EXEC=/usr/local/bin/svn
+    if [ ! -f ${SVN_EXEC} ]
+    then
+        echo "Error finding svn install!"
+        exit 1
+    fi
+fi
+
+# safe temp directory
+tmp=${TMPDIR-/tmp}
+tmp=$tmp/somedir.$RANDOM.$RANDOM.$RANDOM.$$
+(umask 077 && mkdir $tmp) || {
+  echo "Could not create temporary directory! Exiting." 1>&2
+  exit 1
+}
+echo "results stored in: '${tmp}'"
+
+#Define common variables
+PUTTY_SESSION=eclipse-dev
+START_DATE=`date '+%y%m%d-%H%M'`
+DEFAULT_PREVREV=5400
+DEFAULT_PREVCOMMIT=5401
+#Directories
+HOME_DIR=/shared/rt/eclipselink
+JAVA_HOME=/usr/lib/jvm/java-6-sun
+ANT_HOME=/usr/share/ant
+LOG_DIR=${HOME_DIR}/logs
+ORACLE_ROOT=foundation/org.eclipse.persistence.oracle
+ORACLE_CI_DIR=foundation/plugins
+BRANCH_PATH=${HOME_DIR}/${BRANCH}trunk
+BLD_DEPS_DIR=${HOME_DIR}/bld_deps/${BRANCH_NM}
+#URLs
+HOME_URL=svnroot/rt/org.eclipse.persistence
+BRANCH_URL=${HOME_URL}/${BRANCH}trunk
+#Files
+BOOTSTRAP_BLDFILE=bootstrap.xml
+LOGFILE_NAME=bsb-${BRANCH_NM}_${TARG_NM}_${START_DATE}.log
+PREV_BUILD_REV_NAME=lastbuild-${BRANCH_NM}.dat
+DATED_LOG=${LOG_DIR}/${LOGFILE_NAME}
+PREVREV_FILE=${LOG_DIR}/${PREV_BUILD_REV_NAME}
+JDBC_LOGIN_INFO_FILE=${HOME_DIR}/db-${BRANCH_NM}.dat
+TEMP_FILE=${tmp}/SVNLOG-${BRANCH_NM}_${TARG_NM}_${START_DATE}.txt
+
+#Post-processing
+MAIL_EXEC=/usr/bin/mail
+MAILFROM=eric.gwin@oracle.com
+MAILLIST="ejgwin@gmail.com"
+SUCC_MAILLIST="eric.gwin@oracle.com"
+#FAIL_MAILLIST="eclipselink-dev@eclipse.org ejgwin@gmail.com"
+FAIL_MAILLIST="eric.gwin@oracle.com ejgwin@gmail.com"
+TESTDATA_FILE=${tmp}/testsummary-${BRANCH_NM}_${TARG_NM}.txt
+SVN_LOG_FILE=${tmp}/svnlog-${BRANCH_NM}_${TARG_NM}.txt
+PROJ_LOG_FILE=${tmp}/projlog-${BRANCH_NM}_${TARG_NM}.txt
+MAILBODY=${tmp}/mailbody-${BRANCH_NM}_${TARG_NM}.txt
+FailedNFSDir="/home/data/httpd/download.eclipse.org/rt/eclipselink/recent-failure-logs"
+BUILD_FAILED="false"
+TESTS_FAILED="false"
+
+#set -x
+#Define build dependency dirs (build needs em, NOT compile dependencies)
+JUNIT_HOME=${BLD_DEPS_DIR}/junit
+MAVENANT_DIR=${BLD_DEPS_DIR}/mavenant
+MAILLIB_DIR=${BRANCH_PATH}/foundation/eclipselink.core.lib
+
+PATH=${JAVA_HOME}/bin:${ANT_HOME}/bin:/usr/bin:/usr/local/bin:${PATH}
+OLD_CLASSPATH=${CLASSPATH}
+CLASSPATH=${JUNIT_HOME}/junit.jar:${ANT_HOME}/lib/ant-junit.jar:${MAILLIB_DIR}/mail.jar:${MAILLIB_DIR}/activation.jar:${MAVENANT_DIR}/maven-ant-tasks-2.0.8.jar
+
+#------- Subroutines -------#
+unset Usage
+Usage() {
+    echo "ERROR: Invalid usage detected!"
+    echo "USAGE: ./${PROGNAME} [branch]"
+}
+
+unset CreatePath
+CreatePath() {
+    #echo "Running CreateHome!"
+    newdir=
+    for directory in `echo $1 | tr '/' ' '`
+    do
+        newdir=${newdir}/${directory}
+        if [ ! -d "/${newdir}" ]
+        then
+            #echo "creating ${newdir}"
+            mkdir ${newdir}
+            if [ $? -ne 0 ]
+            then
+                echo "    Create failed!"
+                exit
+            fi
+        fi
+    done
+}
+
+#--------- MAIN --------#
+
+#Test for existence of dependencies, send email and fail if any of the above not found.
+if [ ! -d ${JAVA_HOME} ]
+then
+    echo "Java not found!"
+    echo "Expecting Java at: ${JAVA_HOME}"
+    JAVA_HOME=/shared/common/jdk1.6.0_05
+    if [ ! -d ${JAVA_HOME} ]
+    then
+        echo "Java not found!"
+        echo "Expecting Java at: ${JAVA_HOME}"
+        exit
+    else
+        echo "Java found at: ${JAVA_HOME}"
+    fi
+fi
+if [ ! -d ${ANT_HOME} ]
+then
+    echo "Ant not found!"
+    echo "Expecting Ant at: ${ANT_HOME}"
+    exit
+fi
+if [ ! -d ${HOME_DIR} ]
+then
+    echo "Need to create HOME_DIR (${HOME_DIR})"
+    CreatePath ${HOME_DIR}
+fi
+if [ ! -d ${LOG_DIR} ]
+then
+    echo "Need to create LOG_DIR (${LOG_DIR})"
+    CreatePath ${LOG_DIR}
+fi
+if [ ! -d ${BLD_DEPS_DIR} ]
+then
+    echo "Need to create BLD_DEPS_DIR (${BLD_DEPS_DIR})"
+    CreatePath ${BLD_DEPS_DIR}
+fi
+if [ ! -f $JDBC_LOGIN_INFO_FILE ]
+then
+    echo "No db Login info available!"
+    exit
+else
+    DB_USER=`cat $JDBC_LOGIN_INFO_FILE | cut -d'*' -f1`
+    DB_PWD=`cat $JDBC_LOGIN_INFO_FILE | cut -d'*' -f2`
+    DB_URL=`cat $JDBC_LOGIN_INFO_FILE | cut -d'*' -f3`
+    DB_NAME=`cat $JDBC_LOGIN_INFO_FILE | cut -d'*' -f4`
+fi
+
+#Set appropriate max Heap for VM and let Ant inherit JavaVM (OS's) proxy settings
+ANT_ARGS=" "
+ANT_OPTS="-Xmx512m"
+ANT_BASEARG="-f \"${BOOTSTRAP_BLDFILE}\" -Dbranch.name=\"${BRANCH}\" -Dsvn.server.name=eclipse-dev"
+
+export ANT_ARGS ANT_OPTS ANT_HOME BRANCH_PATH HOME_DIR LOG_DIR JAVA_HOME JUNIT_HOME MAVENANT_DIR PATH CLASSPATH
+export SVN_EXEC BLD_DEPS_DIR JUNIT_HOME TARGET BRANCH_NM
+
+cd ${HOME_DIR}
+echo "Results logged to: ${DATED_LOG}"
+touch ${DATED_LOG}
+
+echo "Testing if build is needed..." >> ${DATED_LOG}
+echo "Testing if build is needed..."
+if [ -f ${PREVREV_FILE} ]; then
+    PREV_REV=`cat ${PREVREV_FILE} | cut -d: -f1`
+    PREV_COMMIT=`cat ${PREVREV_FILE} | cut -d: -f2`
+fi
+if [ "${PREV_REV}" = "" ]; then PREV_REV=${DEFAULT_PREVREV}; fi
+if [ "${PREV_COMMIT}" = "" ]; then PREV_COMMIT=${DEFAULT_PREVCOMMIT}; fi
+# Test to make sure noone else checked in a new version of the oracle jars independant of this process
+svn log -q -r HEAD:${PREV_REV} svn+ssh://${PUTTY_SESSION}/${BRANCH_URL}/${ORACLE_CI_DIR} > ${TEMP_FILE} 
+PREV_COMMIT=`cat ${TEMP_FILE} | grep -m1 -v "\-\-\-" | cut -d' ' -f1 | cut -c 2-`
+echo "    previous Revs (Proj:Commit): '${PREV_REV}:${PREV_COMMIT}'" >> ${DATED_LOG}
+echo "    previous Revs (Proj:Commit): '${PREV_REV}:${PREV_COMMIT}'"
+svn log -q -r HEAD:${PREV_REV} svn+ssh://${PUTTY_SESSION}/${BRANCH_URL}/${ORACLE_ROOT} > ${TEMP_FILE} 
+CURRENT_REV=`cat ${TEMP_FILE} | grep -m1 -v "\-\-\-" | cut -d' ' -f1 | cut -c 2-`
+echo "    curProjRev: '${CURRENT_REV}'" >> ${DATED_LOG}
+echo "    curProjRev: '${CURRENT_REV}'"
+if [ "${CURRENT_REV}" -gt "${PREV_REV}" ]
+then
+    # Get Current view revision for later use
+    svn info ${BRANCH_PATH} > ${TEMP_FILE}
+    VIEW_REV=`cat ${TEMP_FILE} | grep -m1 Revision | cut -d: -f2 | tr -d ' '`
+    echo "    curViewRev: '${VIEW_REV}'"
+    # remove potential "conflicts"
+    echo "Cleanup previous build for new checkout..." >> ${DATED_LOG}
+    echo "Cleanup previous build for new checkout..."
+    rm -f ${BRANCH_PATH}/eclipselink*
+    rm -f ${BRANCH_PATH}/${ORACLE_CI_DIR}/org.eclipse.persistence.oracle*
+    echo "Retrieving latest source from subversion..." >> ${DATED_LOG}
+    echo "Retrieving latest source from subversion..."
+    svn co --non-interactive svn+ssh://${PUTTY_SESSION}/${BRANCH_URL} ${BRANCH_PATH}
+    # Get Current view revision for later use
+    svn info ${BRANCH_PATH} > ${TEMP_FILE}
+    NEW_VIEW_REV=`cat ${TEMP_FILE} | grep -m1 Revision | cut -d: -f2 | tr -d ' '`
+    echo "    newViewRev: '${NEW_VIEW_REV}' (If matches SVN_REV can remove some postprocessing code)."
+    echo "Copying latest ${BOOTSTRAP_BLDFILE} for build..." >> ${DATED_LOG}
+    echo "Copying latest ${BOOTSTRAP_BLDFILE} for build..."
+    cp ${BRANCH_PATH}/buildsystem/${BOOTSTRAP_BLDFILE} ./${BOOTSTRAP_BLDFILE}
+    echo "Oracle Extension Build started at: `date`" >> ${DATED_LOG}
+    echo "Oracle Extension Build started."
+    echo "ant ${ANT_BASEARG} ${TARGET}" >> ${DATED_LOG}
+    ant ${ANT_BASEARG} -Ddb.user="${DB_USER}" -Ddb.pwd="${DB_PWD}" -Ddb.url="${DB_URL}" ${TARGET} >> ${DATED_LOG} 2>&1
+    echo "Build completed at: `date`" >> ${DATED_LOG}
+    echo "Build completed."
+    echo "Updating Revision info..." >> ${DATED_LOG}
+    echo "Updating Revision info..."
+    svn log -q -r HEAD:${PREV_REV} svn+ssh://${PUTTY_SESSION}/${BRANCH_URL}/${ORACLE_CI_DIR} > ${TEMP_FILE} 
+    COMMIT_REV=`cat ${TEMP_FILE} | grep -m1 -v "\-\-\-" | cut -d' ' -f1 | cut -c 2-`
+    echo "    Commit revisions (New:Prev): '${COMMIT_REV}:${PREV_COMMIT}'" >> ${DATED_LOG}
+    echo "    Commit revisions (New:Prev): '${COMMIT_REV}:${PREV_COMMIT}'"
+    if [ "${COMMIT_REV}" -gt "${PREV_COMMIT}" ]
+    then
+        COMMIT=true
+        echo "${CURRENT_REV}:${COMMIT_REV}" > ${PREVREV_FILE}
+        echo "   New revision info stored, commit appears to have completed successfully." >> ${DATED_LOG}
+        echo "   New revision info stored, commit appears to have completed successfully."
+    else
+        echo "   It appears there was no commit. Aborting Revision update..." >> ${DATED_LOG}
+        echo "   It appears there was no commit. Aborting Revision update..."
+    fi
+
+    #----------- Post-processing ------------#
+    #----------------------------------------#
+    echo "Beginning Post-Build processing..."
+    ## find the current version (cannot use $BRANCH, because need current version stored in ANT buildfiles)
+    ##
+    VERSION=`cat ${DATED_LOG} | grep -m1 "EL version" | cut -d= -f2 | tr -d '\047'`
+    SVN_REV=`cat ${DATED_LOG} | grep -m1 "svn.revision" | cut -d= -f2 | tr -d '\047'`
+    echo "Generating summary email for ${VERSION} build..."
+    echo "    Revision info (project code:built using:artifact ci): '${CURRENT_REV}:${SVN_REV}:${COMMIT_REV}'"
+    echo "    DEBUG: SVN_REV: '${SVN_REV}'"
+
+    echo "Getting View transaction log..."
+    ## fixup the revision of the previous view to not include itself
+    ##
+    if [ ! "$VIEW_REV" = "" ]
+    then
+        ## Include everything but the revision of the last build (jump 1 up from it)
+        PREV_VIEW=`expr "${VIEW_REV}" + "1"`
+        ## Prepend the ":" for the "to" syntax of the "svn log" command
+        PREV_VIEW=:${PREV_VIEW}
+    else
+        echo "    ERROR: What the heck's going on here? There's no VIEW_REV?"
+    fi
+    echo "    change log will be from the current retrieved codebase to earliest"
+    echo "    not previously checked-out (${SVN_REV}${PREV_VIEW}) inclusive."
+    ## Generate transaction log for latest build
+    ##
+    svn log -q -r ${SVN_REV}${PREV_VIEW} -v  svn+ssh://${PUTTY_SESSION}/${BRANCH_URL} >> ${SVN_LOG_FILE}
+
+    echo "Getting  Project transaction log..."
+    ## fixup the revision of the last project build to not include itself
+    ##
+    if [ ! "$PREV_REV" = "" ]
+    then
+        ## Include everything but the revision of the last build (jump 1 up from it)
+        OLDEST_TRAN=`expr "${PREV_REV}" + "1"`
+        ## Prepend the ":" for the "to" syntax of the "svn log" command
+        OLDEST_TRAN=:${OLDEST_TRAN}
+    else
+        echo "    ERROR: What the heck's going on here? There's no PREV_REV?"
+    fi
+    echo "    change log will be from latest project transaction to earliest"
+    echo "    not previously built (${CURRENT_REV}${OLDEST_TRAN}) inclusive."
+    ## Generate transaction log for oracle project changes
+    ##
+    svn log -q -r ${CURRENT_REV}${OLDEST_TRAN} -v  svn+ssh://${PUTTY_SESSION}/${BRANCH_URL}/${ORACLE_ROOT} >> ${PROJ_LOG_FILE}
+
+    ## Verify Compile complete
+    ## if [ not build failed ]
+    ##
+    echo "Verifying build status..."
+    if [ ! "`tail ${DATED_LOG} | grep 'BUILD SUCCESSFUL'`" = "" ]
+    then
+        echo "    Build was successful."
+        MAIL_SUBJECT="${BRANCH_NM} Oracle Extension Nightly build complete."
+        MAILLIST=${SUCC_MAILLIST}
+    else
+        echo "    Build had issues to be resolved."
+        MAIL_SUBJECT="${BRANCH_NM} Oracle Extension Nightly build failed!"
+        MAILLIST=${FAIL_MAILLIST}
+    fi
+    
+    ## Build Body text of email
+    ##
+    if [ -f ${MAILBODY} ]; then rm ${MAILBODY}; fi
+    echo "Build summary for o.e.p.oracle project revision ${CURRENT_REV} (Full codebase rev '${SVN_REV}')." > ${MAILBODY}
+    echo "-----------------------------------" >> ${MAILBODY}
+    echo "Full Build log can be found on the Oracle Build machine at:" >> ${MAILBODY}
+    echo "    ${DATED_LOG}" >> ${MAILBODY}
+    echo "-----------------------------------" >> ${MAILBODY}
+    if [ "${COMMIT}" = "true" ]; then
+        echo "This build of Oracle Extension committed as Revision ${COMMIT_REV}" >> ${MAILBODY}
+        echo "-----------------------------------" >> ${MAILBODY}
+    fi
+    echo "" >> ${MAILBODY}
+    echo "Project Changes since Last Build:" >> ${MAILBODY}
+    cat ${PROJ_LOG_FILE} >> ${MAILBODY}
+    echo "View Changes since Last Build:" >> ${MAILBODY}
+    cat ${SVN_LOG_FILE} >> ${MAILBODY}
+
+    ## Send result email
+    ##
+    echo "Sending email..."
+    cat ${MAILBODY} | ${MAIL_EXEC} -user=${MAILFROM} --subject="BUILD STATUS:: ${MAIL_SUBJECT}" ${MAILLIST}
+    if [ $? -eq 0  ]
+    then
+       echo "     complete."
+    else
+       echo "     failed."
+    fi
+
+    echo "Printing Project Transaction log..."
+    echo " "
+    cat ${PROJ_LOG_FILE}
+    echo "#####################################################################"
+    echo "Printing Transaction log for Build View..."
+    cat ${SVN_LOG_FILE}
+else
+    echo "Oracle Extension Nightly build aborted... no code changes" >> ${DATED_LOG}
+    echo "Oracle Extension Nightly build aborted... no code changes"
+    if [ -f ${MAILBODY} ]; then rm ${MAILBODY}; fi
+    echo "Because no changes to the repository were detected." > ${MAILBODY}
+    echo " " >> ${MAILBODY}
+    echo "The build log can be found at: ${DATED_LOG}" >> ${MAILBODY}
+    MAIL_SUBJECT="${BRANCH_NM} Oracle Extension Nightly build aborted."
+    MAILLIST=${SUCC_MAILLIST}
+
+    echo "Sending 'Oracle Nightly Aborted' email..."
+    cat ${MAILBODY} | ${MAIL_EXEC} --user=${MAILFROM} --subject="BUILD STATUS:: ${MAIL_SUBJECT}" ${MAILLIST}
+    if [ $? -eq 0  ]
+    then
+       echo "     complete."
+    else
+       echo "     failed."
+    fi
+fi
+
+rm -rf $tmp
+#----------------------------------------#
+CLASSPATH=${OLD_CLASSPATH}