blob: 6b02744db87b6f7dc52c4ec92fdde96409ef3f1a [file] [log] [blame]
david_williamsea862da2009-05-20 04:01:39 +00001<project
2 name="Build specific targets and properties"
3 default="build"
4 basedir=".">
5 <!--
6 Note to be cross-platform, "environment variables" are only
7 appropriate for some variables, e.g. ones we set, since
8 properties are case sensitive, even if the environment variables
9 on your operating system are not, e.g. it will be ${env.Path}
10 not ${env.PATH} on Windows
11 -->
david_williams2398e362011-03-05 02:45:39 +000012 <property environment="env"/>
david_williamsea862da2009-05-20 04:01:39 +000013 <!--
14 Let users override standard properties, if desired. If
15 directory, file, or some properties do not exist, then standard
16 properties will be used.
17 -->
david_williams2398e362011-03-05 02:45:39 +000018 <property file="${env.LOCAL_BUILD_PROPERTIES_DIR}/${ant.project.name}.properties"/>
david_williamsea862da2009-05-20 04:01:39 +000019
20 <!-- = = = end standard properties pattern = = = -->
david_williams14cadd12011-03-23 06:43:39 +000021 <echo level="debug" message="ant.file: ${ant.file}"/>
david_williamsba00a342011-03-12 05:11:19 +000022 <condition
23 property="antQuietValue"
24 value="-quiet"
25 else="">
26 <istrue value="${env.USE_QUIET}"/>
27 </condition>
david_williams2398e362011-03-05 02:45:39 +000028 <target name="build">
29 <mkdir dir="${buildDirectory}/${buildLabel}"/>
david_williamsea862da2009-05-20 04:01:39 +000030 <java
david_williamsea862da2009-05-20 04:01:39 +000031 fork="true"
david_williamsef62fc42011-03-18 02:33:39 +000032 failonerror="true"
33 classname="org.eclipse.equinox.launcher.Main">
34 <classpath>
35 <fileset dir="${pde.builder.path}/plugins">
36 <include name="org.eclipse.equinox.launcher_*.jar"/>
37 </fileset>
38 </classpath>
david_williams2398e362011-03-05 02:45:39 +000039 <jvmarg value="-Dosgi.ws=${env.BASEWS}"/>
40 <jvmarg value="-Dosgi.os=${env.BASEOS}"/>
41 <jvmarg value="-Dosgi.arch=${env.BASEARCH}"/>
42 <jvmarg value="-Dbuild.donottagmaps=${build.donottagmaps}"/>
43 <jvmarg value="-DbuildBranch=${buildBranch}"/>
44 <jvmarg value="-DbuildType=${buildType}"/>
45 <jvmarg value="-DdependencyFileLocation=${dependencyFileLocation}"/>
46 <jvmarg value="-DtestdependencyFileLocation=${testdependencyFileLocation}"/>
47 <jvmarg value="-DbuildId=${buildId}"/>
48 <jvmarg value="-DmapVersionTag=${mapVersionTag}"/>
49 <jvmarg value="-Dbuild.distribution=${build.distribution}"/>
50 <jvmarg value="-DbuildDirectory=${buildDirectory}"/>
51 <jvmarg value="-Dwtp.builder.home=${wtp.builder.home}"/>
52 <jvmarg value="-Djava.io.tmpdir=${env.RECOMMENDED_TMP_DIR}"/>
53 <jvmarg value="-Dprojectname=${projectname}"/>
david_williams204cb1e2011-09-25 04:34:37 +000054 <jvmarg value="-Djava.protocol.handler.pkgs=org.eclipse.wtp.releng.www.protocol"/>
david_williams2398e362011-03-05 02:45:39 +000055 <jvmarg value="-DurlLogLocation=${buildDirectory}/${buildLabel}/outgoinghttplogfromsitebuild.log"/>
56 <arg value="-data"/>
57 <arg value="${basedir}/workspace"/>
58 <arg value="-application"/>
59 <arg value="org.eclipse.ant.core.antRunner"/>
david_williamsba00a342011-03-12 05:11:19 +000060 <arg value="${antQuietValue}"/>
david_williams2398e362011-03-05 02:45:39 +000061 <arg value="-buildfile"/>
62 <arg value="${ant.file}"/>
63 <arg value="publish"/>
david_williamsea862da2009-05-20 04:01:39 +000064 </java>
65 </target>
66 <!--
67 =====================================================================
68 -->
69 <!-- Steps to do to publish the build results -->
70 <!--
71 =====================================================================
72 -->
david_williams2398e362011-03-05 02:45:39 +000073 <target name="publish">
david_williamsea862da2009-05-20 04:01:39 +000074 <dirname
75 file="${ant.file}"
76 property="component.dir"/>
david_williams2398e362011-03-05 02:45:39 +000077 <ant antfile="${wtp.builder.home}/scripts/build/label.xml"/>
78 <property file="${buildDirectory}/label.properties"/>
david_williamsea862da2009-05-20 04:01:39 +000079 <property
80 name="publish.xml"
81 value="${component.dir}/publish.xml"/>
82 <property
83 name="indexFileName"
84 value="index.php"/>
85 <property
86 name="result"
87 value="${buildDirectory}/${buildLabel}"/>
88 <property
89 name="indexTemplateFilename"
90 value="index.html.template.php"/>
91 <copy
92 file="${wtp.builder.home}/distribution/wtp.site/templateFiles/${indexTemplateFilename}"
93 tofile="${buildDirectory}/${indexFileName}"/>
94 <condition
95 property="isBuildTested"
96 value="true">
david_williams2398e362011-03-05 02:45:39 +000097 <available file="${buildDirectory}/${buildLabel}/testResults/html"/>
david_williamsea862da2009-05-20 04:01:39 +000098 </condition>
99 <ant
100 antfile="${publish.xml}"
101 dir="${component.dir}">
102 <property
103 name="dropTokenList"
104 value="%wtpruntime%,%wtpsdk%,%wtptest%,%wst%,%wst-sdk%,%wst-tests%,%jst-tests%,%wst-perf-tests%,%jst-perf-tests%,%jpt-runtime%,%jpt-sdk%,%jpt-tests%"/>
105 <property
106 name="webtoolsDownloadURL"
107 value="http://www.eclipse.org/downloads/download.php?file=/webtools/committers/drops"/>
108 <property
109 name="buildBranch"
110 value="${buildBranch}"/>
111 <property
112 name="isBuildTested"
113 value="${isBuildTested}"/>
114 <property
115 name="indexTemplateFilename"
116 value="${indexTemplateFilename}"/>
117 </ant>
118
119 <!-- Get the build map over for the results to point to. -->
120 <copy
121 file="${buildDirectory}/directory.txt"
122 tofile="${result}/directory.txt"/>
123
124 <!-- Copy info for build identification -->
125 <copy
david_williams1ae20302010-09-11 01:34:56 +0000126 file="${buildDirectory}/label.properties"
127 tofile="${result}/label.properties"/>
david_williamsea862da2009-05-20 04:01:39 +0000128
129 <!-- http access logs -->
130 <copy
131 todir="${result}/"
132 failonerror="false">
133 <fileset
134 dir="${buildDirectory}"
135 includes="*.log"/>
136 </copy>
137
138 <!-- ant build log, from control directory -->
139 <copy
140 todir="${result}/"
141 failonerror="false">
142 <fileset
143 dir="${env.ANT_WORKING}/${projectname}"
144 includes="antBuilderOutput.log"/>
145 </copy>
146
147
148
149 <!-- final count files -->
150 <countBuildFiles
151 sourceDirectory="${buildDirectory}/${buildLabel}"
152 filterString=".zip,.tar.gz"
153 outputFile="${buildDirectory}/${buildLabel}/files.count"/>
154 </target>
155</project>