blob: 160c62ae7682131dbe2b1840a104ce6c1de8b241 [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
Stephan Herrmann357d42f2010-06-03 13:25:41 +000047 <mkdir dir="${buildDirectory}/maps"/>
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000048 <svn command="export" url="${svn.map.url}" dest="${buildDirectory}/maps/${mapFileName}" />
49 </target>
Stephan Herrmann33c26042010-06-03 10:24:16 +000050
51 <target name="checkLocalMaps">
52 <available property="skipMaps" file="${buildDirectory}/maps" />
53 </target>
54
55 <target name="tagMapFiles" if="tagMaps">
56 <!-- orig:
57 <cvs dest="${buildDirectory}/maps/${mapsRoot}" command="tag ${mapsTagTag}" />
58 -->
59 </target>
60
61 <!-- ===================================================================== -->
62
63 <target name="clean" unless="noclean">
64 <antcall target="allElements">
65 <param name="target" value="cleanElement" />
66 </antcall>
67 </target>
68
69 <target name="gatherLogs">
70 <mkdir dir="${buildDirectory}/${buildLabel}/compilelogs" />
71 <antcall target="allElements">
72 <param name="target" value="gatherLogs" />
73 </antcall>
74 <unzip dest="${buildDirectory}/${buildLabel}/compilelogs" overwrite="true">
75 <fileset dir="${buildDirectory}/features">
76 <include name="**/*.log.zip" />
77 </fileset>
78 </unzip>
79 </target>
80
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000081 <!-- ===================================================================== -->
82 <!-- Steps to do before setup -->
83 <!-- ===================================================================== -->
84 <target name="preSetup">
85 </target>
86
87 <!-- ===================================================================== -->
88 <!-- Steps to do after setup but before starting the build proper -->
89 <!-- ===================================================================== -->
90 <target name="postSetup">
Stephan Herrmann33c26042010-06-03 10:24:16 +000091 <antcall target="getBaseComponents" />
Stephan Herrmanndcd87c12010-04-25 10:59:27 +000092 </target>
93
94 <!-- ===================================================================== -->
95 <!-- Steps to do before fetching the build elements -->
96 <!-- ===================================================================== -->
97 <target name="preFetch">
98 </target>
99
100 <!-- ===================================================================== -->
101 <!-- Steps to do after fetching the build elements -->
102 <!-- ===================================================================== -->
103 <target name="postFetch">
104 <echo message="Inserting OTRE into source tree"/>
105 <copy file="${otre.lib}/otre.jar" todir="${buildDirectory}/plugins/org.eclipse.objectteams.runtime/lib" />
106 <copy file="${otre.lib}/otre_min.jar" todir="${buildDirectory}/plugins/org.eclipse.objectteams.otdt/lib" />
107 <copy file="${otre.lib}/otre_agent.jar" todir="${buildDirectory}/plugins/org.eclipse.objectteams.otdt/lib" />
108 </target>
109
110 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +0000111 <!-- Steps to do before the repositories are being processed -->
112 <!-- ===================================================================== -->
113 <target name="preProcessRepos">
114 </target>
115
116 <!-- ===================================================================== -->
117 <!-- Steps to do after the repositories have been processed -->
118 <!-- ===================================================================== -->
119 <target name="postProcessRepos">
120 </target>
121
122 <!-- ===================================================================== -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000123 <!-- Steps to do before generating the build scripts. -->
124 <!-- ===================================================================== -->
125 <target name="preGenerate">
126 </target>
127
128 <!-- ===================================================================== -->
129 <!-- Steps to do after generating the build scripts. -->
130 <!-- ===================================================================== -->
131 <target name="postGenerate">
Stephan Herrmann33c26042010-06-03 10:24:16 +0000132 <!-- orig:
133 <antcall target="clean" />
134 -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000135 </target>
136
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000137 <!-- ===================================================================== -->
138 <!-- Steps to do before running the build.xmls for the elements being built. -->
139 <!-- ===================================================================== -->
140 <target name="preProcess">
141 </target>
142
143 <!-- ===================================================================== -->
144 <!-- Steps to do after running the build.xmls for the elements being built. -->
145 <!-- ===================================================================== -->
146 <target name="postProcess">
147 </target>
148
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000149 <!-- ===================================================================== -->
150 <!-- Steps to do before running assemble. -->
151 <!-- ===================================================================== -->
152 <target name="preAssemble">
153 </target>
154
155 <!-- ===================================================================== -->
156 <!-- Steps to do after running assemble. -->
157 <!-- ===================================================================== -->
158 <target name="postAssemble">
159 </target>
160
161 <!-- ===================================================================== -->
Stephan Herrmann33c26042010-06-03 10:24:16 +0000162 <!-- Steps to do before running package. -->
163 <!-- ===================================================================== -->
164 <target name="prePackage">
165 </target>
166
167 <!-- ===================================================================== -->
168 <!-- Steps to do after running package. -->
169 <!-- ===================================================================== -->
170 <target name="postPackage">
171 </target>
172
173 <!-- ===================================================================== -->
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000174 <!-- Steps to do after the build is done. -->
175 <!-- ===================================================================== -->
176 <target name="postBuild">
Stephan Herrmann33c26042010-06-03 10:24:16 +0000177 <antcall target="gatherLogs" />
178 </target>
179
180 <!-- ===================================================================== -->
181 <!-- Steps to do to test the build results -->
182 <!-- ===================================================================== -->
183 <target name="test">
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000184 </target>
185
186 <!-- ===================================================================== -->
187 <!-- Steps to do to publish the build results -->
188 <!-- ===================================================================== -->
189 <target name="publish">
190 </target>
191
Stephan Herrmanndcd87c12010-04-25 10:59:27 +0000192 <!-- ===================================================================== -->
193 <!-- Default target -->
194 <!-- ===================================================================== -->
195 <target name="noDefault">
196 <echo message="You must specify a target when invoking this file" />
197 </target>
198
199</project>