blob: a11696cbba76cdbe14e8a30582b79b25948e408f [file] [log] [blame]
david_williams88cbf012009-01-12 21:53:05 +00001<?xml version="1.0" encoding="UTF-8"?>
david_williams0902bf82009-01-14 05:14:11 +00002 <!--
3 Copyright (c) 2009 IBM Corporation and others. All rights
4 reserved. This program and the accompanying materials are made
5 available under the terms of the Eclipse Public License v1.0
6 which accompanies this distribution, and is available at
7 http://www.eclipse.org/legal/epl-v10.html Contributors: IBM
8 Corporation - initial API and implementation
9 -->
10<project
11 name="project"
12 default="default">
13 <description>script to create a new build component, based on values
14 in property file</description>
david_williamsd8ee4ad2009-01-14 13:49:50 +000015 <!--
16 If not otherwise specified by caller, hardcode a property file
17 to use
18 -->
david_williams0902bf82009-01-14 05:14:11 +000019 <property
20 name="componentpropertyfile"
david_williams8eb01032009-01-14 08:32:59 +000021 value="xmlsec.properties"/>
david_williams0902bf82009-01-14 05:14:11 +000022 <!--
23 Some simple "get started" scripts to build files for simple
24 build cases. See an existing property file for description of
25 values required. These algorithms/heuristics assume there's only
26 one feature being worked with per component Note: Nothing is
27 done for "dependancies". Note: Pattern of directories created:
28 component/%shortname% component/%shortname%_sdk
29 component/%shortname%_tests distribution/%shortname%.build
30 distribution/%shortname%.site distribution/%shortname%.tests
31 -->
32 <target
33 name="default"
34 depends="replaceTokens">
35 <property
36 file="${componentpropertyfile}"/>
37 <echo
38 message=" Creating build files for ${shortname}"/>
39 <move
40 todir="../components/${shortname}">
41 <fileset
42 dir="../temp/components/template"/>
43 </move>
44 <move
45 todir="../components/${shortname}_sdk">
46 <fileset
47 dir="../temp/components/template_sdk"/>
48 </move>
49 <move
50 todir="../components/${shortname}_tests">
51 <fileset
52 dir="../temp/components/template_tests"/>
53 </move>
54 <move
55 todir="../distribution/${shortname}.build">
56 <fileset
57 dir="../temp/distribution/template.build"/>
58 </move>
59 <move
60 todir="../distribution/${shortname}.site">
61 <fileset
62 dir="../temp/distribution/template.site"/>
63 </move>
64 <move
65 todir="../distribution/${shortname}.tests">
66 <fileset
67 dir="../temp/distribution/template.tests"/>
68 </move>
69 </target>
70 <target
71 name="replaceTokens"
72 depends="copyToTemp"
73 description="replaces tokens based on property file">
74 <replace
75 dir="../temp"
76 value="error-no-value-specified"
77 propertyFile="${componentpropertyfile}">
78 <replacefilter
79 token="@featurename@"
80 property="featurename"/>
81 <replacefilter
82 token="@basicprereq@"
83 property="basicprereq"/>
84 <replacefilter
85 token="@zipprefix@"
86 property="zipprefix"/>
87 <replacefilter
88 token="@relengmapsenv@"
89 property="relengmapsenv"/>
90 <replacefilter
91 token="@shortname@"
92 property="shortname"/>
93 <replacefilter
94 token="@longdescription@"
95 property="longdescription"/>
96 <replacefilter
97 token="@testplugin@"
98 property="testplugin"/>
99 </replace>
100 </target>
101 <target
102 name="copyToTemp">
103 <copy
104 todir="../temp"
105 overwrite="true">
106 <fileset
107 dir="../buildtemplates"
108 excludes="build.xml, variables.txt, *.properties"/>
109 </copy>
110 </target>
111</project>