Adding phpdoc tags to String[] array so the code scanner will pick them up and do...
[phpeclipse.git] / utilities / pluginbuilder / build.xml
1 <!--  This script will not be uploaded to the server.\r
2       PLEASE DO NOT MODIFY \r
3       If you modify this script it is likely that the build will not work on the server\r
4 -->\r
5 <project name="Build Facade" default="main">\r
6         <taskdef resource="org/pluginbuilder/anttasks/pluginbuildertasks.properties" classpath="build-files/pluginbuilder-anttasks.jar" />\r
7         \r
8         <property file="build_local.properties" />\r
9         <property name="eclipse.installation.dir" value="${eclipseDir}"/>\r
10         <property name="eclipse.local.tar.non.server" value="${test.eclipse.zip}"/>\r
11         <import file="build-files/build_shared.xml"/>\r
12         \r
13         <target name="-properties">             \r
14                 \r
15                 <!-- versioning -->\r
16                 <property name="build.version" value="HEAD"/>\r
17                 <property file="releases/${build.version}.properties" />\r
18                 <tstamp>\r
19                       <format property="version.qualifier" pattern="yyyyMMddHHmm" timezone="GMT" unit="minute"/>\r
20                 </tstamp>\r
21                 \r
22                 <property name="buildTypePresentation" value=""/>\r
23                 <property name="version.full" value="${version}.${version.qualifier}${buildTypePresentation}"/>\r
24 \r
25                 <!-- includes -->\r
26                 <property file="build_local.properties" />\r
27                 <property file="pluginbuilder.config" />\r
28                 \r
29                 <!-- set defaults -->\r
30                 <property name="buildTarget" value="main"/>\r
31                 <property name="verboseAnt" value="-Ddummy=true"/>\r
32                 \r
33                 <!-- check if clean should be called -->\r
34                 <condition property="is.clean">\r
35                         <or>\r
36                                 <equals arg1="main" arg2="${buildTarget}" trim="true"/>\r
37                                 <equals arg1="fetch" arg2="${buildTarget}" trim="true"/>\r
38                         </or>\r
39                 </condition>\r
40                                 \r
41         </target>\r
42                 \r
43         <target name="-prepare.build.host">\r
44 \r
45                 <antcall target="unpack.eclipse"/>\r
46                 \r
47                 <available type="dir" file="${eclipseDir}/plugins" property="eclipseDir.plugins.exists"/>\r
48                 <fail message="Could not find directory ${eclipseDir}/plugins. Please check eclipseDir in build_local.properties" unless="eclipseDir.plugins.exists"/>\r
49                 \r
50                 <!-- determine buildfiles -->\r
51                 <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.pde.build" filePath="scripts/build.xml" property="regularbuildfile" />         \r
52                 <dirname file="${regularbuildfile}" property="scriptdir"/>\r
53                 <property name="productbuildfile" value="${scriptdir}/productBuild/productBuild.xml"/>\r
54         \r
55                 <!-- determine launcher -->\r
56                 <BundleFileLocator eclipseInstallationRoot="${eclipseDir}" bundleId="org.eclipse.equinox.launcher" property="equinoxjar" />             \r
57 \r
58         </target>\r
59         \r
60         <target name="-clean" if="is.clean">\r
61                 <echo level="info" message="Cleaning directory ${buildDirectory}"/>\r
62                 <delete dir="${buildDirectory}" verbose="false"/>\r
63                 <mkdir dir="${buildDirectory}"/>\r
64         </target>\r
65         \r
66         <target name="-build" depends="-properties,-clean,-prepare.build.host">\r
67                 <condition property="no.rcp.build" value="true">\r
68                         <not>\r
69                                 <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>\r
70                         </not>\r
71                 </condition>\r
72                 <antcall target="-build.rcp.internal"/>\r
73                 <antcall target="-build.internal">\r
74                         <param name="buildfile" value="${regularbuildfile}"/>\r
75                         <param name="varjvmargs1" value="-Dconfigs=*,*,*"/>\r
76                         <param name="varjvmargs2" value="-Ddummy2=2"/>\r
77             </antcall>\r
78         </target>\r
79         \r
80         <target name="-build.rcp.internal" unless="no.rcp.build">\r
81                 <antcall target="-build.internal"> \r
82                         <param name="buildfile" value="${productbuildfile}"/>\r
83                         <param name="varjvmargs1" value="-Dno.postBuild=true"/>\r
84                         <param name="varjvmargs2" value="-Dbuild.container.feature=true"/>\r
85                 </antcall>\r
86         </target>\r
87         \r
88         <target name="rcp" unless="no.rcp.build" depends="-properties,-clean,-prepare.build.host" description="Build RCP">\r
89                 <condition property="no.rcp.build" value="true">\r
90                         <not>\r
91                                 <equals arg1="${pluginbuilder.is.rcpbuild}" arg2="true"/>\r
92                         </not>\r
93                 </condition>\r
94                 <fail message="Please enable and configure an RCP build in the Plug-in Builder Editor before calling this target." if="no.rcp.build"/>\r
95                 <antcall target="-build.internal">\r
96                         <param name="buildfile" value="${productbuildfile}"/>\r
97                         <param name="varjvmargs1" value="-Dno.postBuild=true"/>\r
98                         <param name="varjvmargs2" value="-Dbuild.container.feature=true"/>\r
99         </antcall>\r
100         </target>\r
101 \r
102         <target name="-build.internal">\r
103                 <property name="buildResultsDirectory" value="${buildDirectory}/results" />\r
104                 <java classname="org.eclipse.equinox.launcher.Main" fork="true" \r
105                         failonerror="true" errorproperty="build.stderr">\r
106                         <arg value="-ws" />\r
107                         <arg value="${ws}" />\r
108                         <arg value="-os" />\r
109                         <arg value="${os}" />\r
110                         <arg value="-application" />\r
111                         <arg value="org.eclipse.ant.core.antRunner" />\r
112                         <arg value="-buildfile" />\r
113                         <arg value="${buildfile}" />\r
114                         <arg value="${buildTarget}" />\r
115                         <arg value="-data" />\r
116                         <arg value="${buildDirectory}/workspace" />\r
117                         <arg value="${verboseAnt}"/>\r
118                         <jvmarg value="-Dbasews=${ws}" />\r
119                         <jvmarg value="-Dbaseos=${os}" />\r
120                         <jvmarg value="-Dbasearch=${arch}" />\r
121                         <jvmarg value="-Dbuilder=${buildHome}/build-files" />\r
122                         <jvmarg value="-DjavacFailOnError=true"/>\r
123                         <jvmarg value="-DbuildDirectory=${buildDirectory}"/>\r
124                         <jvmarg value="-DbuildResultsDirectory=${buildResultsDirectory}"/>\r
125                         <jvmarg value="-DbaseLocation=${eclipseDir}"/>\r
126                         <jvmarg value="-DbuildHome=${buildHome}"/>\r
127                         <jvmarg value="-Dversion.full=${version.full}"/>\r
128                         <jvmarg value="-Dversion.qualifier=${version.qualifier}${buildTypePresentation}"/>\r
129                         <jvmarg value="-DbuildType=${buildType}"/>\r
130                         <jvmarg value="-Dphpeclipse_build_target=${phpeclipse_build_target}" />\r
131                         <jvmarg value="-DfetchTag=${fetchTag}"/>\r
132                         <jvmarg value="${varjvmargs1}"/>\r
133                         <jvmarg value="${varjvmargs2}"/>\r
134         \r
135                  <jvmarg value="-Dtest.eclipse.zip=${test.eclipse.zip}"/>\r
136 \r
137                         <classpath>\r
138                                 <pathelement location="${equinoxjar}" />\r
139                         </classpath>\r
140                 </java>\r
141             <echo>${build.stderr}</echo>\r
142                 <condition property="is.build.error" value="true">\r
143                         <contains string="${build.stderr}" substring="BUILD FAILED"/>\r
144                 </condition>\r
145                 <fail message="PDE Build failed" if="is.build.error"/>\r
146         </target>\r
147         \r
148         <target name="main-cc"\r
149                         description="This target is suited to be run from cruisecontrol. The property 'label' is expected to be set from cruisecontrol.">\r
150                          <exec executable="date" outputproperty="label">\r
151         <arg value="+%Y%m%d%H%M" />\r
152         </exec>\r
153                 <property name="version.full" value="${label}"/> \r
154                 <!-- TODO: extract qualifier correctly from label -->\r
155                 <property name="version.qualifier" value="${label}"/>           \r
156                 <antcall target="-build"/>\r
157         </target>\r
158         \r
159         <target name="main" description="Run the main target of customTargets.xml.">\r
160                 <property name="buildTarget" value="main"/>\r
161                 <antcall target="-build"/>\r
162         </target>\r
163 \r
164         <target name="fetch" description="Run the fetch target of customTargets.xml.">\r
165                 <property name="buildTarget" value="fetch"/>\r
166                 <antcall target="-build"/>\r
167         </target>       \r
168         \r
169         <target name="generate" description="Run the generate target of customTargets.xml.">\r
170                 <property name="buildTarget" value="generate"/>\r
171                 <antcall target="-build"/>\r
172         </target>\r
173         \r
174         <target name="process" description="Run the process target of customTargets.xml.">\r
175                 <property name="buildTarget" value="process"/>\r
176                 <antcall target="-build"/>\r
177         </target>\r
178                         \r
179         <target name="assemble" description="Run the assemble target of customTargets.xml.">\r
180                 <property name="buildTarget" value="assemble"/>\r
181                 <antcall target="-build"/>\r
182         </target>\r
183         \r
184         <target name="postBuild" description="Run the postBuild target of customTargets.xml.">\r
185                 <property name="buildTarget" value="postBuild"/>\r
186                 <antcall target="-build"/>\r
187         </target>\r
188         \r
189         <target name="buildProperties" description="Print out derived properties for the current build." depends="-properties">\r
190                 <fail message="You have to set the property 'buildPropertiesFile' if calling buildProperties" unless="buildPropertiesFile"/>\r
191                 <condition property="subdir" value="nightly" else="releases">\r
192                         <equals arg1="${buildType}" arg2="N"/>\r
193                 </condition>\r
194                 <echo file="${buildPropertiesFile}">relativeServerResultsDir: ${subdir}/${version.full}</echo>\r
195         </target>\r
196 \r
197 </project>\r