blob: 933c8fc8160fc1742900aed216b90df2a5ad799a [file] [log] [blame]
david_williams88cbf012009-01-12 21:53:05 +00001<?xml version="1.0" encoding="UTF-8"?>
david_williams8f9084f2010-03-01 09:20:55 +00002<!-- Copyright (c) 2009 IBM Corporation and others. All rights reserved.
3 This program and the accompanying materials are made available under the
4 terms of the Eclipse Public License v1.0 which accompanies this distribution,
5 and is available at http://www.eclipse.org/legal/epl-v10.html Contributors:
6 IBM Corporation - initial API and implementation Remember, this script, in
7 workbench, should be ran in "same vm as workspace". -->
david_williams0902bf82009-01-14 05:14:11 +00008<project
9 name="project"
david_williams24b89fd2009-03-13 07:01:50 +000010 default="default"
11 basedir=".">
david_williams0902bf82009-01-14 05:14:11 +000012 <description>script to create a new build component, based on values
13 in property file</description>
david_williams8f9084f2010-03-01 09:20:55 +000014 <!-- If not otherwise specified by caller, hardcode a property file to
15 use (it's used in two ways, one to read in properties, and again in the replace
16 filter elements). -->
david_williams0902bf82009-01-14 05:14:11 +000017 <property
18 name="componentpropertyfile"
david_williams1a67b392010-03-01 20:00:28 +000019 value="servadapt.properties"/>
david_williams2398e362011-03-05 02:45:39 +000020 <property file="${componentpropertyfile}"/>
david_williams8f9084f2010-03-01 09:20:55 +000021 <!-- These are values added to base feature name, before the ".feature"
22 suffix. These are the expected values, but can be overridden in componentpropertyfile. -->
david_williams24b89fd2009-03-13 07:01:50 +000023 <property
24 name="featuresuffix"
david_williams07451a32009-05-20 05:05:44 +000025 value=".feature"/>
david_williams24b89fd2009-03-13 07:01:50 +000026 <property
27 name="sdksuffix"
david_williams97bee852009-06-08 04:44:09 +000028 value="_sdk.feature"/>
david_williams24b89fd2009-03-13 07:01:50 +000029 <property
30 name="testsuffix"
31 value="_tests"/>
32 <property
33 name="incubating"
34 value="true"/>
david_williams81b8fbe2009-11-10 06:24:30 +000035 <property
36 name="prereq.eclipse"
37 value="false"/>
38 <property
david_williamseccfd4f2009-11-10 06:33:26 +000039 name="prereq.eclipseplatform"
david_williams81b8fbe2009-11-10 06:24:30 +000040 value="false"/>
41 <property
42 name="prereq.emf"
43 value="false"/>
44 <property
45 name="prereq.emfxsd"
46 value="false"/>
47 <property
48 name="prereq.emfvalidation"
49 value="false"/>
50 <property
51 name="prereq.gef"
52 value="false"/>
53 <property
54 name="prereq.dtp"
55 value="false"/>
56 <property
57 name="prereq.wst"
58 value="false"/>
59 <property
60 name="prereq.jst"
61 value="false"/>
62 <property
63 name="prereq.wtp"
64 value="false"/>
david_williamsdfc00fc2009-12-18 01:32:27 +000065 <property
66 name="prereq.dltk"
david_williams8f9084f2010-03-01 09:20:55 +000067 value="false"/>
68 <!-- Some simple "get started" scripts to build files for simple build
69 cases. See an existing property file for description of values required.
70 These algorithms/heuristics assume there's only one feature being worked
71 with per component Note: Nothing is done for "dependancies". Note: Pattern
72 of directories created: component/%shortname% component/%shortname%_sdk component/%shortname%_tests
73 distribution/%shortname%.build distribution/%shortname%.site distribution/%shortname%.tests -->
david_williams0902bf82009-01-14 05:14:11 +000074 <target
75 name="default"
david_williams8f9084f2010-03-01 09:20:55 +000076 depends="replaceTokens,initcompPropFile,mvcompshort,mvcompsdk,mvcomptests,mvdistbuild,mvdistsite,mvdisttests">
david_williams2398e362011-03-05 02:45:39 +000077 <echo message=" Created build files for ${shortname}"/>
david_williams8f9084f2010-03-01 09:20:55 +000078 </target>
david_williams2398e362011-03-05 02:45:39 +000079 <target name="initcompPropFile">
80 <property file="${componentpropertyfile}"/>
david_williams8f9084f2010-03-01 09:20:55 +000081 </target>
david_williams2398e362011-03-05 02:45:39 +000082 <target name="mvcompshort">
83 <move todir="../components/${shortname}">
84 <fileset dir="../temp/components/template"/>
david_williams0902bf82009-01-14 05:14:11 +000085 </move>
david_williams8f9084f2010-03-01 09:20:55 +000086 </target>
87 <target
88 name="mvcompsdk"
89 depends="checksdk"
90 unless="nosdk">
david_williams2398e362011-03-05 02:45:39 +000091 <move todir="../components/${shortname}_sdk">
92 <fileset dir="../temp/components/template_sdk"/>
david_williams0902bf82009-01-14 05:14:11 +000093 </move>
david_williams8f9084f2010-03-01 09:20:55 +000094 </target>
95 <target
96 name="mvcomptests"
97 depends="checktest"
98 unless="notest">
david_williams2398e362011-03-05 02:45:39 +000099 <move todir="../components/${shortname}_tests">
100 <fileset dir="../temp/components/template_tests"/>
david_williams0902bf82009-01-14 05:14:11 +0000101 </move>
david_williams8f9084f2010-03-01 09:20:55 +0000102 </target>
david_williams2398e362011-03-05 02:45:39 +0000103 <target name="mvdistbuild">
104 <move todir="../distribution/${shortname}.build">
105 <fileset dir="../temp/distribution/template.build"/>
david_williams0902bf82009-01-14 05:14:11 +0000106 </move>
david_williams8f9084f2010-03-01 09:20:55 +0000107 </target>
david_williams2398e362011-03-05 02:45:39 +0000108 <target name="mvdistsite">
109 <move todir="../distribution/${shortname}.site">
110 <fileset dir="../temp/distribution/template.site"/>
david_williams0902bf82009-01-14 05:14:11 +0000111 </move>
david_williams8f9084f2010-03-01 09:20:55 +0000112 </target>
113 <target
114 name="mvdisttests"
115 depends="checktest"
116 unless="notest">
david_williams2398e362011-03-05 02:45:39 +0000117 <move todir="../distribution/${shortname}.tests">
118 <fileset dir="../temp/distribution/template.tests"/>
david_williams0902bf82009-01-14 05:14:11 +0000119 </move>
120 </target>
david_williams8f9084f2010-03-01 09:20:55 +0000121 <!-- checks -->
david_williams2398e362011-03-05 02:45:39 +0000122 <target name="checksdk">
123 <condition property="nosdk">
david_williams8f9084f2010-03-01 09:20:55 +0000124 <equals
125 arg1="${sdksuffix}"
126 arg2="NONE"/>
127 </condition>
128 </target>
david_williams2398e362011-03-05 02:45:39 +0000129 <target name="checktest">
130 <condition property="notest">
david_williams8f9084f2010-03-01 09:20:55 +0000131 <equals
132 arg1="${testsuffix}"
133 arg2="NONE"/>
134 </condition>
david_williams2398e362011-03-05 02:45:39 +0000135 <echo message="testsuffix: ${testsuffix}"/>
136 <echo message="notest: ${notest}"/>
david_williams8f9084f2010-03-01 09:20:55 +0000137 </target>
138 <!-- replace tokens -->
david_williams0902bf82009-01-14 05:14:11 +0000139 <target
140 name="replaceTokens"
141 depends="copyToTemp"
142 description="replaces tokens based on property file">
143 <replace
144 dir="../temp"
145 value="error-no-value-specified"
146 propertyFile="${componentpropertyfile}">
147 <replacefilter
148 token="@featurename@"
149 property="featurename"/>
150 <replacefilter
david_williams0902bf82009-01-14 05:14:11 +0000151 token="@zipprefix@"
152 property="zipprefix"/>
153 <replacefilter
154 token="@relengmapsenv@"
155 property="relengmapsenv"/>
156 <replacefilter
157 token="@shortname@"
158 property="shortname"/>
159 <replacefilter
160 token="@longdescription@"
161 property="longdescription"/>
david_williams24b89fd2009-03-13 07:01:50 +0000162 <replacefilter
163 token="@featuresuffix@"
164 value="${featuresuffix}"/>
165 <replacefilter
166 token="@sdksuffix@"
167 value="${sdksuffix}"/>
168 <replacefilter
169 token="@testsuffix@"
170 value="${testsuffix}"/>
171 <replacefilter
172 token="@incubating@"
173 value="${incubating}"/>
david_williams81b8fbe2009-11-10 06:24:30 +0000174 <replacefilter
175 token="@prereq.eclipseplatform@"
176 value="${prereq.eclipseplatform}"/>
177 <replacefilter
178 token="@prereq.eclipse@"
179 value="${prereq.eclipse}"/>
180 <replacefilter
david_williams81b8fbe2009-11-10 06:24:30 +0000181 token="@prereq.emf@"
182 value="${prereq.emf}"/>
183 <replacefilter
184 token="@prereq.emfxsd@"
185 value="${prereq.emfxsd}"/>
186 <replacefilter
187 token="@prereq.emfvalidation@"
188 value="${prereq.emfvalidation}"/>
189 <replacefilter
190 token="@prereq.gef@"
191 value="${prereq.gef}"/>
192 <replacefilter
193 token="@prereq.dtp@"
194 value="${prereq.dtp}"/>
195 <replacefilter
196 token="@prereq.wst@"
197 value="${prereq.wst}"/>
198 <replacefilter
199 token="@prereq.jst@"
200 value="${prereq.jst}"/>
201 <replacefilter
202 token="@prereq.wtp@"
203 value="${prereq.wtp}"/>
david_williamsdfc00fc2009-12-18 01:32:27 +0000204 <replacefilter
205 token="@prereq.dltk@"
206 value="${prereq.dltk}"/>
david_williams0902bf82009-01-14 05:14:11 +0000207 </replace>
208 </target>
david_williams2398e362011-03-05 02:45:39 +0000209 <target name="copyToTemp">
david_williams0902bf82009-01-14 05:14:11 +0000210 <copy
211 todir="../temp"
212 overwrite="true">
213 <fileset
214 dir="../buildtemplates"
215 excludes="build.xml, variables.txt, *.properties"/>
216 </copy>
217 </target>
218</project>