david_williams | b7db8ba | 2007-02-19 01:54:04 +0000 | [diff] [blame] | 1 | <project name="Build specific targets and properties" default="build" basedir="."> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 2 | |
| 3 | <!-- Note to be cross-platform, "environment variables" are only appropriate for |
| 4 | some variables, e.g. ones we set, since properties are case sensitive, even if |
| 5 | the environment variables on your operating system are not, e.g. it will |
| 6 | be ${env.Path} not ${env.PATH} on Windows --> |
| 7 | <property environment="env" /> |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 8 | <!-- |
| 9 | Let users override standard properties, if desired. |
| 10 | If directory, file, or some properties do not exist, |
| 11 | then standard properties will be used. |
| 12 | --> |
| 13 | <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 14 | |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 15 | <!-- load standard properties for production environment --> |
| 16 | <property file="${env.STANDARD_PROPERTIES_DIR}/${ant.project.name}.properties" /> |
| 17 | <!-- = = = end standard properties pattern = = = --> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 18 | |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 19 | <echo message="ant.file: ${ant.file}"/> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 20 | <target name="build"> |
david_williams | 54315a7 | 2007-02-14 22:50:44 +0000 | [diff] [blame] | 21 | <java jar="${eclipse.launcher}" fork="true" failonerror="true"> |
david_williams | 6252b61 | 2007-02-25 07:23:43 +0000 | [diff] [blame] | 22 | <jvmarg value="-Dosgi.clean=true" /> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 23 | <jvmarg value="-Dosgi.ws=${env.BASEWS}" /> |
| 24 | <jvmarg value="-Dosgi.os=${env.BASEOS}" /> |
| 25 | <jvmarg value="-Dosgi.arch=${env.BASEARCH}" /> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 26 | <jvmarg value="-Dbuild.trial=${build.trial}" /> |
ndai | 7383e5c | 2006-07-08 21:08:01 +0000 | [diff] [blame] | 27 | <jvmarg value="-DbuildBranch=${buildBranch}" /> |
ndai | dab24cb | 2006-07-28 15:22:38 +0000 | [diff] [blame] | 28 | <jvmarg value="-Dbuild.pack-all-in-one=${build.pack-all-in-one}" /> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 29 | <jvmarg value="-DbuildType=${buildType}" /> |
| 30 | <jvmarg value="-DbuildId=${buildId}" /> |
| 31 | <jvmarg value="-DjavacDebugInfo=on" /> |
| 32 | <jvmarg value="-DmapVersionTag=${mapVersionTag}" /> |
| 33 | <jvmarg value="-Dbuild.distribution=${build.distribution}" /> |
| 34 | <jvmarg value="-DbuildDirectory=${buildDirectory}" /> |
| 35 | <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}" /> |
david_williams | b7db8ba | 2007-02-19 01:54:04 +0000 | [diff] [blame] | 36 | <arg value="-data" /> |
| 37 | <arg value="${basedir}/workspace" /> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 38 | <arg value="-application" /> |
| 39 | <arg value="org.eclipse.ant.core.antRunner" /> |
| 40 | <arg value="-buildfile" /> |
| 41 | <arg value="${ant.file}" /> |
| 42 | <arg value="publish" /> |
| 43 | </java> |
| 44 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 45 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 46 | <!-- ===================================================================== --> |
| 47 | <!-- Steps to do to publish the build results --> |
| 48 | <!-- ===================================================================== --> |
| 49 | <target name="publish"> |
| 50 | <dirname file="${ant.file}" property="component.dir" /> |
| 51 | <ant antfile="${wtp.builder.home}/scripts/build/label.xml" /> |
| 52 | <property file="${buildDirectory}/label.properties" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 53 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 54 | <property name="publish.xml" value="${component.dir}/publish.xml" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 55 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 56 | <property name="indexFileName" value="index.php" /> |
| 57 | <property name="result" value="${buildDirectory}/${buildLabel}" /> |
| 58 | <property name="indexTemplateFilename" value="index.html.template" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 59 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 60 | <condition property="isBuildTested" value="true"> |
david_williams | f5f131a | 2007-03-17 06:12:13 +0000 | [diff] [blame^] | 61 | <available file="${buildDirectory}/${buildLabel}/testResults/html" /> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 62 | </condition> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 63 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 64 | <ant antfile="${publish.xml}" dir="${component.dir}"> |
david_williams | d913e92 | 2006-11-13 07:24:21 +0000 | [diff] [blame] | 65 | <property name="dropTokenList" value="%wtpruntime%,%wtpsdk%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jsf-runtime%,%jsf-sdk%,%jsf-tests%,%jpa-runtime%,%jpa-sdk%,%jpa-tests%" /> |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 66 | <property name="webtoolsDownloadURL" value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/> |
ndai | e4d89b2 | 2005-09-14 18:15:14 +0000 | [diff] [blame] | 67 | |
ndai | 837c7ae | 2006-07-08 16:41:44 +0000 | [diff] [blame] | 68 | <property name="buildBranch" value="${buildBranch}" /> |
david_williams | 42f9b24 | 2006-11-27 18:45:14 +0000 | [diff] [blame] | 69 | <property name="build.pack-all-in-one" value="${build.pack-all-in-one}"/> |
ndai | dab24cb | 2006-07-28 15:22:38 +0000 | [diff] [blame] | 70 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 71 | <property name="isBuildTested" value="${isBuildTested}" /> |
| 72 | <property name="indexTemplateFilename" value="${indexTemplateFilename}" /> |
| 73 | </ant> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 74 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 75 | <!-- Get the build map over for the results to point to. --> |
| 76 | <copy file="${buildDirectory}/directory.txt" tofile="${result}/directory.txt" /> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 77 | |
david_williams | 2a01c5a | 2005-11-07 14:27:16 +0000 | [diff] [blame] | 78 | <!-- Copy info for build identification --> |
| 79 | <copy file="${buildDirectory}/buildmachineinfo.properties" tofile="${result}/buildmachineinfo.properties" /> |
| 80 | |
| 81 | </target> |
ndai | b8cedc8 | 2005-09-13 18:00:32 +0000 | [diff] [blame] | 82 | |
| 83 | |
| 84 | </project> |