blob: a11696cbba76cdbe14e8a30582b79b25948e408f [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright (c) 2009 IBM Corporation and others. All rights
reserved. This program and the accompanying materials are made
available under the terms of the Eclipse Public License v1.0
which accompanies this distribution, and is available at
http://www.eclipse.org/legal/epl-v10.html Contributors: IBM
Corporation - initial API and implementation
-->
<project
name="project"
default="default">
<description>script to create a new build component, based on values
in property file</description>
<!--
If not otherwise specified by caller, hardcode a property file
to use
-->
<property
name="componentpropertyfile"
value="xmlsec.properties"/>
<!--
Some simple "get started" scripts to build files for simple
build cases. See an existing property file for description of
values required. These algorithms/heuristics assume there's only
one feature being worked with per component Note: Nothing is
done for "dependancies". Note: Pattern of directories created:
component/%shortname% component/%shortname%_sdk
component/%shortname%_tests distribution/%shortname%.build
distribution/%shortname%.site distribution/%shortname%.tests
-->
<target
name="default"
depends="replaceTokens">
<property
file="${componentpropertyfile}"/>
<echo
message=" Creating build files for ${shortname}"/>
<move
todir="../components/${shortname}">
<fileset
dir="../temp/components/template"/>
</move>
<move
todir="../components/${shortname}_sdk">
<fileset
dir="../temp/components/template_sdk"/>
</move>
<move
todir="../components/${shortname}_tests">
<fileset
dir="../temp/components/template_tests"/>
</move>
<move
todir="../distribution/${shortname}.build">
<fileset
dir="../temp/distribution/template.build"/>
</move>
<move
todir="../distribution/${shortname}.site">
<fileset
dir="../temp/distribution/template.site"/>
</move>
<move
todir="../distribution/${shortname}.tests">
<fileset
dir="../temp/distribution/template.tests"/>
</move>
</target>
<target
name="replaceTokens"
depends="copyToTemp"
description="replaces tokens based on property file">
<replace
dir="../temp"
value="error-no-value-specified"
propertyFile="${componentpropertyfile}">
<replacefilter
token="@featurename@"
property="featurename"/>
<replacefilter
token="@basicprereq@"
property="basicprereq"/>
<replacefilter
token="@zipprefix@"
property="zipprefix"/>
<replacefilter
token="@relengmapsenv@"
property="relengmapsenv"/>
<replacefilter
token="@shortname@"
property="shortname"/>
<replacefilter
token="@longdescription@"
property="longdescription"/>
<replacefilter
token="@testplugin@"
property="testplugin"/>
</replace>
</target>
<target
name="copyToTemp">
<copy
todir="../temp"
overwrite="true">
<fileset
dir="../buildtemplates"
excludes="build.xml, variables.txt, *.properties"/>
</copy>
</target>
</project>