david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 1 | <project |
| 2 | name="Build specific targets and properties" |
| 3 | default="build" |
| 4 | basedir="."> |
| 5 | |
| 6 | <!-- Note to be cross-platform, "environment variables" are only appropriate for |
| 7 | some variables, e.g. ones we set, since properties are case sensitive, even if |
| 8 | the environment variables on your operating system are not, e.g. it will |
| 9 | be ${env.Path} not ${env.PATH} on Windows --> |
| 10 | <property environment="env" /> |
| 11 | <!-- |
| 12 | Let users override standard properties, if desired. |
| 13 | If directory, file, or some properties do not exist, |
| 14 | then standard properties will be used. |
| 15 | --> |
| 16 | <property |
| 17 | file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| 18 | |
| 19 | <!-- = = = end standard properties pattern = = = --> |
| 20 | |
| 21 | <echo message="ant.file: ${ant.file}" /> |
| 22 | <target name="build"> |
| 23 | <java |
| 24 | jar="${eclipse.launcher}" |
| 25 | fork="true" |
| 26 | failonerror="true"> |
| 27 | <jvmarg value="-Dosgi.ws=${env.BASEWS}" /> |
| 28 | <jvmarg value="-Dosgi.os=${env.BASEOS}" /> |
| 29 | <jvmarg value="-Dosgi.arch=${env.BASEARCH}" /> |
| 30 | <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}" /> |
| 31 | <jvmarg value="-DbuildBranch=${buildBranch}" /> |
| 32 | <jvmarg value="-DbuildType=${buildType}" /> |
| 33 | <jvmarg value="-DbuildId=${buildId}" /> |
| 34 | <jvmarg value="-DmapVersionTag=${mapVersionTag}" /> |
| 35 | <jvmarg value="-Dbuild.distribution=${build.distribution}" /> |
| 36 | <jvmarg value="-DbuildDirectory=${buildDirectory}" /> |
| 37 | <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> |
| 38 | <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" /> |
| 39 | <jvmarg |
| 40 | value="-Dprojectname=${projectname}" /> |
| 41 | <arg value="-data" /> |
| 42 | <arg value="${basedir}/workspace" /> |
| 43 | <arg value="-application" /> |
| 44 | <arg value="org.eclipse.ant.core.antRunner" /> |
| 45 | <arg value="-buildfile" /> |
| 46 | <arg value="${ant.file}" /> |
| 47 | <arg value="publish" /> |
| 48 | </java> |
| 49 | </target> |
| 50 | |
| 51 | <!-- ===================================================================== --> |
| 52 | <!-- Steps to do to publish the build results --> |
| 53 | <!-- ===================================================================== --> |
| 54 | <target name="publish"> |
| 55 | <dirname |
| 56 | file="${ant.file}" |
| 57 | property="component.dir" /> |
| 58 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> |
| 59 | <property file="${buildDirectory}/label.properties" /> |
| 60 | |
| 61 | <property |
| 62 | name="publish.xml" |
| 63 | value="${component.dir}/publish.xml" /> |
| 64 | |
| 65 | <property |
| 66 | name="indexFileName" |
| 67 | value="index.php" /> |
| 68 | <property |
| 69 | name="result" |
| 70 | value="${buildDirectory}/${buildLabel}" /> |
| 71 | <property |
| 72 | name="indexTemplateFilename" |
| 73 | value="index.html.template.php" /> |
| 74 | |
| 75 | <copy |
| 76 | file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}" |
| 77 | tofile="${buildDirectory}/${indexFileName}" /> |
| 78 | |
| 79 | <condition |
| 80 | property="isBuildTested" |
| 81 | value="true"> |
| 82 | <available |
| 83 | file="${buildDirectory}/${buildLabel}/testResults/html" /> |
| 84 | </condition> |
| 85 | |
| 86 | <ant |
| 87 | antfile="${publish.xml}" |
| 88 | dir="${component.dir}"> |
| 89 | <property |
| 90 | name="dropTokenList" |
| 91 | value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%" /> |
| 92 | <property |
| 93 | name="webtoolsDownloadURL" |
| 94 | value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops" /> |
| 95 | |
| 96 | <property |
| 97 | name="buildBranch" |
| 98 | value="${buildBranch}" /> |
| 99 | <property |
| 100 | name="isBuildTested" |
| 101 | value="${isBuildTested}" /> |
| 102 | <property |
| 103 | name="indexTemplateFilename" |
| 104 | value="${indexTemplateFilename}" /> |
| 105 | </ant> |
| 106 | |
| 107 | <!-- Get the build map over for the results to point to. --> |
| 108 | <copy |
| 109 | file="${buildDirectory}/directory.txt" |
| 110 | tofile="${result}/directory.txt" /> |
| 111 | |
| 112 | <!-- Copy info for build identification --> |
| 113 | <copy |
| 114 | file="${buildDirectory}/buildmachineinfo.properties" |
| 115 | tofile="${result}/buildmachineinfo.properties" /> |
| 116 | |
| 117 | <!-- final count files --> |
| 118 | <countBuildFiles |
| 119 | sourceDirectory="${buildDirectory}/${buildLabel}" |
| 120 | filterString=".zip,.tar.gz" |
| 121 | outputFile="${buildDirectory}/${buildLabel}/files.count" /> |
| 122 | |
| 123 | </target> |
| 124 | |
| 125 | |
| 126 | </project> |