blob: fc45414ec7a0ea3e7819603d71aa4296f8e7e3a5 [file] [log] [blame]
david_williams8f37c5e2007-10-01 01:05:18 +00001<project
2 name="Build specific targets and properties"
3 default="build"
4 basedir=".">
david_williams42f9b242006-11-27 18:45:14 +00005
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" />
david_williams6252b612007-02-25 07:23:43 +000011 <!--
david_williams8f37c5e2007-10-01 01:05:18 +000012 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" />
david_williams42f9b242006-11-27 18:45:14 +000018
david_williams8f37c5e2007-10-01 01:05:18 +000019 <!-- = = = end standard properties pattern = = = -->
david_williams42f9b242006-11-27 18:45:14 +000020
david_williams8f37c5e2007-10-01 01:05:18 +000021 <echo message="ant.file: ${ant.file}" />
david_williams2a01c5a2005-11-07 14:27:16 +000022 <target name="build">
david_williams8f37c5e2007-10-01 01:05:18 +000023 <java
24 jar="${eclipse.launcher}"
25 fork="true"
26 failonerror="true">
david_williams42f9b242006-11-27 18:45:14 +000027 <jvmarg value="-Dosgi.ws=${env.BASEWS}" />
28 <jvmarg value="-Dosgi.os=${env.BASEOS}" />
29 <jvmarg value="-Dosgi.arch=${env.BASEARCH}" />
david_williams7d822c82008-02-24 04:27:41 +000030 <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}" />
ndai7383e5c2006-07-08 21:08:01 +000031 <jvmarg value="-DbuildBranch=${buildBranch}" />
david_williams2a01c5a2005-11-07 14:27:16 +000032 <jvmarg value="-DbuildType=${buildType}" />
33 <jvmarg value="-DbuildId=${buildId}" />
david_williams2a01c5a2005-11-07 14:27:16 +000034 <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}" />
david_williamsf8ae0dc2008-07-09 04:54:37 +000038 <jvmarg
39 value="-Dprojectname=${projectname}" />
david_williamsb93c1ee2008-02-10 21:27:40 +000040 <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}" />
david_williamsad2097e2008-01-28 06:06:12 +000041 <jvmarg
42 value="-Djava.protocol.handler.pkgs=com.ibm.etools.www.protocol" />
43 <jvmarg
david_williamsa33fbda2008-01-28 23:34:26 +000044 value="-DurlLogLocation=${buildDirectory}/outgoinghttplogfromsitebuild.log" />
45
david_williamsb7db8ba2007-02-19 01:54:04 +000046 <arg value="-data" />
47 <arg value="${basedir}/workspace" />
david_williams2a01c5a2005-11-07 14:27:16 +000048 <arg value="-application" />
49 <arg value="org.eclipse.ant.core.antRunner" />
50 <arg value="-buildfile" />
51 <arg value="${ant.file}" />
52 <arg value="publish" />
53 </java>
54 </target>
ndaib8cedc82005-09-13 18:00:32 +000055
david_williams2a01c5a2005-11-07 14:27:16 +000056 <!-- ===================================================================== -->
57 <!-- Steps to do to publish the build results -->
58 <!-- ===================================================================== -->
59 <target name="publish">
david_williams8f37c5e2007-10-01 01:05:18 +000060 <dirname
61 file="${ant.file}"
62 property="component.dir" />
david_williams2a01c5a2005-11-07 14:27:16 +000063 <ant antfile="${wtp.builder.home}/scripts/build/label.xml" />
64 <property file="${buildDirectory}/label.properties" />
ndaib8cedc82005-09-13 18:00:32 +000065
david_williams8f37c5e2007-10-01 01:05:18 +000066 <property
67 name="publish.xml"
68 value="${component.dir}/publish.xml" />
ndaib8cedc82005-09-13 18:00:32 +000069
david_williams8f37c5e2007-10-01 01:05:18 +000070 <property
71 name="indexFileName"
72 value="index.php" />
73 <property
74 name="result"
75 value="${buildDirectory}/${buildLabel}" />
76 <property
77 name="indexTemplateFilename"
78 value="index.html.template.php" />
79
80 <copy
81 file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
82 tofile="${buildDirectory}/${indexFileName}" />
83
84 <condition
85 property="isBuildTested"
86 value="true">
87 <available
88 file="${buildDirectory}/${buildLabel}/testResults/html" />
david_williams2a01c5a2005-11-07 14:27:16 +000089 </condition>
ndaib8cedc82005-09-13 18:00:32 +000090
david_williams8f37c5e2007-10-01 01:05:18 +000091 <ant
92 antfile="${publish.xml}"
93 dir="${component.dir}">
94 <property
95 name="dropTokenList"
96 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%" />
97 <property
98 name="webtoolsDownloadURL"
99 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops" />
ndaie4d89b22005-09-14 18:15:14 +0000100
david_williams8f37c5e2007-10-01 01:05:18 +0000101 <property
102 name="buildBranch"
103 value="${buildBranch}" />
104 <property
david_williams8f37c5e2007-10-01 01:05:18 +0000105 name="isBuildTested"
106 value="${isBuildTested}" />
107 <property
108 name="indexTemplateFilename"
109 value="${indexTemplateFilename}" />
david_williams2a01c5a2005-11-07 14:27:16 +0000110 </ant>
ndaib8cedc82005-09-13 18:00:32 +0000111
david_williams2a01c5a2005-11-07 14:27:16 +0000112 <!-- Get the build map over for the results to point to. -->
david_williams8f37c5e2007-10-01 01:05:18 +0000113 <copy
114 file="${buildDirectory}/directory.txt"
115 tofile="${result}/directory.txt" />
ndaib8cedc82005-09-13 18:00:32 +0000116
david_williams2a01c5a2005-11-07 14:27:16 +0000117 <!-- Copy info for build identification -->
david_williams8f37c5e2007-10-01 01:05:18 +0000118 <copy
119 file="${buildDirectory}/buildmachineinfo.properties"
120 tofile="${result}/buildmachineinfo.properties" />
david_williams2a01c5a2005-11-07 14:27:16 +0000121
david_williams6a5d6b12008-01-29 00:34:16 +0000122 <!-- http access logs -->
123 <copy todir="${result}/" failonerror="false">
david_williams0b0ee9d2008-01-29 01:56:38 +0000124 <fileset dir="${buildDirectory}" includes="*.log" />
david_williams6a5d6b12008-01-29 00:34:16 +0000125 </copy>
126
127 <!-- ant build log, from control directory -->
128 <copy todir="${result}/" failonerror="false">
david_williams81846f92008-06-23 02:13:58 +0000129 <fileset dir="${env.ANT_WORKING}/${projectname}" includes="antBuilderOutput.log" />
david_williams6a5d6b12008-01-29 00:34:16 +0000130 </copy>
131
david_williams8f37c5e2007-10-01 01:05:18 +0000132 <!-- final count files -->
133 <countBuildFiles
134 sourceDirectory="${buildDirectory}/${buildLabel}"
135 filterString=".zip,.tar.gz"
136 outputFile="${buildDirectory}/${buildLabel}/files.count" />
137
david_williams2a01c5a2005-11-07 14:27:16 +0000138 </target>
ndaib8cedc82005-09-13 18:00:32 +0000139
140
141</project>