blob: be34eb3f70101269b476bf1ebda37d4a9777af45 [file] [log] [blame]
<project name="Helper targets" default="noDefault" basedir="." >
<property name="postingDirectory" value="${buildDirectory}" />
<property name="publishingContent" value="${eclipse.build.configs}/../publishingFiles"/>
<!-- ===================================================================== -->
<!-- Set of helper targets for building the Eclipse SDK -->
<!-- ===================================================================== -->
<target name="discoverOS">
<condition property="onUnix">
<and>
<os family="unix" />
</and>
</condition>
<condition property="onWindows">
<and>
<os family="windows" />
</and>
</condition>
</target>
<target name="printWarnings" if="onWindows" depends="discoverOS">
<echo message="The UNIX versions of your build output will be invalid. Windows will not preserve symbolic links and permissions on executable files." />
</target>
<target name="setLabels">
<!--required-->
<!-- setup the label.properties file packaged in the source builds. -->
<!--Set this property to empty string-->
<property name="buildType" value="" />
<tstamp>
<format property="TODAY" pattern="MMMM d, yyyy" />
<format property="TSTAMP" pattern="HHmm" />
</tstamp>
<copy file="label.properties.template" tofile="${buildDirectory}/label.properties" overwrite="true" />
<replace file="${buildDirectory}/label.properties" token="@builddate@" value="${TODAY}" />
<replace file="${buildDirectory}/label.properties" token="@buildtype@" value="${buildType}" />
<replace file="${buildDirectory}/label.properties" token="@ds@" value="${timestamp}" />
<replace file="${buildDirectory}/label.properties" token="@buildid@" value="${buildId}" />
</target>
<target name="generateChecksum" unless="skipChecksum">
<checksum file="${archiveFullPath}" property="md5" />
<echo message="${md5} *${downloadFile}" file="${postingDirectory}/${buildLabel}/checksum/${downloadFile}.md5" />
</target>
<target name="publish" description="Preparing to post the build...">
<!--post clickThroughs-->
<copy todir="${postingDirectory}/${buildLabel}">
<fileset dir="${buildDirectory}/maps/org.eclipse.releng" includes="clickThroughs/" />
</copy>
<!--post directory.txt-->
<copy file="${buildDirectory}/directory.txt" todir="${postingDirectory}/${buildLabel}" />
<!--post instructions on automated testing-->
<copy file="${eclipse.build.configs}/sdk.tests/testScripts/readme.html" tofile="${postingDirectory}/${buildLabel}/automatedtesting.html" />
<copy file="${buildDirectory}/plugins/org.eclipse.test/testframework.html" tofile="${postingDirectory}/${buildLabel}/testframework.html" />
<antcall target="generateEclipseIndex" />
<!--get static files required in the buildLabel directory-->
<copy todir="${postingDirectory}/${buildLabel}">
<fileset dir="${publishingContent}/staticDropFiles" />
</copy>
<!--copy buildnotes from plugin directories-->
<mkdir dir="${postingDirectory}/${buildLabel}/buildnotes" />
<copy todir="${postingDirectory}/${buildLabel}/buildnotes" flatten="true">
<fileset dir="${buildDirectory}/plugins" includes="**/buildnotes_*.html,**/buildnotes_*.htm,**/jdt_core_style.css" />
</copy>
<!--copy javadoc logs-->
<copy file="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/doc.bin.log" tofile="${postingDirectory}/${buildLabel}/compilelogs/platform.doc.isv.javadoc.txt" failonerror="false" />
<copy file="${buildDirectory}/plugins/org.eclipse.jdt.doc.isv/doc.bin.log" tofile="${postingDirectory}/${buildLabel}/compilelogs/jdt.doc.isv.javadoc.txt" failonerror="false" />
<copy file="${buildDirectory}/plugins/org.eclipse.jdt.doc.isv/jdtapt.doc.bin.log" tofile="${postingDirectory}/${buildLabel}/compilelogs/jdt.apt.javadoc.txt" failonerror="false" />
<copy file="${buildDirectory}/plugins/org.eclipse.pde.doc.user/doc.bin.log" tofile="${postingDirectory}/${buildLabel}/compilelogs/pde.doc.user.javadoc.txt" failonerror="false" />
<copy file="${buildDirectory}/plugins/org.eclipse.platform.doc.isv/platformconvert.txt" tofile="${postingDirectory}/${buildLabel}/compilelogs/platform.doc.isv.schema.txt" failonerror="false" />
<copy file="${buildDirectory}/plugins/org.eclipse.jdt.doc.isv/jdtconvert.txt" tofile="${postingDirectory}/${buildLabel}/compilelogs/jdt.doc.isv.schema.txt" failonerror="false" />
<copy file="${buildDirectory}/plugins/org.eclipse.pde.doc.user/pdeconvert.txt" tofile="${postingDirectory}/${buildLabel}/compilelogs/pde.doc.user.schema.txt" failonerror="false" />
</target>
<!-- ===================================================================== -->
<!-- Target used to test the build -->
<!-- ===================================================================== -->
<target name="testAll" unless="skip.tests">
<waitfor maxwait="4" maxwaitunit="hour" checkevery="1" checkeveryunit="minute">
<and>
<available file="${postingDirectory}/${buildLabel}/checksum/eclipse-Automated-Tests-${buildId}.zip.md5"/>
<available file="${postingDirectory}/${buildLabel}/checksum/eclipse-SDK-${buildId}-win32.zip.md5"/>
<available file="${postingDirectory}/${buildLabel}/checksum/eclipse-SDK-${buildId}-linux-gtk.tar.gz.md5"/>
<available file="${postingDirectory}/${buildLabel}/checksum/eclipse-SDK-${buildId}-macosx-carbon.tar.gz.md5"/>
</and>
</waitfor>
<property name="cvstest.properties" value="${base.builder}/../eclipseInternalBuildTools/cvstest.properties" />
<antcall target="configure.team.cvs.test"/>
<!--replace buildid in vm.properties for JVM location settings-->
<replace dir="${eclipse.build.configs}/sdk.tests/testConfigs"
token="@buildid@"
value="${buildId}"
includes="**/vm.properties"/>
<parallel>
<antcall target="test-JUnit" />
<antcall target="test-performance" />
</parallel>
</target>
<target name="test-JUnit">
<echo message="Starting tests." />
<property name="dropLocation" value="${postingDirectory}" />
<ant antfile="testAll.xml" dir="${eclipse.build.configs}/sdk.tests/testConfigs" />
<antcall target="generateEclipseIndex" />
<!--copy the test results and new index page to the posting location-->
<copy todir="${postingDirectory}/${buildLabel}" overwrite="true">
<fileset dir="${buildDirectory}/${buildLabel}" includes="testresults/**,*.php" />
</copy>
<replace file="${postingDirectory}/${buildLabel}/testResults.php" token="@build@" value="${buildId}" />
</target>
<!-- ===================================================================== -->
<!-- Target used to test the build -->
<!-- ===================================================================== -->
<target name="test-performance" unless="skip.performance.tests">
<echo message="Starting performance tests." />
<property name="dropLocation" value="${postingDirectory}" />
<ant antfile="testAll.xml" dir="${eclipse.build.configs}/sdk.tests/testConfigs" target="performanceTests" />
<antcall target="generatePerformanceResults" />
</target>
<!-- ===================================================================== -->
<!-- Target used to test the build for internal references -->
<!-- ===================================================================== -->
<target name="test-internalReferences">
<waitfor maxwait="4" maxwaitunit="hour" checkevery="1" checkeveryunit="minute">
<available file="${postingDirectory}/${buildLabel}/checksum/eclipse-SDK-${buildId}-win32.zip.md5"/>
</waitfor>
<property name="apiscanner" value="${eclipse.build.configs}/sdk/tools/apiscanner" />
<property name="workingDir" value="${buildDirectory}/internalReference" />
<mkdir dir="${workingDir}" />
<unzip src="${postingDirectory}/${buildLabel}/eclipse-SDK-${buildId}-win32.zip" dest="${workingDir}" />
<java classname="org.eclipse.wtp.releng.tools.component.violation.ComponentViolationEmitter" fork="true" dir="${apiscanner}">
<arg line="
-eclipseDir ${workingDir}/eclipse
-compXMLDir ${buildDirectory}/plugins
-compRefDir component-ref
-compVioDir ${postingDirectory}/${buildLabel}/internalReference
-xsl xsl/component-violation.xsl
-summaryXSL xsl/component-violation-summary.xsl" />
<classpath>
<fileset dir="${apiscanner}/lib" />
</classpath>
</java>
</target>
<!-- ===================================================================== -->
<!-- Helper targets -->
<!-- ===================================================================== -->
<target name="configure.team.cvs.test" unless="test.xml.tmp" if="cvstest.properties">
<copy file="${eclipse.build.configs}/sdk.tests/testScripts/test.xml" tofile="${eclipse.build.configs}/sdk.tests/testScripts/test.xml.tmp" />
<replace file="${eclipse.build.configs}/sdk.tests/testScripts/test.xml" propertyFile="${cvstest.properties}">
<replacefilter token="${cvs_user}" property="cvs_user" />
<replacefilter token="${cvs_password}" property="cvs_password" />
<replacefilter token="${cvs_host}" property="cvs_host" />
<replacefilter token="${cvs_root}" property="cvs_root" />
</replace>
<delete file="${eclipse.build.configs}/sdk.tests/testScripts/test.xml.tmp" />
</target>
<target name="generatePerformanceResults">
<mkdir dir="${buildDirectory}/${buildLabel}/performance" />
<mkdir dir="${postingDirectory}/${buildLabel}/performance" />
<taskdef name="performanceResults" classname="org.eclipse.releng.performance.PerformanceResultHtmlGenerator" />
<condition property="configArgs" value="-ws gtk -arch ppc">
<not>
<equals arg1="{os.arch}" arg2="i386" />
</not>
</condition>
<property name="configArgs" value="" />
<java jar="${basedir}/../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar" fork="true" maxmemory="256m">
<arg line="${configArgs} -application org.eclipse.test.performance.ui.resultGenerator
-baseline ${eclipse.perf.ref}
-baseline.prefix 3.2_200606291905
-current ${buildId}
-jvm ${eclipse.perf.jvm}
-output ${postingDirectory}/${buildLabel}/performance/
-config eclipseperfwin1_R3.3,eclipseperflnx1_R3.3,eclipseperfwin2_R3.3,eclipseperflnx2_R3.3,eclipseperflnx3_R3.3
-config.properties ${eclipse.perf.config.descriptors}
-scenario.pattern org.eclipse.%.test"
/>
<!-- add this argument to list above when there are milestone builds to highlight
-highlight.latest 3.3M1_
-->
<env key="LD_LIBRARY_PATH" value="${basedir}/../org.eclipse.releng.basebuilder" />
<sysproperty key="eclipse.perf.dbloc" value="${dbloc}" />
</java>
<performanceResults
xmlDirectoryName="${postingDirectory}/${buildLabel}/performance/xml"
dropDirectoryName="${postingDirectory}/${buildLabel}"
testResultsTemplateFileName="${publishingContent}/templateFiles/performance.php.template"
testResultsHtmlFileName="performance/performance.php"
hrefTestResultsTargetPath="html"
testManifestFileName="${publishingContent}/performanceTestManifest.xml"
/>
<replace file="${postingDirectory}/${buildLabel}/performance/performance.php" token="@buildType@" value="${buildType}" />
</target>
<target name="verifyCompile" if="eclipse.running">
<echo message="Checking for compile errors..." />
<echo message="Log file directory: ${postingDirectory}/${buildId}/compilelogs" />
<!--create html output for compile logs-->
<echo message="${postingDirectory}/${buildId}/compilelogs/plugins"/>
<eclipse.convert input="${postingDirectory}/${buildId}/compilelogs/plugins" validation="true"/>
<!-- Sends email to recipient list in monitor.properties with compile logs attached if errors found-->
<!-- The shell scripts will gather compile error plugin list into monitor.properties -->
<!--
<echo message="${eclipse.build.configs}/../../extras/verifyCompile.sh"/>
<exec executable="${eclipse.build.configs}/../../extras/verifyCompile.sh">
<arg value="${postingDirectory}/${buildId}/compilelogs"/>
</exec>
-->
<echo message="start check compile error"/>
<antcall target="verifyCompileUtil"/>
<antcall target="checkCompileError"/>
</target>
<target name="checkUtilExists">
<available file="${eclipse.build.configs}/../../extras/org.eclipse.birt.build_2.2.0.jar"
property="isFileAvail"/>
</target>
<target name="verifyCompileUtil" depends="checkUtilExists" if="isFileAvail">
<path id="customjar.classpath">
<fileset dir="${eclipse.build.configs}/../../extras/">
<include name="*.jar"/>
</fileset>
<fileset dir="${buildDirectory}/plugins">
<include name="org.apache.xerces_*.jar"/>
</fileset>
</path>
<!-- Using custom build tools to get failure/error summary of test result -->
<java classname="org.eclipse.birt.build.VerifyCompileUtils" output="${eclipse.build.configs}/../../verifyCompile.log">
<classpath refid="customjar.classpath" />
<arg value="${postingDirectory}/${buildId}/compilelogs/plugins" />
<arg value="${eclipse.build.configs}/../../monitor.properties" />
</java>
</target>
<target name="rSyncWithSnzZrh" unless="test">
<waitfor maxwait="300" maxwaitunit="minute" checkevery="1" checkeveryunit="minute">
<available file="${postingDirectory}/${buildId}/eclipse-Automated-Tests-${buildId}.zip" />
</waitfor>
<antcall target="zrhBuilds" />
<antcall target="snzBuilds" />
</target>
<target name="snzBuilds">
<!--copy drops to local directory for rsync with snz-->
<copy todir="/builds/transfer/files/snz">
<fileset dir="${postingDirectory}" includes ="${buildId}/eclipse-SDK-*-win32.zip,${buildId}/eclipse-SDK-*-linux-gtk.tar.gz" excludes="${buildId}/eclipse-SDK-examples-*-win32.zip" />
</copy>
</target>
<target name="zrhBuilds">
<!--copy drops to local directory for rsync with zrh-->
<copy todir="/builds/transfer/files/zrh">
<fileset dir="${postingDirectory}" includes ="${buildId}/eclipse-SDK-*-macosx-carbon.tar.gz,${buildId}/eclipse-SDK-*-win32.zip,${buildId}/eclipse-SDK-*-linux-*.tar.gz" excludes="${buildId}/eclipse-SDK-examples-*-win32.zip,${buildId}/eclipse-SDK-*-linux-gtk-x86_64.tar.gz,${buildId}/eclipse-SDK-*-linux-gtk-ppc.tar.gz" />
</copy>
</target>
<!-- ===================================================================== -->
<!-- Default target -->
<!-- ===================================================================== -->
<target name="noDefault">
<echo message="You must specify a target when invoking this file" />
</target>
<target name="buildUpdateJars">
<property name="updateJarWorkingDir" value="${buildDirectory}/updateJars" />
<mkdir dir="${updateJarWorkingDir}" />
<mkdir dir="${updateJarWorkingDir}/site" />
<!--eclipse-master-${buildId}.bak.zip contains the signed update jars. eclipse-master-${buildId}.zip contains the
features and plug-ins unpacked. Need features in directory structures for tool to work. -->
<unzip src="${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.zip" dest="${updateJarWorkingDir}" />
<!--operation on creates update jars for features and for plug-ins which are to be unpacked when installed-->
<java classname="org.eclipse.releng.generators.UpdateBuilder" >
<arg line="-root ${updateJarWorkingDir}/eclipse -directory ${buildDirectory}/directory.txt -build ${buildId} -site ${updateJarWorkingDir}/site -sitexml ${updateSite}/site.xml" />
<classpath>
<pathelement location="${base.builder}/plugins/org.eclipse.internal.build.tools/internalTools.jar"/>
<pathelement location="${base.builder}/plugins/org.eclipse.build.tools/buildTools.jar"/>
<pathelement location="${base.builder}/plugins/org.eclipse.osgi_3.2.0.v20060601.jar"/>
</classpath>
</java>
<!--store previous site.xml-->
<move file="${updateSite}/site.xml" tofile="${updateSite}/site.xml.bak" overwrite="true" />
<!--copy site.xml to update site-->
<copy todir="${updateSite}" overwrite="true">
<fileset dir="${updateJarWorkingDir}/site" includes="site.xml" />
</copy>
<mkdir dir="${updateSite}/features" />
<mkdir dir="${updateSite}/plugins" />
<!--use original signed update jars-->
<!-- back up
<exec executable="unzip" dir=".">
<arg line="-j ${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.bak.zip -i */features/* -x */master-equinox* */com.ibm.icu.base* -d ${updateSite}/features" />
</exec>
-->
<exec executable="unzip" dir=".">
<arg line="-j ${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.bak.zip -i */features/* -d ${updateSite}/features" />
</exec>
<java jar="${eclipse.home}/startup.jar"
fork="true"
jvm="${java15-home}/bin/java"
failonerror="true"
maxmemory="128m"
dir="${buildDirectory}">
<arg line="-application org.eclipse.update.core.siteOptimizer"/>
<arg line="-digestBuilder -digestOutputDir=${updateSite} -siteXML=${updateSite}/site.xml"/>
</java>
</target>
<target name="cleanSites">
<cleanSite ageInMinutes="1440" directoryName="/builds/transfer/files/master/downloads/drops" realDelete="true" />
<cleanSite ageInMinutes="1440" directoryName="/builds/transfer/files/master/equinox/drops/" realDelete="true" />
<cleanSite ageInMinutes="1440" directoryName="/builds/transfer/files/bogus/downloads/drops" realDelete="true" />
<cleanSite ageInMinutes="1440" directoryName="/builds/transfer/files/zrh" realDelete="true" />
<cleanSite ageInMinutes="1440" directoryName="/builds/transfer/files/snz" realDelete="true" />
</target>
<target name="CheckoutFromP4" depends="init">
<!-- check out org.eclipse.releng -->
<!-- check out version control files -->
<property file="${eclipse.build.configs}/../../config.properties"/>
<echo message="p4.workspace=${p4.workspace}"/>
<echo message="p4.home=${p4.home}"/>
<echo message="p4.client=${p4.client}"/>
<delete dir="${p4.workspace}/Development/JRP/Dev/build" failonerror="false" />
<mkdir dir="${p4.workspace}/Development/JRP/Dev/build" />
<delete dir="${p4.home}/CvsDiff" failonerror="false"/>
<delete dir="${p4.home}/reportTestsLib" failonerror="false"/>
<!-- checkout the package to checkout.dir -->
<echo message="checking out daily build scripts" />
<!-- //${p4.client}/Development/JRP/Dev/build/sampleReports/...
//${p4.client}/Development/JRP/Dev/build/cvsDiff/...
-->
<p4sync view="//${p4.client}/Development/JRP/Dev/build/script/...
//${p4.client}/Development/JRP/Dev/build/lib/...
//${p4.client}/Development/JRP/Dev/build/AutomationLib/...
//${p4.client}/Development/JRP/Dev/birt/org.eclipse.birt.report.data.oda.jdbc/jdbc-drivers/..."
port="${p4.port}"
user="${p4.user}"
globalopts="-P ${p4.passwd}"
failonerror="true"
force="true" />
<copy todir="${p4.home}/reportTestsLib" overwrite="true" failonerror="true">
<fileset dir="${p4.workspace}/Development/JRP/Dev/build/AutomationLib"/>
</copy>
<copy todir="${p4.home}/drivers" overwrite="true" failonerror="true">
<fileset dir="${p4.workspace}/Development/JRP/Dev/birt/org.eclipse.birt.report.data.oda.jdbc/jdbc-drivers"/>
</copy>
<!--
<copy todir="${p4.home}/CvsDiff" overwrite="true" failonerror="true">
<fileset dir="${p4.workspace}/Development/JRP/Dev/build/cvsDiff"/>
</copy>
-->
<copy todir="${p4.home}/../PackageFiles/template" overwrite="true" failonerror="true">
<fileset dir="${p4.workspace}/Development/JRP/Dev/build/script/template">
<include name="**"/>
</fileset>
</copy>
</target>
<target name="backupSrc">
</target>
<target name="cleanBuild">
<echo message="clean up last input under ${buildDirectory} ..." />
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${buildDirectory}">
<include name="*.properties"/>
<include name="*.txt"/>
<include name="*.xml"/>
<include name="plugins/**"/>
<include name="features/**"/>
<include name="maps/source"/>
</fileset>
</delete>
<delete failonerror="false" includeemptydirs="true">
<fileset dir="${p4.home}">
<include name="source/**"/>
<include name="CvsResult/*.xml"/>
<include name="CvsResult/DaysInPast/*.xml"/>
</fileset>
</delete>
</target>
<target name="init">
<echo message="loading ${eclipse.build.configs}/../../build.properties ..."/>
<property file="${eclipse.build.configs}/../../build.properties"/>
</target>
<target name="getDTPDownloads" depends="init">
<tstamp prefix="timestamp">
<format property="TODAY_US" pattern="MMddyy" timezone="GMT-16"/>
<format property="TODAY_SH" pattern="MMddyy" />
</tstamp>
<property name="plugin-dest" value="${baseLocation}"/>
<property name="package-dest" value="${baseLocation}/../PackageFiles"/>
<property name="AllInOne-dest" value="${baseLocation}/../PackageFiles/AllInOne"/>
<property name="AllInOne-Linux-dest" value="${baseLocation}/../PackageFiles/AllInOne-Linux"/>
<property name="file-version" value="${file-prefix}${timestamp.TODAY_US}"/>
<get src="http://download.eclipse.org/datatools/downloads/drops/N_DTP_1.6/${file-version}.zip" dest="${postingDirectory}/../platform/DTP/${file-version}.zip" verbose="true" usetimestamp="true" />
<echo message="START to Unzip the downloaded Plugins files" />
<unzip src="${postingDirectory}/../platform/DTP/${file-version}.zip" dest="${p4.home}/downloads/${file-version}"/>
<echo message="Clean last download stuff" />
<delete includeemptydirs="true" failonerror="false">
<fileset dir="${plugin-dest}/plugins" >
<include name="*.datatools.*.jar" />
<include name="org.eclipse.datatools.*/**" />
<include name="org.apache.xerces_*.jar"/>
<include name="org.apache.xml.resolver_*.jar"/>
<include name="javax.wsdl_*.jar"/>
</fileset>
<fileset dir="${plugin-dest}/features" >
<include name="org.eclipse.datatools.*/**" />
</fileset>
<fileset dir="${package-dest}/dtp/eclipse/plugins" >
<include name="*.datatools.*.jar" />
<include name="org.eclipse.datatools.*/**" />
<include name="org.apache.xerces_*.jar"/>
<include name="org.apache.xml.resolver_*.jar"/>
<include name="javax.wsdl_*.jar"/>
</fileset>
<fileset dir="${package-dest}/dtp/eclipse/features" >
<include name="org.eclipse.datatools.*/**" />
</fileset>
<!-- =============================
<fileset dir="${AllInOne-dest}/eclipse/plugins" >
<include name="*.datatools.*.jar" />
<include name="org.eclipse.datatools.*/**" />
<include name="org.apache.xerces_*.jar"/>
<include name="org.apache.xml.resolver_*.jar"/>
<include name="javax.wsdl_*.jar"/>
</fileset>
<fileset dir="${AllInOne-dest}/eclipse/features" >
<include name="org.eclipse.datatools.*/**" />
</fileset>
<fileset dir="${AllInOne-Linux-dest}/eclipse/plugins" >
<include name="*.datatools.*.jar" />
<include name="org.eclipse.datatools.*/**" />
<include name="org.apache.xerces_*.jar"/>
<include name="org.apache.xml.resolver_*.jar"/>
<include name="javax.wsdl_*.jar"/>
</fileset>
<fileset dir="${AllInOne-Linux-dest}/eclipse/features" >
<include name="org.eclipse.datatools.*/**" />
</fileset>
====================================== -->
</delete>
<!--Define the ODA dependency plugins-->
<patternset id="oda.runtime.plugins">
<include name="org.eclipse.datatools.connectivity_*.jar" />
<include name="org.eclipse.datatools.connectivity.ui_*.jar" />
<include name="org.eclipse.datatools.connectivity.ui.dse_*.jar" />
<include name="org.eclipse.datatools.doc.user_*/**"/>
<include name="org.eclipse.datatools.connectivity.oda.consumer_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda.design.ui_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda.design_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda.flatfile.ui_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda.flatfile_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda.profile_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda_*.jar" />
<include name="org.eclipse.datatools.connectivity.oda.designer.finfo_*.jar"/>
<include name="org.eclipse.datatools.connectivity.oda.finfo_*.jar"/>
<include name="org.eclipse.datatools.connectivity.oda.template.ui_*.jar"/>
<include name="org.eclipse.datatools.enablement.oda.xml_*.jar"/>
<include name="org.eclipse.datatools.enablement.oda.xml.ui_*.jar"/>
<include name="org.eclipse.datatools.enablement.oda.designer.finfo_*.jar"/>
<include name="org.eclipse.datatools.enablement.oda.finfo_*.jar"/>
<include name="org.eclipse.datatools.oda.cshelp_*.jar"/>
<include name="org.eclipse.datatools.enablement.oda.ws.ui_*.jar"/>
<include name="org.eclipse.datatools.enablement.oda.ws_*.jar"/>
<include name="org.eclipse.datatools.help_*.jar"/>
<include name="org.eclipse.datatools.doc.isv_*.jar"/>
<include name="org.apache.xerces_*.jar"/>
<include name="org.apache.xml.resolver_*.jar"/>
<include name="javax.wsdl_*.jar"/>
</patternset>
<patternset id="oda.runtime.features">
<include name="org.eclipse.datatools.connectivity.oda.designer.feature_*/**" />
<include name="org.eclipse.datatools.connectivity.oda.feature_*/**" />
<include name="org.eclipse.datatools.enablement.oda.feature_*/**" />
<include name="org.eclipse.datatools.enablement.oda.designer.feature_*/**" />
<include name="org.eclipse.datatools.doc.user_*/**"/>
</patternset>
<!-- Copy to static baseLocation -->
<copy todir="${plugin-dest}/plugins" failonerror="false" >
<fileset dir="${p4.home}/downloads/${file-version}/eclipse/plugins">
<patternset refid="oda.runtime.plugins" />
</fileset>
</copy>
<copy todir="${plugin-dest}/features" failonerror="false" >
<fileset dir="${p4.home}/downloads/${file-version}/eclipse/features">
<patternset refid="oda.runtime.features" />
</fileset>
</copy>
<!-- Copy to package files dir -->
<copy todir="${package-dest}/dtp/eclipse/plugins" failonerror="false">
<fileset dir="${p4.home}/downloads/${file-version}/eclipse/plugins">
<patternset refid="oda.runtime.plugins" />
</fileset>
</copy>
<copy todir="${package-dest}/dtp/eclipse/features" failonerror="false" >
<fileset dir="${p4.home}/downloads/${file-version}/eclipse/features">
<patternset refid="oda.runtime.features" />
</fileset>
</copy>
</target>
<!-- Build BIRT Web Viewer -->
<target name="BuildWebViewer" depends="init">
<mkdir dir="${buildDirectory}/${buildId}/birt_web"/>
<ant antfile="WebViewerPackager.xml" dir="${buildDirectory}/plugins/org.eclipse.birt.report.viewer" target="Jar">
<property name="integrate.dir" value="${buildDirectory}/${buildId}/eclipse"/>
<property name="baseLocation.emf" value="${baseLocation.emf}"/>
</ant>
<ant antfile="WebViewerPackager.xml" dir="${buildDirectory}/plugins/org.eclipse.birt.report.viewer" target="Export">
<property name="export.dir" value="${buildDirectory}/${buildId}/birt_web"/>
</ant>
<!-- copy extra chartengine and emf -->
<!--
<copy todir="${buildDirectory}/${buildId}/birt_web/org.eclipse.birt.report.viewer/birt_web/WEB-INF/platform/lib">
<fileset dir="${baseLocation}/plugins/">
<include name="org.eclipse.emf.common_*.jar" />
<include name="org.eclipse.emf.ecore.xmi_*.jar" />
<include name="org.eclipse.emf.ecore_*.jar" />
</fileset>
</copy>
<copy todir="${buildDirectory}/${buildId}/birt_web/org.eclipse.birt.report.viewer/birt_web/WEB-INF/platform/lib">
<fileset dir="${buildDirectory}/${buildId}/eclipse/plugins" />
<mapper type="regexp" from="org.eclipse.birt.chart.engine_.*.jar" to="chartengineapi.jar"/>
</copy>
-->
<copy todir="${buildDirectory}/${buildId}/birt_web/org.eclipse.birt.report.viewer/birt_web/WEB-INF/lib">
<fileset dir="${buildDirectory}/${buildId}/eclipse/plugins" >
<include name="org.eclipse.birt.chart.engine_.*.jar"/>
</fileset>
<mapper type="regexp" from="org.eclipse.birt.chart.engine_.*.jar" to="chartengineapi.jar"/>
</copy>
</target>
<target name="runBirtPerformance" depends="init">
<ant dir="${runner.dir}" antfile="testRunner.xml" target="org.eclipse.birt.test.performance"/>
<!-- copy performance result to public test result dir -->
<property file="${buildDirectory}/finalPluginsVersions.properties"/>
<copy todir="${test.dir}/unitTestReport/html">
<fileset dir="${test.dir}/eclipse/plugins/org.eclipse.birt.test.performance_${org.eclipse.birt.test.performance}">
<include name="reporting_*.xml"/>
</fileset>
</copy>
</target>
<target name="runBirtTest" depends="init,prepareBirtTest">
<!-- call the birt unit test -->
<ant dir="${runner.dir}" antfile="testRunner.xml" />
<antcall target="transformTestReports"/>
</target>
<target name="prepareBirtTest" depends="init">
<!-- Clean last test plugins -->
<delete includeEmptyDirs="true" failonerror="false">
<fileset dir="${test.dir}/eclipse">
<include name="**/*"/>
</fileset>
</delete>
<!-- clean last unit test reports -->
<delete failonerror="false">
<fileset dir="${test.dir}/unitTestReport">
<include name="**/*.xml"/>
<include name="**/*.html"/>
<exclude name="**/build.xml"/>
</fileset>
</delete>
<!-- prepare unit test components -->
<copy todir="${test.dir}">
<fileset dir="${postingDirectory}/${buildId}">
<include name="birt-report-designer-all-in-one-${package.version}-linux-gtk.tar.gz"/>
<include name="birt-tests-suite-${package.version}.zip"/>
</fileset>
</copy>
<exec executable="gunzip" dir="${test.dir}">
<arg line="birt-report-designer-all-in-one-${package.version}-linux-gtk.tar.gz" />
</exec>
<exec executable="tar" dir="${test.dir}">
<arg line="-xvf birt-report-designer-all-in-one-${package.version}-linux-gtk.tar" />
</exec>
<exec executable="unzip" dir="${test.dir}">
<arg line="-o -q birt-tests-suite-${package.version}.zip -d ${test.dir}" />
</exec>
<exec executable="unzip" dir="${postingDirectory}/${buildId}/../../platform/2.3M4_platform">
<arg line="-o -q eclipse-test-framework-3.4M4.zip -d ${test.dir}" />
</exec>
<delete>
<fileset dir="${test.dir}">
<include name="*.zip"/>
<include name="*.gz"/>
<include name="*.tar"/>
</fileset>
</delete>
<!-- copy drivers for jdbc testing -->
<property file="${buildDirectory}/finalPluginsVersions.properties"/>
<copy todir="${test.dir}/eclipse/plugins/org.eclipse.birt.report.data.oda.jdbc_${org.eclipse.birt.report.data.oda.jdbc}/drivers">
<fileset dir="${p4.home}/drivers">
<include name="**"/>
</fileset>
</copy>
</target>
<target name="transformTestReports">
<property file="${buildDirectory}/finalPluginsVersions.properties"/>
<copy todir="${test.dir}/unitTestReport/smokexml">
<fileset dir="${test.dir}/eclipse/plugins/org.eclipse.birt.report.tests.engine_${org.eclipse.birt.report.tests.engine}">
<include name="TESTS-*.xml"/>
</fileset>
<fileset dir="${test.dir}/eclipse/plugins/org.eclipse.birt.tests.data_${org.eclipse.birt.tests.data}">
<include name="TESTS-*.xml"/>
</fileset>
</copy>
<!-- XSLT trasform-->
<exec executable="${test.dir}/unitTestReport/processXML.sh"/>
<ant dir="${test.dir}/unitTestReport" antfile="build.xml"/>
<mkdir dir="${postingDirectory}/../unitTestReport/${package.version}/${buildId}"/>
<copy todir="${postingDirectory}/../unitTestReport/${package.version}/${buildId}" overwrite="true">
<fileset dir="${test.dir}/unitTestReport/html">
<include name="*.html"/>
</fileset>
</copy>
</target>
<target name="buildLanguagePack">
<antcall target="MakeNLPack1"/>
<antcall target="PackageNLPack1"/>
</target>
<target name="MakeNLPack1">
<echo message="Start Make NL1 Pack" />
<ant antfile="LanguagePackBuild.xml" dir="${eclipse.build.configs}/birt.nl/tools" target="main" inheritAll="true">
<property name="build.id" value="${buildId}" />
</ant>
</target>
<target name="PackageNLPack1" >
<echo message="Start Packaging NL1 for full, framework and RCP" />
<ant antfile="BIRTDownloadSetup.xml" target="createNLGroup1" dir="${eclipse.build.configs}/birt/tools" inheritAll="false">
<property name="deposit" value="${buildDirectory}/${buildId}" />
<property name="OutputDir" value="${postingDirectory}/${buildId}"/>
</ant>
<echo message="Start Packaging NL1 for charts" />
<ant antfile="BIRTDownloadSetup.xml" target="createNLGroup1Chart" dir="${eclipse.build.configs}/birt/tools" inheritAll="false">
<property name="deposit" value="${buildDirectory}/${buildId}" />
<property name="OutputDir" value="${postingDirectory}/${buildId}"/>
</ant>
<echo message="Start Packaging NL1 for runtime" />
<ant antfile="BIRTDownloadSetup.xml" target="createNLGroup1Runtime" dir="${eclipse.build.configs}/birt/tools" inheritAll="false">
<property name="deposit" value="${buildDirectory}/${buildId}" />
<property name="OutputDir" value="${postingDirectory}/${buildId}"/>
</ant>
<!-- Create NL FeatureOverlay packages -->
<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createBirtNLFeatureOverlay">
<property name="OutputDir" value="${postingDirectory}/${buildId}" />
<property name="deposit" value="${buildDirectory}/${buildId}" />
</ant>
</target>
<target name="InformQA" unless="nomail">
<property file="${eclipse.build.configs}/../../config.properties" />
<mail mailport="${mail.port}" tolist="${QA.members}" from="${mail.from}" replyto="${replyto.address}" subject="${BranchVersion} Build Is Ready (BuildId: ${buildId})" >
<message>
Hi All,
Today's build (BuildId: ${buildId}) is available.
Build based on:
${build.environment}
Please download :
AllInOne from ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-report-designer-all-in-one-${package.version}.zip${rtn}
AllInOne for linux from: ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-report-designer-all-in-one-${package.version}-linux-gtk.tar.gz${rtn}
RCP from ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-rcp-report-designer-${package.version}.zip${rtn}
Runtime from ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-runtime-${package.version}.zip${rtn}
Framework from ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-report-framework-${package.version}.zip${rtn}
Source drops from ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-source-${package.version}.zip${rtn}
JUnit Test Suite Framework from ${QA.test.dir}\BIRT2.3-download\${buildId}\birt-tests-suite-${package.version}.zip${rtn}
NL pack from ${QA.test.dir}\BIRT2.3-download\${buildId}\
Internal Update Site URL: http://qa-build/UpdateSite/${package.version}
Please visit [ http://qa-build:8080/BuildCentral ] for more information.
Have a nice day!
</message>
</mail>
<!-- create download info file -->
<echo file="download.properties" append="false">
allInOne=\\${QA.test.dir}\\BIRT2.3-download\\${buildId}\\birt-report-designer-all-in-one-${package.version}.zip
runtime=\\${QA.test.dir}\\BIRT2.3-download\\${buildId}\\birt-runtime-${package.version}.zip
rcp=\\${QA.test.dir}\\BIRT2.3-download\\${buildId}\\birt-rcp-report-designer-${package.version}.zip
frameworkSDK=\\${QA.test.dir}\\BIRT2.3-download\\${buildId}\\birt-report-framework-sdk-${package.version}.zip
</echo>
<copy tofile="${postingDirectory}/download.properties" file="download.properties" overwrite="true" />
</target>
<target name="InformPerformance" unless="nomail">
<property file="${eclipse.build.configs}/../../config.properties" />
<mail mailport="${mail.port}" subject="${BranchVersion} Performance Test Reporting (BuildId: ${buildId} ) " tolist="${QA.PERFORMANCE}">
<from address="${mail.from}"/>
<replyto address="${replyto.address}"/>
<message>
Hi All,
Please see the attachments for performance test (BuildId: ${buildId}) results.
Please visit [ http://qa-build:8080/BuildCentral ] for more information.
Have a nice day!
</message>
<fileset dir="${test.dir}/unitTestReport/html">
<include name="reporting_*.xml"/>
</fileset>
</mail>
</target>
<target name="genTestResultSummary">
<property file="${eclipse.build.configs}/../../config.properties" />
<property name="tool.lib.path" value="${p4.home}/dailybuild/source/org.eclipse.birt.build"/>
<path id="customjar.classpath">
<path location="${tool.lib.path}/customtask.jar" />
<fileset dir="${tool.lib.path}/lib">
<include name="*.jar"/>
</fileset>
</path>
<!-- Using custom build tools to get failure/error summary of test result -->
<java classname="org.eclipse.birt.build.ParseResultCount">
<classpath refid="customjar.classpath" />
<arg value="${test.dir}/unitTestReport/xml" />
<arg value="${test.dir}/unitTestReport/html/result.properties" />
<arg value="Y"/>
<arg value="Y"/>
</java>
<!--
<java classname="org.eclipse.birt.build.ParseResultCount">
<classpath refid="customjar.classpath" />
<arg value="${test.dir}/unitTestReport/smokexml" />
<arg value="${test.dir}/unitTestReport/html/result.properties" />
<arg value="Y"/>
<arg value="N"/>
</java>
-->
<move file="${test.dir}/unitTestReport/html/result.properties"
tofile="${postingDirectory}/result.properties"/>
</target>
<target name="InformAutomation" unless="nomail">
<property file="${eclipse.build.configs}/../../config.properties" />
<mail mailport="${mail.port}" subject="${BranchVersion} Test Suite Projects Reporting (BuildId: ${buildId} ) " tolist="${QA.AUTOMATION}">
<from address="${mail.from}"/>
<replyto address="${replyto.address}"/>
<message>
Hi All,
Please see the attachments for test results.
The repository of junit test reports can be found under: ${QA.test.dir}\unitTestReport\${package.version}\
Please visit [ http://qa-build:8080/BuildCentral ] for more information.
Have a nice day!
</message>
<!--
<fileset dir="${test.dir}/unitTestReport/html">
<include name="TESTS-EngineSmokeTests.html"/>
<include name="TESTS-DtESmokeTests.html"/>
<include name="org.eclipse.birt.report.tests.model.AllTests.html"/>
<include name="org.eclipse.birt.report.tests.engine.AllTests.html"/>
<include name="org.eclipse.birt.report.tests.chart.AllTests.html"/>
<include name="org.eclipse.birt.tests.data.engine.AllTests.html"/>
<include name="org.eclipse.birt.report.tests.regression.AllTests.html"/>
</fileset>
-->
</mail>
</target>
<target name="checkErrorExist">
<property file="${eclipse.build.configs}/../../monitor.properties" />
<condition property="has.compile.error" value="true">
<equals arg1="${compileHasError}" arg2="true" />
</condition>
<echo message="${has.compile.error}"/>
<echo message="monitor: ${eclipse.build.configs}/../../monitor.properties" />
</target>
<target name="checkCompileError" depends="checkErrorExist" if="has.compile.error" >
<property file="${eclipse.build.configs}/../../config.properties" />
<property file="${eclipse.build.configs}/../../monitor.properties" />
<echo message="${mail.port}"/>
<echo message="${buildId}"/>
<echo message="${COMPILE.ERROR.RECIPIENTS}"/>
<echo message="${mail.from}"/>
<echo message="${replyto.address}"/>
<echo message="${error.plugin.list}"/>
<echo message="${postingDirectory}/${buildId}/compilelogs/plugins"/>
<mail mailport="${mail.port}" subject="Compile errors found in Today's Datatools 1.8.2 Build (BuildId: ${buildId} ) " tolist="${COMPILE.ERROR.RECIPIENTS.LOCAL}">
<from address="${mail.from}"/>
<replyto address="${replyto.address}"/>
<message>
Hi All,
Compile errors are found in today's DTP build(BuildId: ${buildId}):
${error.plugin.list}
Please see the attachments for details.
Have a nice day!
</message>
<attachments>
<fileset dir="${postingDirectory}/${buildId}/compilelogs/plugins">
<include name="*compilelog.html"/>
</fileset>
</attachments>
</mail>
</target>
<target name="generateCompileSummary">
<property file="config.properties" />
<property name="tool.lib.path" value="${p4.home}/dailybuild/source/org.eclipse.birt.build"/>
<property name="compile.log.summary" value="${postingDirectory}/compileSummary.properties"/>
<path id="customjar.classpath">
<path location="${tool.lib.path}/customtask.jar" />
<fileset dir="${tool.lib.path}/lib">
<include name="*.jar"/>
</fileset>
</path>
<delete file="${compile.log.summary}" failonerror="false" />
<!-- Using custom build tools to get failure/error summary of test result -->
<java classname="org.eclipse.birt.build.ParseCompileSummary">
<classpath refid="customjar.classpath" />
<arg value="${postingDirectory}/${buildId}/compilelogs/plugins" />
<arg value="${compile.log.summary}" />
<arg value="Y" />
<arg value="Y" />
</java>
</target>
</project>