| <project name="Build specific targets and properties" default="noDefault"> |
| |
| |
| |
| <!-- ===================================================================== --> |
| <!-- Run a given ${target} on all elements being built --> |
| <!-- Add on <ant> task for each top level element being built. --> |
| <!-- ===================================================================== --> |
| <property name="allElementsFile" value="${builder}/allElements.xml" /> |
| <import file="${allElementsFile}" /> |
| <target name="allElements"> |
| <antcall target="allElementsDelegator" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- ===================================================================== --> |
| <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase"> |
| <get src="${eclipseBaseURL}" dest="${base}/temp-base.zip" /> |
| <unzip dest="${base}" overwrite="true" src="${base}/temp-base.zip" /> |
| </target> |
| |
| <target name="checkLocalBase"> |
| <available file="${base}" property="skipBase" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Check out map files from correct repository --> |
| <!-- Replace values for mapsCheckoutTag as desired. --> |
| <!-- ===================================================================== --> |
| <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps"> |
| <property name="mapsCheckoutTag" value="HEAD" /> |
| <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" /> |
| </target> |
| |
| <target name="checkLocalMaps"> |
| <available property="skipMaps" file="${buildDirectory}/maps" /> |
| </target> |
| |
| <target name="tagMapFiles" if="tagMaps"> |
| <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" /> |
| </target> |
| |
| <!-- ===================================================================== --> |
| |
| <target name="clean" unless="noclean"> |
| <antcall target="allElements"> |
| <param name="target" value="cleanElement" /> |
| </antcall> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before setup --> |
| <!-- ===================================================================== --> |
| <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpath="svnant.jar" /> |
| <target name="preSetup"> |
| <!-- <svn> |
| <checkout url="svn://dev.eclipse.org/svnroot/technology/org.eclipse.stem/trunk" destPath="${base}/checkout_dir" /> |
| </svn> --> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after setup but before starting the build proper --> |
| <!-- ===================================================================== --> |
| <target name="postSetup"> |
| <antcall target="getBaseComponents" /> |
| <!-- Fetch the UI plugin first because that's where the stem.product file is --> |
| <ant antfile="${genericTargets}" target="fetchElement"> |
| <property name="type" value="feature"/> |
| <property name="id" value="org.eclipse.stem.feature"/> |
| </ant> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before fetching the build elements --> |
| <!-- ===================================================================== --> |
| <target name="preFetch"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after fetching the build elements --> |
| <!-- ===================================================================== --> |
| <target name="postFetch"> |
| <!-- This call was added to get the internal data plugin out of the --> |
| <!-- repository to be used later to build the stem.geography plugin --> |
| <!--ant antfile="${genericTargets}" target="fetchElement"> |
| <property name="type" value="plugin"/> |
| <property name="id" value="org.eclipse.stem.internal.data"/> |
| </ant> |
| <ant antfile="${genericTargets}" target="fetchElement"> |
| <property name="type" value="plugin"/> |
| <property name="id" value="org.eclipse.stem.transport"/> |
| </ant--> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before generating the build scripts. --> |
| <!-- ===================================================================== --> |
| <target name="preGenerate"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after generating the build scripts. --> |
| <!-- ===================================================================== --> |
| <target name="postGenerate"> |
| <!--ant antfile="${genericTargets}" target="generateScript"> |
| <property name="type" value="plugin"/> |
| <property name="id" value="org.eclipse.stem.transport"/> |
| </ant> |
| <ant antfile="${genericTargets}" target="generateScript"> |
| <property name="type" value="plugin"/> |
| <property name="id" value="org.eclipse.stem.internal.data"/> |
| </ant--> |
| <!--antcall target="clean" /--> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before running the build.xmls for the elements being built. --> |
| <!-- ===================================================================== --> |
| <target name="preProcess"> |
| <ant dir="${buildDirectory}/plugins/org.eclipse.stem.data.geography.infrastructure.transportation" antfile="build.xml" target="@dot"/> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after running the build.xmls for the elements being built. --> |
| <!-- ===================================================================== --> |
| <target name="postProcess"> |
| <!-- Run the update.xml script from the internal.data plugin to generate all internal data --> |
| <ant antfile="${buildDirectory}/plugins/org.eclipse.stem.internal.data/update.xml"/> |
| |
| <ant dir="${buildDirectory}/plugins/org.eclipse.stem.data.geography" |
| antfile="build.xml" target="@dot"/> |
| |
| <!-- We are building the data.geography plugin again so that the files --> |
| <!-- that were generated in the previous ant call (xxx_names.properties) --> |
| <!-- will be copied to the binary folder to be included in the final jar.--> |
| |
| <!-- We are building the plugin again so that the files that were --> |
| <!-- generated in the previous ant call will be included in the final jar.--> |
| <!--ant dir="${buildDirectory}/plugins/org.eclipse.stem.data.geography.infrastructure.transportation" |
| antfile="build.xml" target="@dot"/--> |
| |
| <!--ant dir="${buildDirectory}/plugins/org.eclipse.stem.transport" |
| antfile="build.xml" target="@dot"/--> |
| |
| <!-- The internal data plugin isn't compiled even though we generate its --> |
| <!-- build.xml file above in postGenerate --> |
| <!--ant dir="${buildDirectory}/plugins/org.eclipse.stem.internal.data" |
| antfile="build.xml" target="@dot"/--> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before running assemble. --> |
| <!-- ===================================================================== --> |
| <target name="preAssemble"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after running assemble. --> |
| <!-- ===================================================================== --> |
| <target name="postAssemble"> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do before running package. --> |
| <!-- ===================================================================== --> |
| <target name="prePackage"> |
| <!-- |
| <delete includeemptydirs="true"> |
| <fileset dir="${buildDirectory}/plugins" defaultexcludes="false"> |
| <include name="**/org.eclipse.stem.internal*/**" /> |
| </fileset> |
| </delete> |
| --> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after running package. --> |
| <!-- ===================================================================== --> |
| <target name="postPackage"> |
| |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do after the build is done. --> |
| <!-- ===================================================================== --> |
| <property name="packagesDir" value="${buildDirectory}/${buildLabel}" /> |
| <!--<property name="packagePostfix" value="${majorVersion}.${forceContextQualifier}" />--> |
| <property name="packagePostfix" value="${buildLabelSuffix}" /> |
| <target name="postBuild"> |
| |
| <!--<antcall target="updateZipFile"> |
| <param name="os_conf" value="macosx.cocoa.x86"/> |
| </antcall> |
| |
| |
| <antcall target="updateZipFile"> |
| <param name="os_conf" value="macosx.cocoa.x86_64"/> |
| </antcall> |
| |
| <antcall target="updateZipFile"> |
| <param name="os_conf" value="linux.gtk.x86"/> |
| </antcall> |
| <antcall target="updateZipFile"> |
| <param name="os_conf" value="linux.gtk.x86_64"/> |
| </antcall> |
| <antcall target="updateZipFile"> |
| <param name="os_conf" value="win32.win32.x86"/> |
| </antcall> |
| <antcall target="updateZipFile"> |
| <param name="os_conf" value="win32.win32.x86_64"/> |
| </antcall> |
| <antcall target="updateZipFile"> |
| <param name="os_conf" value="linux.gtk.ppc64"/> |
| </antcall> |
| |
| --> |
| |
| <!--move file="${packagesDir}/${buildId}-linux.gtk.x86.zip" tofile="${packagesDir}/STEM-linux.gtk.x86-${packagePostfix}.zip"/> |
| <move file="${packagesDir}/${buildId}-linux.gtk.x86_64.zip" tofile="${packagesDir}/STEM-linux.gtk.x86_64-${packagePostfix}.zip"/> |
| <move file="${packagesDir}/${buildId}-win32.win32.x86.zip" tofile="${packagesDir}/STEM-win32-${packagePostfix}.zip"/> |
| <move file="${packagesDir}/${buildId}-macosx.carbon.ppc.zip" tofile="${packagesDir}/STEM-macosx.carbon.ppc-${packagePostfix}.zip"/> |
| <move file="${packagesDir}/${buildId}-macosx.cocoa.x86.zip" tofile="${packagesDir}/STEM-macosx.cocoa.x86-${packagePostfix}.zip"/> |
| <move file="${packagesDir}/${buildId}-linux.gtk.ppc.zip" tofile="${packagesDir}/STEM-linux.gtk.ppc-${packagePostfix}.zip"/--> |
| |
| <!-- Add the default workspace to all zip files --> |
| <!--unzip src="${packagesDir}/STEM-linux.gtk.x86-${packagePostfix}.zip" dest="${packagesDir}/../../resources/configuration"> |
| <patternset> |
| <include name="stem/configuration/config.ini"/> |
| </patternset> |
| <mapper type="flatten"/> |
| </unzip> |
| <propertyfile file="${packagesDir}/../../resources/configuration/config.ini"> |
| <entry key="stem.buildId" value="${packagePostfix}"/> |
| </propertyfile> |
| <zip destfile="${packagesDir}/STEM-linux.gtk.x86-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| <zipfileset dir="${packagesDir}/../../resources/configuration" prefix="stem/configuration"/> |
| </zip> |
| <zip destfile="${packagesDir}/STEM-linux.gtk.x86_64-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| </zip> |
| <zip destfile="${packagesDir}/STEM-win32-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| </zip> |
| <zip destfile="${packagesDir}/STEM-macosx.carbon.ppc-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| </zip> |
| <zip destfile="${packagesDir}/STEM-macosx.cocoa.x86-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| </zip> |
| <zip destfile="${packagesDir}/STEM-linux.gtk.ppc-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| </zip--> |
| |
| |
| <condition property="to.publish.build"> |
| <istrue value="${toPublish}"/> |
| </condition> |
| |
| <antcall target="publish" /> |
| |
| <!-- Check if there is a request to publish the binaries --> |
| <!--<istrue value="${toPublish}"> |
| <antcall target="publish" /> |
| <antcall target="updateWebSiteWithWeeklyBuild" /> |
| </istrue>--> |
| </target> |
| |
| <target name="updateZipFile"> |
| <move file="${packagesDir}/${buildId}-${os_conf}.zip" tofile="${packagesDir}/STEM-${os_conf}-${packagePostfix}.zip"/> |
| <unzip src="${packagesDir}/STEM-${os_conf}-${packagePostfix}.zip" dest="${packagesDir}/../../resources/configuration"> |
| <patternset> |
| <include name="stem/configuration/config.ini"/> |
| </patternset> |
| <mapper type="flatten"/> |
| </unzip> |
| <propertyfile file="${packagesDir}/../../resources/configuration/config.ini"> |
| <entry key="stem.buildId" value="${packagePostfix}"/> |
| </propertyfile> |
| <zip destfile="${packagesDir}/STEM-${os_conf}-${packagePostfix}.zip" update="true"> |
| <zipfileset dir="${packagesDir}/../../resources/workspace" prefix="stem/workspace"/> |
| <!--<zipfileset dir="${packagesDir}/../../resources/configuration" prefix="stem/configuration"/>--> |
| </zip> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do to test the build results --> |
| <!-- ===================================================================== --> |
| <target name="test"> |
| |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Steps to do to publish the build results --> |
| <!-- ===================================================================== --> |
| <property name="publishDirFilePath" value="${publishDir}/${buildTypeFull}" /> |
| <target name="publish" if="to.publish.build"> |
| <!-- If running outside of build.eclipse.org or download1.eclipse.org servers then use this one to SCP the files --> |
| <!--scp todir="${username}:${password}@download1.eclipse.org:~/downloads/stem"> |
| <fileset dir="${packagesDir}"> |
| <include name="STEM-*-${packagePostfix}.zip"/> |
| </fileset> |
| </scp--> |
| <!-- If running on build.eclipse.org or download1.eclipse.org servers, then use this one to copy the files --> |
| <mkdir dir="${publishDirFilePath}"/> |
| |
| |
| <condition property="cleanup.publish.dir.first"> |
| <istrue value="${cleanupFirst}"/> |
| </condition> |
| <antcall target="cleanup.publish.dir" /> |
| |
| <copy todir="${publishDirFilePath}"> |
| <fileset dir="${packagesDir}"> |
| <include name="STEM-*-${packagePostfix}.zip"/> |
| </fileset> |
| </copy> |
| |
| |
| <propertyfile file="${publishDir}/versions"> |
| <entry key="${buildTypeFull}.version" value="${packagePostfix}"/> |
| <entry key="${buildTypeFull}.date" value="${buildDate}"/> |
| </propertyfile> |
| |
| |
| </target> |
| |
| |
| <target name="cleanup.publish.dir" if="cleanup.publish.dir.first"> |
| <delete> |
| <fileset dir="${publishDirFilePath}" includes="**/*"/> |
| </delete> |
| </target> |
| |
| <target name="updateWebSiteWithWeeklyBuild"> |
| <!-- Load the properties file which holds the last weekly/stable build postfixes --> |
| <loadproperties> |
| <file file="${base}/my.properties"/> |
| </loadproperties> |
| |
| <!-- Checkout/updated the STEM website files from CVS --> |
| <cvs cvsRoot="${username}@dev.eclipse.org:/cvsroot/org.eclipse" |
| package="www/stem" |
| dest="${buildDirectory}" |
| /> |
| |
| <!-- Update the downloads.php file --> |
| <replaceregexp byline="true"> |
| <regexp pattern="${lastWeeklyBuild}"/> |
| <substitution expression="${packagePostfix}"/> |
| <fileset dir="${base}/www/stem"> |
| <include name="downloads.php"/> |
| </fileset> |
| </replaceregexp> |
| |
| <!-- Commit the updated downloads.php file into CVS --> |
| <cvs cvsRoot="${username}@dev.eclipse.org:/cvsroot/org.eclipse" |
| package="www/stem" |
| dest="${buildDirectory}/.." |
| command="commit -m 'Updated to Weekly Integration Build ${packagePostfix}'"/> |
| |
| <!-- Save the updated postfix of the weekly build into the properties file --> |
| <propertyfile file="${base}/my.properties"> |
| <entry key="lastWeeklyBuild" value="${packagePostfix}"/> |
| <entry key="lastStableBuild" value="${lastStableBuild}"/> |
| </propertyfile> |
| |
| <!-- Delete the previous weekly build files from the publish directory --> |
| <delete> |
| <fileset dir="${publishDir}"> |
| <include name="STEM-*-${lastWeeklyBuild}.zip"/> |
| </fileset> |
| </delete> |
| </target> |
| |
| <!-- ===================================================================== --> |
| <!-- Default target --> |
| <!-- ===================================================================== --> |
| <target name="noDefault"> |
| <echo message="You must specify a target when invoking this file" /> |
| </target> |
| |
| </project> |