<commit_before><project default="main">

	<!--
		Steps
	 	Ant properties available at runtime: 
	
	 - eclipse.pdebuild.scripts: the org.eclipse.eclipse.pdebuild.scripts folder
	 - eclipse.pdebuild.home: the root folder of pde build
	 - eclipse.pdebuild.templates: the  templates folder
	
	-->

	<!--build monitoring information:  e-mail, smtp server, build label-->
	<property file="monitor.properties"/>
	
	<!--location of PDE Build configuration files for builder and packager-->
	<property name="eclipse.build.configs" value="${basedir}/eclipse/buildConfigs" />
	
	<property name="sdkHelper" location="${eclipse.build.configs}/eclipse/helper.xml"/>
	<property name="base.builder" value="${basedir}/../org.eclipse.releng.basebuilder" />
	
	<!--location of properties file containing last tag used for integration build-->
	<property name="mapTag.properties" value="/home/users/releng/buildTools/eclipse33/mapTag.properties"/>
	
	<!--location of properties file containing last performance reference test information-->
	<property name="ref.properties" value="/home/users/releng/buildTools/eclipse.perf/ref33.properties"/>
	
	<!--location of test update site-->
	<property file="${ref.properties}"/>
	
	<!--default buildDirectory-->
	<property name="buildDirectory" value="${basedir}/../src" />
	
	<!--default location for build output, parent to ${buildId}-->
	<property name="postingDirectory" value="${buildDirectory}" />

	<target name="main" depends="init">
		<antcall target="buildBirtThirdPartyFeature"/>
		<antcall target="buildBirtFeature"/>
		<antcall target="buildBirtWtpFeature"/>
		<antcall target="fetchRCP"/>
		<antcall target="buildBirtRCPFeature"/>
		<antcall target="buildBirtTestFeature"/>
		<antcall target="unpackUpdateJarsForPackaging"/>
		<antcall target="integrateBirtFeatures"/>
		<antcall target="buildBirtWebViewer"/>
		<parallel failonany="true">
			<sequential>
				<antcall target="BuildChartViewer"/>
				<antcall target="CreateDistribute"/>
				<antcall target="buildBirtNLFeature"/>
				<antcall target="iPortalSetup"/>
				<antcall target="CreateUpdateSite"/>
				<antcall target="pushUpdateSiteLocal"/>
			</sequential>
			<sequential>
			<!--
				<antcall target="generateJavaCrossReference"/>
				<antcall target="generateDocumentCheck"/>
				<antcall target="generateJavaDoc"/>
			-->
			</sequential>
		</parallel>
		<antcall target="runBirtTest"/>
		<!--
		<antcall target="runBirtPerformance"/>
		-->
	</target>

	<target name="init">
		<ant antfile="build.xml" target="init" />
		<property file="${buildDirectory}/label.properties" />
		
		<condition property="fetchTag" value="HEAD">
			<equals arg1="${buildType}" arg2="N" />
		</condition>
		<condition property="forceContextQualifier" value="${buildId}">
			<equals arg1="${buildType}" arg2="N" />
		</condition>
		<condition property="generateFeatureVersionSuffix" value="false">
			<equals arg1="${buildType}" arg2="N" />
		</condition>
		<condition property="createUpdateSite" value="true">
			<equals arg1="${buildType}" arg2="I" />
		</condition>
		<!--compiler args-->
		<property name="compilerArg" value="-enableJavadoc -encoding utf-8 -warn:-discouraged,forbidden" />
		<property name="javacSource" value="1.4" />
		<property name="javacTarget" value="1.4" />
		<property name="javacDebugInfo" value="true" />
		<property name="javacFailOnError" value="false" />
		<property name="javacVerbose" value="false" />
		<property name="logExtension" value=".xml" />
		<!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
		<property name="buildingOSGi" value="true" />
		<!--zip args-->
		<property name="zipargs" value="-y -qq" />
		<!--unzip args-->
		<property name="unzipArgs" value="-qq" />
	</target>
	
	<target name="buildBirtFeature">
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="generate">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="process">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>		
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="assemble">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>		
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="package">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="postBuild">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
	</target>

	<target name="CreateDistribute">
		<mkdir dir="${postingDirectory}/${buildId}"/>
		
		<!-- generate genReport.sh/.bat for birt-runtime-package -->
		<property name="template.dir" value="${baseLocation}/../PackageFiles/template"/>
		<delete>
			<fileset dir="${template.dir}/engine.runtime.bin">
				<include name="*.*"/>
			</fileset>
		</delete>
		
		<exec executable="${eclipse.build.configs}/../../extras/genReportGenerator.sh">
			<arg line="${buildDirectory}/${buildId}/birt_web/org.eclipse.birt.report.viewer/birt_web/WEB-INF/platform/lib" />
			<arg line="${template.dir}/engine.runtime.bin" />
		</exec>
		<!-- create Runtime -->
		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
		
		<!-- copy runtime to ${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp_${org.eclipse.birt.integration.wtp}/runtime -->
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createWebViewerExample">
			<property name="OutputDir" value="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}/runtime" />
			<property name="deposit" value="${buildDirectory}/${buildId}" />
		</ant>
			
		<!-- copy chart runtime to ${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/runtime -->
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createChartViewer">
			<property name="runtime.tmp" value="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/runtime" />
		</ant>

		<!-- create AllInOne,AllInOne for Linux, RCP, FrameworkSDK,Framework,Chart,BIRTSample,TestSuite,Database -->
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="default">
			<property name="OutputDir" value="${postingDirectory}/${buildId}" />
			<property name="deposit" value="${buildDirectory}/${buildId}" />
		</ant>

		<!-- verify compile result -->
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="verifyCompile" />

		<antcall target="sendNotification"/>
	</target>

	<target name="sendNotification" unless="nomail">
		<!-- copy directory.txt to output directory -->
		<copy tofile="${postingDirectory}/${buildId}/directory.txt" file="${buildDirectory}/directory.txt"/>
		<copy tofile="${postingDirectory}/monitor.properties" file="monitor.properties" overwrite="true" />
		<copy tofile="${postingDirectory}/finalPluginsVersions.properties" file="${buildDirectory}/finalPluginsVersions.properties" overwrite="true" />
		<!-- Send build ready mail to QA -->
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="InformQA"/>
	</target>
	
	<target name="iPortalSetup">
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createIpotalLib">
			<property name="OutputDir" value="${postingDirectory}/${buildId}" />
			<property name="deposit" value="${buildDirectory}/${buildId}" />
		</ant>

                <!--copy all packages to upload area-->
		<echo message="start copying to download area..."/>
	        <echo message="from dir: ${postingDirectory}/${buildId}"/>
                <copy todir="${test.dir}/../../downloads/${package.version}" failonerror="false" overwrite="true">
	              <fileset dir="${postingDirectory}/${buildId}" >
                               <include name="*.zip"/>
                               <include name="*.txt"/>
                               <include name="*.gz"/>
                      </fileset>
	       </copy>
	</target>
	
	<target name="CreateUpdateSite" if="createUpdateSite">
		<property name="updateJarWorkingDir" value="${buildDirectory}/updateJars" />
		<mkdir dir="${updateJarWorkingDir}" />
		<mkdir dir="${updateJarWorkingDir}/site" />
		
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-wtp-${package.version}.bak.zip -d ${updateJarWorkingDir}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-report-framework-sdk-${package.version}.bak.zip -d ${updateJarWorkingDir}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-third-party-${package.version}.bak.zip -d ${updateJarWorkingDir}" />
		</exec>
		<copy todir="${updateJarWorkingDir}/eclipse/plugins">
			<fileset dir="${buildDirectory}/plugins">
				<include name="org.apache.batik.*.jar"/>
				<include name="org.apache.xerces_*.jar"/>
				<include name="org.apache.xml.resolver_*.jar"/>
				<include name="org.apache.xml.serializer_*.jar"/>
				<include name="javax.xml_*.jar"/>
				<include name="org.w3c.*.jar"/>
			</fileset>
		</copy>

		<delete includeemptydirs="true">
			<fileset dir="${updateJarWorkingDir}/eclipse/features" includes="*.thirdparty*/**" />
			<fileset dir="${updateJarWorkingDir}/eclipse/plugins" includes="*.thirdparty*/**" />
		</delete>
		
		<!-- repack plugin org.eclipse.birt.integration.wtp.ui to include birt.zip in runtime sub-folder -->
		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
		<delete file="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}.jar"/>
		<jar destfile="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}.jar" 
			basedir="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}"
			manifest="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}/META-INF/MANIFEST.MF" />
		
		<!-- repack plugin org.eclipse.birt.chart.integration.wtp.ui to include chart.war in runtime sub-folder -->
		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
		<delete file="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}.jar"/>
		<jar destfile="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}.jar" 
			basedir="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}"
			manifest="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/META-INF/MANIFEST.MF" />

		<!-- TODO:sign update jars -->
		
		<!-- repack update jar -->
		<replace file="${eclipse.build.configs}/../../extras/pack200" token="@pack200@" value="${jvm15_home}/bin/pack200"/>
		<chmod file="${eclipse.build.configs}/../../extras/pack200" perm="755"/>
		<exec executable="dos2unix" dir="${eclipse.build.configs}/../../extras">
			<arg line=" pack200" />
		</exec>
		<!--
		<java jar="${basedir}/../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar"
				fork="true"
				timeout="10800000"
				jvm="${jvm15_home}/bin/java"
				failonerror="true"
				maxmemory="512m"
				dir="${buildDirectory}">
			<jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${eclipse.build.configs}/../../extras"/>
			<arg line="-application org.eclipse.update.core.siteOptimizer"/>
			<arg line="-jarProcessor -outputDir ${updateJarWorkingDir}/site -processAll -repack updateJars/eclipse"/>
		</java>
		-->
		
		<!-- create Pack200 update jars -->
		<!--
		<java jar="${basedir}/../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar"
				fork="true"
				timeout="10800000"
				jvm="${jvm15_home}/bin/java"
				failonerror="true"
				maxmemory="512m"
				dir="${buildDirectory}">
			<jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${eclipse.build.configs}/../../extras"/>
			<arg line="-application org.eclipse.update.core.siteOptimizer"/>
			<arg line="-jarProcessor -outputDir ${updateJarWorkingDir}/site -processAll -pack updateJars/eclipse"/>
		</java>
		-->
	</target>
	
	<target name="pushUpdateSiteLocal" if="createUpdateSite">
		<property name="updateJarWorkingDir" value="${buildDirectory}/updateJars" />

		<!-- generate site.xml -->
		<property file="${buildDirectory}/finalFeaturesVersions.properties"/>
		<copy file="${eclipse.build.configs}/../../extras/site.xml" tofile="${updateJarWorkingDir}/site/site.xml"/>
		<!-- replace the feature version in site.xml -->
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${com.lowagie.itext}" token="@FEATURE.ITEXT@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.apache.commons.codec}" token="@FEATURE.CODEC@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.mozilla.rhino}" token="@FEATURE.MOZILLA@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.w3c.sac}" token="@FEATURE.W3C@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.eclipse.birt}" token="@FEATURE.BIRT@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.eclipse.birt.sdk}" token="@FEATURE.BIRT.SDK@"/>
		
		<!-- push update site to output directory -->
		<mkdir dir="${postingDirectory}/${buildId}/UpdateSite"/>
		<copy todir="${postingDirectory}/${buildId}/UpdateSite">
			<fileset dir="${updateJarWorkingDir}/eclipse">
				<include name="**"/>
			</fileset>
		</copy>
		<!-- clean last content -->
		<delete failonerror="false">
			<fileset dir="${postingDirectory}/../../../UpdateSite/${package.version}">
				<include name="plugins/**"/>
				<include name="features/**"/>
				<include name="site.xml"/>
			</fileset>
		</delete>
		<!-- copy to internal update site -->
		<copy todir="${postingDirectory}/../../../UpdateSite/${package.version}/plugins" overwrite="true">
			<fileset dir="${updateJarWorkingDir}/eclipse/plugins">
				<include name="**"/>
			</fileset>
		</copy>
		<copy todir="${postingDirectory}/../../../UpdateSite/${package.version}/features" overwrite="true">
			<fileset dir="${updateJarWorkingDir}/eclipse/features/">
				<include name="**"/>
			</fileset>
		</copy>
		<copy tofile="${postingDirectory}/../../../UpdateSite/${package.version}/site.xml" file="${updateJarWorkingDir}/site/site.xml" overwrite="true"/>
	</target>
	
	<target name="runBirtTest" unless="skip.unit.test">
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="runBirtTest" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="InformAutomation" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>

		<ant antfile="${eclipse.build.configs}/../helper.xml" target="genTestResultSummary" />
	</target>
	
	<target name="runBirtPerformance">
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="runBirtPerformance" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="InformPerformance" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>
	</target>
	
	<target name="buildBirtTestFeature">
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.tests" />
		</ant>
	</target>
	
	<target name="buildBirtWtpFeature">
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.wtp" />
		</ant>
	</target>
	<target name="buildBirtThirdPartyFeature">
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.third.party" />
		</ant>
	</target>
	<!-- - - - - - - - - - - - - - - - - - 
          target: buildBirtRCPFeature                      
         - - - - - - - - - - - - - - - - - -->
    <target name="buildBirtRCPFeature">
		<!--	
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.rcp" />
		</ant>           
		-->
    	<ant antfile="productBuild.xml" dir="${eclipse.pdebuild.scripts}/productBuild">
    		<property name="builder" value="${eclipse.build.configs}/birt.rcp"/>
    		<property name="product" value="${buildDirectory}/plugins/org.eclipse.birt.report.designer.ui.rcp/BIRT.product" />
    	</ant>
    </target>

	<target name="fetchRCP">
                <ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
                        <property name="builder" value="${eclipse.build.configs}/birt.designer.rcp" />
                </ant>
                <ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
                        <property name="builder" value="${eclipse.build.configs}/birt.designer.rcp" />
                </ant>
	</target>
	<target name="BuildChartViewer">
                <!-- Get Xalan jar for chart viewer -->
		<!--
                <cvs cvsRoot=":pserver:<EMAIL>@<EMAIL>.eclipse.<EMAIL>:/cvsroot/tptp"
                        package="monitoring/org.apache.xalan"
                        dest="${buildDirectory}/plugins/"
                        tag="HEAD"
                />
                <copy todir="${buildDirectory}/plugins/org.apache.xalan">
                    <fileset dir="${buildDirectory}/plugins/monitoring/org.apache.xalan">
                        <include name="**/*"/>
                    </fileset>
                </copy>
		-->
                <delete dir="${buildDirectory}/plugins/monitoring"/>

		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
			<property name="builder" value="${eclipse.build.configs}/birt.chart.viewer" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
			<property name="builder" value="${eclipse.build.configs}/birt.chart.viewer" />
		</ant>
	</target>

	<target name="buildBirtNLFeature">
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
			<property name="builder" value="${eclipse.build.configs}/birt.nl" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
			<property name="builder" value="${eclipse.build.configs}/birt.nl" />
		</ant>
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="buildLanguagePack" />
	</target>
	
	<target name="buildUpdateSite" if="updateSite">
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="buildUpdateJars" />
	</target>
	
	<target name="unpackUpdateJarsForPackaging">

		<property name="tmpsite" value="${buildDirectory}/tmpsite" />
		<property name="tmpsite2" value="${buildDirectory}/tmpsite2" />
		<property name="tmpsite1" value="${buildDirectory}/tmpsite1" />
		<mkdir dir="${tmpsite}/new/eclipse/features" />
		<mkdir dir="${tmpsite}/new/eclipse/plugins" />
		<mkdir dir="${tmpsite1}/new/eclipse/features" />
		<mkdir dir="${tmpsite1}/new/eclipse/plugins" />
		<mkdir dir="${tmpsite2}/new/eclipse/features" />
		<mkdir dir="${tmpsite2}/new/eclipse/plugins" />

		<!-- BIRT framework-->
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-q birt-report-framework-sdk-${package.version}.zip -d ${tmpsite}" />
		</exec>
		<unpackUpdateJars site="${tmpsite}/eclipse" output="${tmpsite}/new/eclipse"/>
		<!-- BIRT third party -->
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-q birt-third-party-${package.version}.zip -d ${tmpsite2}" />
		</exec>
		<unpackUpdateJars site="${tmpsite2}/eclipse" output="${tmpsite2}/new/eclipse"/>
		<!-- BIRT wtp -->
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-q birt-wtp-${package.version}.zip -d ${tmpsite1}" />
		</exec>
		<unpackUpdateJars site="${tmpsite1}/eclipse" output="${tmpsite1}/new/eclipse"/>

		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-report-framework-sdk-${package.version}.zip -d ${tmpsite}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-third-party-${package.version}.zip -d ${tmpsite2}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-wtp-${package.version}.zip -d ${tmpsite1}" />
		</exec>

		<move file="${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.zip" tofile="${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.bak.zip" />
		<move file="${buildDirectory}/${buildId}/birt-third-party-${package.version}.zip" tofile="${buildDirectory}/${buildId}/birt-third-party-${package.version}.bak.zip" />
		<move file="${buildDirectory}/${buildId}/birt-wtp-${package.version}.zip" tofile="${buildDirectory}/${buildId}/birt-wtp-${package.version}.bak.zip" />

		<exec executable="zip" dir="${tmpsite}/new">
			<arg line="-q ${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.zip -r eclipse" />
		</exec>
		<exec executable="zip" dir="${tmpsite1}/new">
			<arg line="-q ${buildDirectory}/${buildId}/birt-wtp-${package.version}.zip -r eclipse" />
		</exec>	
		<exec executable="zip" dir="${tmpsite2}/new">
			<arg line="-q ${buildDirectory}/${buildId}/birt-third-party-${package.version}.zip -r eclipse" />
		</exec>	
	</target>

	<target name="integrateBirtFeatures" >

		<property name="birtFramePackageName" value="birt-report-framework-sdk-${package.version}" />
		<property name="birtThirdPartyPackageName" value="birt-third-party-${package.version}" />
		<property name="birtWtpPackageName" value="birt-wtp-${package.version}" />
		
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q ${birtFramePackageName}.zip -d ${buildDirectory}/${buildId}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q ${birtThirdPartyPackageName}.zip -d ${buildDirectory}/${buildId}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q ${birtWtpPackageName}.zip -d ${buildDirectory}/${buildId}" />
		</exec>
	</target>

	<target name="package">
		<ant antfile="package.xml" dir="${eclipse.pdebuild.scripts}">
			<property name="packagingInfo" value="${packagingInfo}" />
			<property name="assemblyTempDir" value="${packagingInfo}/jartmp" />
		</ant>
	</target>
	
    <target name="buildBirtWebViewer">
            <ant antfile="${eclipse.build.configs}/../helper.xml" target="BuildWebViewer" >
            </ant>
    </target>

	<target name="generateJavaCrossReference">
        <ant antfile="${eclipse.build.configs}/../../extras/CrossReferenceGenerator.xml" 
        	target="generateJavaCrossReference" >
        </ant>
	</target>

	<target name="generateDocumentCheck">
        <ant antfile="${eclipse.build.configs}/../../extras/CrossReferenceGenerator.xml" 
        	target="generateDocumentCheck" >
        </ant>
	</target>
	
    <target name="generateJavaDoc">
        <ant antfile="${eclipse.build.configs}/../../extras/antJavadoc.xml"/>
    </target>

	
