blob: 525818cdb0126a0ca3368ae44e1ebb21d479d5d8 [file] [log] [blame]
david_williams88cbf012009-01-12 21:53:05 +00001<?xml version="1.0" encoding="UTF-8"?>
2<!-- ======================================================================
3
4##########################################################################
5# Copyright (c) 2009 IBM Corporation and others.
6# All rights reserved. This program and the accompanying materials
7# are made available under the terms of the Eclipse Public License v1.0
8# which accompanies this distribution, and is available at
9# http://www.eclipse.org/legal/epl-v10.html
10#
11# Contributors:
12# IBM Corporation - initial API and implementation
13##########################################################################
14
15
16 Jan 12, 2009 4:01:53 AM
17
18 buildtemplates
19
20 Some simple "get started" scripts to
21 build files for simple cases.
22
23 These algorithms/heuristics assume there's only one
24 feature being worked with per component
25
26 Note:
27 Nothing is done for "dependancies".
28
29 Note:
30 In components, the build.properties and dependency.xml files can stay as they are in templates
31 (they differ, very slightly from each other).
32
33 Note:
34 foldername pattern:
35
36 component/%shortname%
37 component/%shortname%_sdk
38 component/%shortname%_tests
39 distribution/%shortname%.build
40 distribution/%shortname%.site
41 distribution/%shortname%.tests
42
43 davidw
44 ====================================================================== -->
45<project name="project" default="default">
46 <description>
47 script to create new component build
48 </description>
49
david_williams067725b2009-01-13 06:31:51 +000050 <property name="componentpropertyfile" value="xmlsec.properties" />
david_williams88cbf012009-01-12 21:53:05 +000051
52
53 <target name="default" depends="replaceTokens">
54 <property file="${componentpropertyfile}" />
55 <echo message=" Creating build files for ${shortname}" />
56
david_williams067725b2009-01-13 06:31:51 +000057 <move todir="../components/${shortname}">
david_williams88cbf012009-01-12 21:53:05 +000058 <fileset dir="../temp/components/template" />
59 </move>
david_williams067725b2009-01-13 06:31:51 +000060 <move todir="../components/${shortname}_sdk">
david_williams88cbf012009-01-12 21:53:05 +000061 <fileset dir="../temp/components/template_sdk" />
62 </move>
david_williams067725b2009-01-13 06:31:51 +000063 <move todir="../components/${shortname}_tests">
david_williams88cbf012009-01-12 21:53:05 +000064 <fileset dir="../temp/components/template_tests" />
65 </move>
david_williams067725b2009-01-13 06:31:51 +000066 <move todir="../distribution/${shortname}.build">
david_williams88cbf012009-01-12 21:53:05 +000067 <fileset dir="../temp/distribution/template.build" />
68 </move>
david_williams067725b2009-01-13 06:31:51 +000069 <move todir="../distribution/${shortname}.site">
david_williams88cbf012009-01-12 21:53:05 +000070 <fileset dir="../temp/distribution/template.site" />
71 </move>
david_williams067725b2009-01-13 06:31:51 +000072 <move todir="../distribution/${shortname}.tests">
david_williams88cbf012009-01-12 21:53:05 +000073 <fileset dir="../temp/distribution/template.tests" />
74 </move>
75 </target>
76
77 <target name="replaceTokens" depends="copyToTemp" description="replaces tokens based on property file">
78 <replace dir="../temp" value="error-no-value-specified" propertyFile="${componentpropertyfile}">
79 <replacefilter token="@featurename@" property="featurename" />
80 <replacefilter token="@zipprefix@" property="zipprefix" />
81 <replacefilter token="@relengmapsenv@" property="relengmapsenv" />
82 <replacefilter token="@shortname@" property="shortname" />
83 <replacefilter token="@longdescription@" property="longdescription" />
84 <replacefilter token="@testplugin@" property="testplugin" />
85 </replace>
86
87 </target>
88
89 <target name="copyToTemp">
90 <copy todir="../temp" overwrite="true">
91 <fileset dir="../buildtemplates" excludes="build.xml, variables.txt, *.properties" />
92 </copy>
93 </target>
94
95</project>