blob: 525818cdb0126a0ca3368ae44e1ebb21d479d5d8 [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
##########################################################################
Jan 12, 2009 4:01:53 AM
buildtemplates
Some simple "get started" scripts to
build files for simple cases.
These algorithms/heuristics assume there's only one
feature being worked with per component
Note:
Nothing is done for "dependancies".
Note:
In components, the build.properties and dependency.xml files can stay as they are in templates
(they differ, very slightly from each other).
Note:
foldername pattern:
component/%shortname%
component/%shortname%_sdk
component/%shortname%_tests
distribution/%shortname%.build
distribution/%shortname%.site
distribution/%shortname%.tests
davidw
====================================================================== -->
<project name="project" default="default">
<description>
script to create new component build
</description>
<property name="componentpropertyfile" value="xmlsec.properties" />
<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="@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>