</project>
<commit_msg>Fix Bugzilla bug [225500] display-name in web.xml should not be changed when import chart runtime component [0603]<commit_after><project default="main">

	<!--
		Steps
	 	Ant properties available at runtime: 
	
	 - eclipse.pdebuild.scripts: the org.eclipse.eclipse.pdebuild.scripts folder
	 - eclipse.pdebuild.home: the root folder of pde build
	 - eclipse.pdebuild.templates: the  templates folder
	
	-->

	<!--build monitoring information:  e-mail, smtp server, build label-->
	<property file="monitor.properties"/>
	
	<!--location of PDE Build configuration files for builder and packager-->
	<property name="eclipse.build.configs" value="${basedir}/eclipse/buildConfigs" />
	
	<property name="sdkHelper" location="${eclipse.build.configs}/eclipse/helper.xml"/>
	<property name="base.builder" value="${basedir}/../org.eclipse.releng.basebuilder" />
	
	<!--location of properties file containing last tag used for integration build-->
	<property name="mapTag.properties" value="/home/users/releng/buildTools/eclipse33/mapTag.properties"/>
	
	<!--location of properties file containing last performance reference test information-->
	<property name="ref.properties" value="/home/users/releng/buildTools/eclipse.perf/ref33.properties"/>
	
	<!--location of test update site-->
	<property file="${ref.properties}"/>
	
	<!--default buildDirectory-->
	<property name="buildDirectory" value="${basedir}/../src" />
	
	<!--default location for build output, parent to ${buildId}-->
	<property name="postingDirectory" value="${buildDirectory}" />

	<target name="main" depends="init">
		<antcall target="buildBirtThirdPartyFeature"/>
		<antcall target="buildBirtFeature"/>
		<antcall target="buildBirtWtpFeature"/>
		<antcall target="fetchRCP"/>
		<antcall target="buildBirtRCPFeature"/>
		<antcall target="buildBirtTestFeature"/>
		<antcall target="unpackUpdateJarsForPackaging"/>
		<antcall target="integrateBirtFeatures"/>
		<antcall target="buildBirtWebViewer"/>
		<parallel failonany="true">
			<sequential>
				<antcall target="BuildChartViewer"/>
				<antcall target="CreateDistribute"/>
				<antcall target="buildBirtNLFeature"/>
				<antcall target="iPortalSetup"/>
				<antcall target="CreateUpdateSite"/>
				<antcall target="pushUpdateSiteLocal"/>
			</sequential>
			<sequential>
			<!--
				<antcall target="generateJavaCrossReference"/>
				<antcall target="generateDocumentCheck"/>
				<antcall target="generateJavaDoc"/>
			-->
			</sequential>
		</parallel>
		<antcall target="runBirtTest"/>
		<!--
		<antcall target="runBirtPerformance"/>
		-->
	</target>

	<target name="init">
		<ant antfile="build.xml" target="init" />
		<property file="${buildDirectory}/label.properties" />
		
		<condition property="fetchTag" value="HEAD">
			<equals arg1="${buildType}" arg2="N" />
		</condition>
		<condition property="forceContextQualifier" value="${buildId}">
			<equals arg1="${buildType}" arg2="N" />
		</condition>
		<condition property="generateFeatureVersionSuffix" value="false">
			<equals arg1="${buildType}" arg2="N" />
		</condition>
		<condition property="createUpdateSite" value="true">
			<equals arg1="${buildType}" arg2="I" />
		</condition>
		<!--compiler args-->
		<property name="compilerArg" value="-enableJavadoc -encoding utf-8 -warn:-discouraged,forbidden" />
		<property name="javacSource" value="1.4" />
		<property name="javacTarget" value="1.4" />
		<property name="javacDebugInfo" value="true" />
		<property name="javacFailOnError" value="false" />
		<property name="javacVerbose" value="false" />
		<property name="logExtension" value=".xml" />
		<!--this property required as of Eclipse 3.0 stream builds > 20031126 -->
		<property name="buildingOSGi" value="true" />
		<!--zip args-->
		<property name="zipargs" value="-y -qq" />
		<!--unzip args-->
		<property name="unzipArgs" value="-qq" />
	</target>
	
	<target name="buildBirtFeature">
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="generate">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="process">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>		
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="assemble">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>		
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="package">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="postBuild">
			<property name="builder" value="${eclipse.build.configs}/birt" />
		</ant>
	</target>

	<target name="CreateDistribute">
		<mkdir dir="${postingDirectory}/${buildId}"/>
		
		<!-- generate genReport.sh/.bat for birt-runtime-package -->
		<property name="template.dir" value="${baseLocation}/../PackageFiles/template"/>
		<delete>
			<fileset dir="${template.dir}/engine.runtime.bin">
				<include name="*.*"/>
			</fileset>
		</delete>
		
		<exec executable="${eclipse.build.configs}/../../extras/genReportGenerator.sh">
			<arg line="${buildDirectory}/${buildId}/birt_web/org.eclipse.birt.report.viewer/birt_web/WEB-INF/platform/lib" />
			<arg line="${template.dir}/engine.runtime.bin" />
		</exec>
		<!-- create Runtime -->
		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
		
		<!-- copy runtime to ${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp_${org.eclipse.birt.integration.wtp}/runtime -->
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createWebViewerExample">
			<property name="OutputDir" value="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}/runtime" />
			<property name="deposit" value="${buildDirectory}/${buildId}" />
		</ant>
			
		<!-- copy chart runtime to ${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/runtime -->
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createChartViewer">
			<property name="runtime.tmp" value="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/runtime" />
		</ant>
		<!-- fix bugzilla bug 225500 -->

		<property name="temp.dir" value="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/runtime"/>
		<mkdir dir="${temp.dir}/chart-viewer-sample"/>
		<exec executable="unzip" dir="${temp.dir}/">
                        <arg line="-q chart-viewer-sample.war -d ${temp.dir}/chart-viewer-sample" />
                </exec>
		<delete file="${temp.dir}/chart-viewer-sample.war" failonerror="false"/>
		<delete file="${temp.dir}/chart-viewer-sample/WEB-INF/web.xml" failonerror="false"/>
                <exec executable="zip" dir="${temp.dir}/chart-viewer-sample">
                        <arg line="-q ${temp.dir}/chart-viewer-sample.zip -r *" />
                </exec>
		<delete dir="${temp.dir}/chart-viewer-sample"/>


		<!-- create AllInOne,AllInOne for Linux, RCP, FrameworkSDK,Framework,Chart,BIRTSample,TestSuite,Database -->
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="default">
			<property name="OutputDir" value="${postingDirectory}/${buildId}" />
			<property name="deposit" value="${buildDirectory}/${buildId}" />
		</ant>

		<!-- verify compile result -->
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="verifyCompile" />

	</target>

	<target name="sendNotification" unless="nomail">
		<!-- copy directory.txt to output directory -->
		<copy tofile="${postingDirectory}/${buildId}/directory.txt" file="${buildDirectory}/directory.txt"/>
		<copy tofile="${postingDirectory}/monitor.properties" file="monitor.properties" overwrite="true" />
		<copy tofile="${postingDirectory}/finalPluginsVersions.properties" file="${buildDirectory}/finalPluginsVersions.properties" overwrite="true" />
		<copy tofile="${postingDirectory}/finalFeaturesVersions.properties" file="${buildDirectory}/finalFeaturesVersions.properties" overwrite="true" />
		<!-- Send build ready mail to QA -->
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="InformQA"/>
	</target>
	
	<target name="iPortalSetup">
		<ant antfile="BIRTDownloadSetup.xml" dir="${eclipse.build.configs}/birt/tools" target="createIpotalLib">
			<property name="OutputDir" value="${postingDirectory}/${buildId}" />
			<property name="deposit" value="${buildDirectory}/${buildId}" />
		</ant>

                <!--copy all packages to upload area-->
		<echo message="start copying to download area..."/>
	        <echo message="from dir: ${postingDirectory}/${buildId}"/>
                <copy todir="${test.dir}/../../downloads/${package.version}" failonerror="false" overwrite="true">
	              <fileset dir="${postingDirectory}/${buildId}" >
                               <include name="*.zip"/>
                               <include name="*.txt"/>
                               <include name="*.gz"/>
                      </fileset>
	       </copy>

	       <antcall target="renamePackage"/>
               <antcall target="sendNotification"/>

	</target>
	
	<target name="renamePackage">
		<move file="${postingDirectory}/${buildId}/birt-charts-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-charts-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-database-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-database-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-rcp-report-designer-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-rcp-report-designer-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-report-designer-all-in-one-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-report-designer-all-in-one-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-report-designer-all-in-one-${package.version}-linux-gtk.tar.gz"
        tofile="${postingDirectory}/${buildId}/birt-report-designer-all-in-one-${package.version}-${build.date}-linux-gtk.tar.gz"/>
		<move file="${postingDirectory}/${buildId}/birt-report-framework-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-report-framework-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-report-framework-sdk-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-runtime-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-runtime-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-sample-plugins-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-sample-plugins-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-source-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-source-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-tests-suite-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-tests-suite-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/birt-wtp-integration-sdk-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/birt-wtp-integration-sdk-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-charts-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-charts-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-rcp-report-designer-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-rcp-report-designer-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-report-all-in-one-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-report-all-in-one-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-report-framework-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1_FeatureOverlay-birt-report-framework-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1-birt-charts-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1-birt-charts-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1-birt-rcp-report-designer-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1-birt-rcp-report-designer-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1-birt-report-designer-all-in-one-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1-birt-report-designer-all-in-one-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1-birt-report-framework-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1-birt-report-framework-${package.version}-${build.date}.zip"/>
		<move file="${postingDirectory}/${buildId}/NLpack1-birt-runtime-${package.version}.zip"
                    tofile="${postingDirectory}/${buildId}/NLpack1-birt-runtime-${package.version}-${build.date}.zip"/>
	</target>

	<target name="CreateUpdateSite" if="createUpdateSite">
		<property name="updateJarWorkingDir" value="${buildDirectory}/updateJars" />
		<mkdir dir="${updateJarWorkingDir}" />
		<mkdir dir="${updateJarWorkingDir}/site" />
		
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-wtp-${package.version}.bak.zip -d ${updateJarWorkingDir}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-report-framework-sdk-${package.version}.bak.zip -d ${updateJarWorkingDir}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-third-party-${package.version}.bak.zip -d ${updateJarWorkingDir}" />
		</exec>
		<copy todir="${updateJarWorkingDir}/eclipse/plugins">
			<fileset dir="${buildDirectory}/plugins">
				<include name="org.apache.batik.*.jar"/>
				<include name="org.apache.xerces_*.jar"/>
				<include name="org.apache.xml.resolver_*.jar"/>
				<include name="org.apache.xml.serializer_*.jar"/>
				<include name="javax.xml_*.jar"/>
				<include name="org.w3c.*.jar"/>
			</fileset>
		</copy>

		<delete includeemptydirs="true">
			<fileset dir="${updateJarWorkingDir}/eclipse/features" includes="*.thirdparty*/**" />
			<fileset dir="${updateJarWorkingDir}/eclipse/plugins" includes="*.thirdparty*/**" />
		</delete>
		
		<!-- repack plugin org.eclipse.birt.integration.wtp.ui to include birt.zip in runtime sub-folder -->
		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
		<delete file="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}.jar"/>
		<jar destfile="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}.jar" 
			basedir="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}"
			manifest="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.integration.wtp.ui_${org.eclipse.birt.integration.wtp.ui}/META-INF/MANIFEST.MF" />
		
		<!-- repack plugin org.eclipse.birt.chart.integration.wtp.ui to include chart.war in runtime sub-folder -->
		<property file="${buildDirectory}/finalPluginsVersions.properties"/>
		<delete file="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}.jar"/>
		<jar destfile="${updateJarWorkingDir}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}.jar" 
			basedir="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}"
			manifest="${buildDirectory}/${buildId}/eclipse/plugins/org.eclipse.birt.chart.integration.wtp.ui_${org.eclipse.birt.chart.integration.wtp.ui}/META-INF/MANIFEST.MF" />

		<!-- TODO:sign update jars -->
		
		<!-- repack update jar -->
		<replace file="${eclipse.build.configs}/../../extras/pack200" token="@pack200@" value="${jvm15_home}/bin/pack200"/>
		<chmod file="${eclipse.build.configs}/../../extras/pack200" perm="755"/>
		<exec executable="dos2unix" dir="${eclipse.build.configs}/../../extras">
			<arg line=" pack200" />
		</exec>
		<!--
		<java jar="${basedir}/../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar"
				fork="true"
				timeout="10800000"
				jvm="${jvm15_home}/bin/java"
				failonerror="true"
				maxmemory="512m"
				dir="${buildDirectory}">
			<jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${eclipse.build.configs}/../../extras"/>
			<arg line="-application org.eclipse.update.core.siteOptimizer"/>
			<arg line="-jarProcessor -outputDir ${updateJarWorkingDir}/site -processAll -repack updateJars/eclipse"/>
		</java>
		-->
		
		<!-- create Pack200 update jars -->
		<!--
		<java jar="${basedir}/../org.eclipse.releng.basebuilder/plugins/org.eclipse.equinox.launcher.jar"
				fork="true"
				timeout="10800000"
				jvm="${jvm15_home}/bin/java"
				failonerror="true"
				maxmemory="512m"
				dir="${buildDirectory}">
			<jvmarg value="-Dorg.eclipse.update.jarprocessor.pack200=${eclipse.build.configs}/../../extras"/>
			<arg line="-application org.eclipse.update.core.siteOptimizer"/>
			<arg line="-jarProcessor -outputDir ${updateJarWorkingDir}/site -processAll -pack updateJars/eclipse"/>
		</java>
		-->
	</target>
	
	<target name="pushUpdateSiteLocal" if="createUpdateSite">
		<property name="updateJarWorkingDir" value="${buildDirectory}/updateJars" />

		<!-- generate site.xml -->
		<property file="${buildDirectory}/finalFeaturesVersions.properties"/>
		<copy file="${eclipse.build.configs}/../../extras/site.xml" tofile="${updateJarWorkingDir}/site/site.xml"/>
		<!-- replace the feature version in site.xml -->
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${com.lowagie.itext}" token="@FEATURE.ITEXT@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.apache.commons.codec}" token="@FEATURE.CODEC@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.mozilla.rhino}" token="@FEATURE.MOZILLA@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.w3c.sac}" token="@FEATURE.W3C@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.eclipse.birt}" token="@FEATURE.BIRT@"/>
		<replace file="${updateJarWorkingDir}/site/site.xml" value="${org.eclipse.birt.sdk}" token="@FEATURE.BIRT.SDK@"/>
		
		<!-- push update site to output directory -->
		<mkdir dir="${postingDirectory}/${buildId}/UpdateSite"/>
		<copy todir="${postingDirectory}/${buildId}/UpdateSite">
			<fileset dir="${updateJarWorkingDir}/eclipse">
				<include name="**"/>
			</fileset>
		</copy>
		<!-- clean last content -->
		<delete failonerror="false">
			<fileset dir="${postingDirectory}/../../../UpdateSite/${package.version}">
				<include name="plugins/**"/>
				<include name="features/**"/>
				<include name="site.xml"/>
			</fileset>
		</delete>
		<!-- copy to internal update site -->
		<copy todir="${postingDirectory}/../../../UpdateSite/${package.version}/plugins" overwrite="true">
			<fileset dir="${updateJarWorkingDir}/eclipse/plugins">
				<include name="**"/>
			</fileset>
		</copy>
		<copy todir="${postingDirectory}/../../../UpdateSite/${package.version}/features" overwrite="true">
			<fileset dir="${updateJarWorkingDir}/eclipse/features/">
				<include name="**"/>
			</fileset>
		</copy>
		<copy tofile="${postingDirectory}/../../../UpdateSite/${package.version}/site.xml" file="${updateJarWorkingDir}/site/site.xml" overwrite="true"/>
	</target>
	
	<target name="runBirtTest" unless="skip.unit.test">
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="runBirtTest" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="InformAutomation" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>

		<ant antfile="${eclipse.build.configs}/../helper.xml" target="genTestResultSummary" />
	</target>
	
	<target name="runBirtPerformance">
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="runBirtPerformance" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="InformPerformance" >
			<property name="runner.dir" value="${eclipse.build.configs}/birt.tests/test.scripts" />
		</ant>
	</target>
	
	<target name="buildBirtTestFeature">
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.tests" />
		</ant>
	</target>
	
	<target name="buildBirtWtpFeature">
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.wtp" />
		</ant>
	</target>
	<target name="buildBirtThirdPartyFeature">
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.third.party" />
		</ant>
	</target>
	<!-- - - - - - - - - - - - - - - - - - 
          target: buildBirtRCPFeature                      
         - - - - - - - - - - - - - - - - - -->
    <target name="buildBirtRCPFeature">
		<!--	
		<ant antfile="build.xml" dir="${basedir}">
			<property name="component" value="${eclipse.build.configs}/birt.rcp" />
		</ant>           
		-->
    	<ant antfile="productBuild.xml" dir="${eclipse.pdebuild.scripts}/productBuild">
    		<property name="builder" value="${eclipse.build.configs}/birt.rcp"/>
    		<property name="product" value="${buildDirectory}/plugins/org.eclipse.birt.report.designer.ui.rcp/BIRT.product" />
    	</ant>
    </target>

	<target name="fetchRCP">
                <ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
                        <property name="builder" value="${eclipse.build.configs}/birt.designer.rcp" />
                </ant>
                <ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
                        <property name="builder" value="${eclipse.build.configs}/birt.designer.rcp" />
                </ant>
	</target>
	<target name="BuildChartViewer">
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
			<property name="builder" value="${eclipse.build.configs}/birt.chart.viewer" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
			<property name="builder" value="${eclipse.build.configs}/birt.chart.viewer" />
		</ant>
	</target>

	<target name="buildBirtNLFeature">
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="preBuild">
			<property name="builder" value="${eclipse.build.configs}/birt.nl" />
		</ant>
		<ant antfile="build.xml" dir="${eclipse.pdebuild.scripts}" target="fetch">
			<property name="builder" value="${eclipse.build.configs}/birt.nl" />
		</ant>
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="buildLanguagePack" />
	</target>
	
	<target name="buildUpdateSite" if="updateSite">
		<ant antfile="${eclipse.build.configs}/../helper.xml" target="buildUpdateJars" />
	</target>
	
	<target name="unpackUpdateJarsForPackaging">

		<property name="tmpsite" value="${buildDirectory}/tmpsite" />
		<property name="tmpsite2" value="${buildDirectory}/tmpsite2" />
		<property name="tmpsite1" value="${buildDirectory}/tmpsite1" />
		<mkdir dir="${tmpsite}/new/eclipse/features" />
		<mkdir dir="${tmpsite}/new/eclipse/plugins" />
		<mkdir dir="${tmpsite1}/new/eclipse/features" />
		<mkdir dir="${tmpsite1}/new/eclipse/plugins" />
		<mkdir dir="${tmpsite2}/new/eclipse/features" />
		<mkdir dir="${tmpsite2}/new/eclipse/plugins" />

		<!-- BIRT framework-->
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-q birt-report-framework-sdk-${package.version}.zip -d ${tmpsite}" />
		</exec>
		<unpackUpdateJars site="${tmpsite}/eclipse" output="${tmpsite}/new/eclipse"/>
		<!-- BIRT third party -->
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-q birt-third-party-${package.version}.zip -d ${tmpsite2}" />
		</exec>
		<unpackUpdateJars site="${tmpsite2}/eclipse" output="${tmpsite2}/new/eclipse"/>
		<!-- BIRT wtp -->
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-q birt-wtp-${package.version}.zip -d ${tmpsite1}" />
		</exec>
		<unpackUpdateJars site="${tmpsite1}/eclipse" output="${tmpsite1}/new/eclipse"/>

		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-report-framework-sdk-${package.version}.zip -d ${tmpsite}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-third-party-${package.version}.zip -d ${tmpsite2}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q birt-wtp-${package.version}.zip -d ${tmpsite1}" />
		</exec>

		<move file="${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.zip" tofile="${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.bak.zip" />
		<move file="${buildDirectory}/${buildId}/birt-third-party-${package.version}.zip" tofile="${buildDirectory}/${buildId}/birt-third-party-${package.version}.bak.zip" />
		<move file="${buildDirectory}/${buildId}/birt-wtp-${package.version}.zip" tofile="${buildDirectory}/${buildId}/birt-wtp-${package.version}.bak.zip" />

		<exec executable="zip" dir="${tmpsite}/new">
			<arg line="-q ${buildDirectory}/${buildId}/birt-report-framework-sdk-${package.version}.zip -r eclipse" />
		</exec>
		<exec executable="zip" dir="${tmpsite1}/new">
			<arg line="-q ${buildDirectory}/${buildId}/birt-wtp-${package.version}.zip -r eclipse" />
		</exec>	
		<exec executable="zip" dir="${tmpsite2}/new">
			<arg line="-q ${buildDirectory}/${buildId}/birt-third-party-${package.version}.zip -r eclipse" />
		</exec>	
	</target>

	<target name="integrateBirtFeatures" >

		<property name="birtFramePackageName" value="birt-report-framework-sdk-${package.version}" />
		<property name="birtThirdPartyPackageName" value="birt-third-party-${package.version}" />
		<property name="birtWtpPackageName" value="birt-wtp-${package.version}" />
		
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q ${birtFramePackageName}.zip -d ${buildDirectory}/${buildId}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q ${birtThirdPartyPackageName}.zip -d ${buildDirectory}/${buildId}" />
		</exec>
		<exec executable="unzip" dir="${buildDirectory}/${buildId}">
			<arg line="-o -q ${birtWtpPackageName}.zip -d ${buildDirectory}/${buildId}" />
		</exec>
	</target>

	<target name="package">
		<ant antfile="package.xml" dir="${eclipse.pdebuild.scripts}">
			<property name="packagingInfo" value="${packagingInfo}" />
			<property name="assemblyTempDir" value="${packagingInfo}/jartmp" />
		</ant>
	</target>
	
    <target name="buildBirtWebViewer">
            <ant antfile="${eclipse.build.configs}/../helper.xml" target="BuildWebViewer" >
            </ant>
    </target>

	<target name="generateJavaCrossReference">
        <ant antfile="${eclipse.build.configs}/../../extras/CrossReferenceGenerator.xml" 
        	target="generateJavaCrossReference" >
        </ant>
	</target>

	<target name="generateDocumentCheck">
        <ant antfile="${eclipse.build.configs}/../../extras/CrossReferenceGenerator.xml" 
        	target="generateDocumentCheck" >
        </ant>
	</target>
	
    <target name="generateJavaDoc">
        <ant antfile="${eclipse.build.configs}/../../extras/antJavadoc.xml"/>
    </target>

	
</project>

{'fraction_non_alphanumeric': 0.2046929981371018, 'fraction_numerical': 0.004553751199593549, 'mean_word_length': 4.185792349726776, 'pattern_counts': {'":': 1, '<': 868, '<?xml version=': 0, '>': 870, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 112}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2398949', 'n_tokens_mistral': 18320, 'n_tokens_neox': 16626, 'n_words': 2335}