blob: 41fbf9e3b6d07efa5076f91efba67eceff4141b4 [file] [log] [blame]
Stephan Herrmanndcd87c12010-04-25 10:59:27 +00001<!--
2 Copyright (c) 2010 Stephan Herrmann and others.
3 All rights reserved. This program and the accompanying materials
4 are made available under the terms of the Eclipse Public License v1.0
5 which accompanies this distribution, and is available at
6 http://www.eclipse.org/legal/epl-v10.html
7
8 Contributors:
9 Stephan Herrmann - initial API and implementation
10-->
11<project name="Build specific targets and properties" default="noDefault" >
12
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000013 <!-- ===================================================================== -->
14 <!-- Run a given ${target} on all elements being built -->
15 <!-- Add on <ant> task for each top level element being built. -->
16 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +000017 <available property="allElementsFile" file="${builder}/allElements.xml" value="${builder}/allElements.xml"/>
18 <property name="allElementsFile" location="${eclipse.pdebuild.templates}/headless-build/allElements.xml"/>
19
20 <import file="${allElementsFile}" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000021 <target name="allElements">
Stephan Herrmann33c26042010-06-03 10:24:16 +000022 <antcall target="allElementsDelegator" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000023 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000024
Stephan Herrmann33c26042010-06-03 10:24:16 +000025 <!-- ===================================================================== -->
26 <!-- ===================================================================== -->
27 <target name="getBaseComponents" depends="checkLocalBase" unless="skipBase">
28 <get src="${eclipseBaseURL}" dest="${buildDirectory}/../temp-base.zip" />
29 <unzip dest="${base}" overwrite="true" src="${buildDirectory}/../temp-base.zip" />
Stephan Herrmann691add92010-05-18 12:02:51 +000030 </target>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000031
Stephan Herrmann33c26042010-06-03 10:24:16 +000032 <target name="checkLocalBase">
33 <available file="${base}" property="skipBase" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000034 </target>
35
36 <!-- ===================================================================== -->
37 <!-- Check out map files from correct repository -->
Stephan Herrmann33c26042010-06-03 10:24:16 +000038 <!-- Replace values for mapsCheckoutTag as desired. -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000039 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +000040 <target name="getMapFiles" depends="checkLocalMaps" unless="skipMaps">
41 <property name="mapsCheckoutTag" value="HEAD" />
42 <!-- orig:
43 <cvs cvsRoot="${mapsRepo}" package="${mapsRoot}" dest="${buildDirectory}/maps" tag="${mapsCheckoutTag}" />
44 -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000045 <property name="svn.map.url" value="${svn.repository.url}/${mapVersionTag}/${pathToMapFile}/${mapFileName}" />
46
47 <svn command="export" url="${svn.map.url}" dest="${buildDirectory}/maps/${mapFileName}" />
48 </target>
Stephan Herrmann33c26042010-06-03 10:24:16 +000049
50 <target name="checkLocalMaps">
51 <available property="skipMaps" file="${buildDirectory}/maps" />
52 </target>
53
54 <target name="tagMapFiles" if="tagMaps">
55 <!-- orig:
56 <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
57 -->
58 </target>
59
60 <!-- ===================================================================== -->
61
62 <target name="clean" unless="noclean">
63 <antcall target="allElements">
64 <param name="target" value="cleanElement" />
65 </antcall>
66 </target>
67
68 <target name="gatherLogs">
69 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
70 <antcall target="allElements">
71 <param name="target" value="gatherLogs" />
72 </antcall>
73 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
74 <fileset dir="${buildDirectory}/features">
75 <include name="**/*.log.zip" />
76 </fileset>
77 </unzip>
78 </target>
79
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000080 <!-- ===================================================================== -->
81 <!-- Steps to do before setup -->
82 <!-- ===================================================================== -->
83 <target name="preSetup">
84 </target>
85
86 <!-- ===================================================================== -->
87 <!-- Steps to do after setup but before starting the build proper -->
88 <!-- ===================================================================== -->
89 <target name="postSetup">
Stephan Herrmann33c26042010-06-03 10:24:16 +000090 <antcall target="getBaseComponents" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000091 </target>
92
93 <!-- ===================================================================== -->
94 <!-- Steps to do before fetching the build elements -->
95 <!-- ===================================================================== -->
96 <target name="preFetch">
97 </target>
98
99 <!-- ===================================================================== -->
100 <!-- Steps to do after fetching the build elements -->
101 <!-- ===================================================================== -->
102 <target name="postFetch">
103 <echo message="Inserting OTRE into source tree"/>
104 <copy file="${otre.lib}/otre.jar" todir="${buildDirectory}/plugins/org.eclipse.objectteams.runtime/lib" />
105 <copy file="${otre.lib}/otre_min.jar" todir="${buildDirectory}/plugins/org.eclipse.objectteams.otdt/lib" />
106 <copy file="${otre.lib}/otre_agent.jar" todir="${buildDirectory}/plugins/org.eclipse.objectteams.otdt/lib" />
107 </target>
108
109 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +0000110 <!-- Steps to do before the repositories are being processed -->
111 <!-- ===================================================================== -->
112 <target name="preProcessRepos">
113 </target>
114
115 <!-- ===================================================================== -->
116 <!-- Steps to do after the repositories have been processed -->
117 <!-- ===================================================================== -->
118 <target name="postProcessRepos">
119 </target>
120
121 <!-- ===================================================================== -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000122 <!-- Steps to do before generating the build scripts. -->
123 <!-- ===================================================================== -->
124 <target name="preGenerate">
125 </target>
126
127 <!-- ===================================================================== -->
128 <!-- Steps to do after generating the build scripts. -->
129 <!-- ===================================================================== -->
130 <target name="postGenerate">
Stephan Herrmann33c26042010-06-03 10:24:16 +0000131 <!-- orig:
132 <antcall target="clean" />
133 -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000134 </target>
135
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000136 <!-- ===================================================================== -->
137 <!-- Steps to do before running the build.xmls for the elements being built. -->
138 <!-- ===================================================================== -->
139 <target name="preProcess">
140 </target>
141
142 <!-- ===================================================================== -->
143 <!-- Steps to do after running the build.xmls for the elements being built. -->
144 <!-- ===================================================================== -->
145 <target name="postProcess">
146 </target>
147
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000148 <!-- ===================================================================== -->
149 <!-- Steps to do before running assemble. -->
150 <!-- ===================================================================== -->
151 <target name="preAssemble">
152 </target>
153
154 <!-- ===================================================================== -->
155 <!-- Steps to do after running assemble. -->
156 <!-- ===================================================================== -->
157 <target name="postAssemble">
158 </target>
159
160 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +0000161 <!-- Steps to do before running package. -->
162 <!-- ===================================================================== -->
163 <target name="prePackage">
164 </target>
165
166 <!-- ===================================================================== -->
167 <!-- Steps to do after running package. -->
168 <!-- ===================================================================== -->
169 <target name="postPackage">
170 </target>
171
172 <!-- ===================================================================== -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000173 <!-- Steps to do after the build is done. -->
174 <!-- ===================================================================== -->
175 <target name="postBuild">
Stephan Herrmann33c26042010-06-03 10:24:16 +0000176 <antcall target="gatherLogs" />
177 </target>
178
179 <!-- ===================================================================== -->
180 <!-- Steps to do to test the build results -->
181 <!-- ===================================================================== -->
182 <target name="test">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000183 </target>
184
185 <!-- ===================================================================== -->
186 <!-- Steps to do to publish the build results -->
187 <!-- ===================================================================== -->
188 <target name="publish">
189 </target>
190
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000191 <!-- ===================================================================== -->
192 <!-- Default target -->
193 <!-- ===================================================================== -->
194 <target name="noDefault">
195 <echo message="You must specify a target when invoking this file" />
196 </target>
197
198</project>