blob: 72f1c6c379e8ac021effa68f05ad26e35bcdaae2 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright (c) 2009, 2011 IBM Corporation and others. All rights reserved.
This program and the accompanying materials are made available under the
terms of the Eclipse Public License 2.0 which accompanies this distribution,
and is available at https://www.eclipse.org/legal/epl-2.0/ Contributors:
IBM Corporation - initial API and implementation Remember, this script, in
workbench, should be ran in "same vm as workspace". -->
<project
name="project"
default="default"
basedir=".">
<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 (it's used in two ways, one to read in properties, and again in the replace
filter elements). -->
<property
name="componentpropertyfile"
value="servadapt.properties"/>
<property file="${componentpropertyfile}"/>
<!-- These are values added to base feature name, before the ".feature"
suffix. These are the expected values, but can be overridden in componentpropertyfile. -->
<property
name="featuresuffix"
value=".feature"/>
<property
name="sdksuffix"
value="_sdk.feature"/>
<property
name="testsuffix"
value="_tests"/>
<property
name="incubating"
value="true"/>
<property
name="prereq.eclipse"
value="false"/>
<property
name="prereq.eclipseplatform"
value="false"/>
<property
name="prereq.emf"
value="false"/>
<property
name="prereq.emfxsd"
value="false"/>
<property
name="prereq.emfvalidation"
value="false"/>
<property
name="prereq.gef"
value="false"/>
<property
name="prereq.dtp"
value="false"/>
<property
name="prereq.wst"
value="false"/>
<property
name="prereq.jst"
value="false"/>
<property
name="prereq.wtp"
value="false"/>
<property
name="prereq.dltk"
value="false"/>
<!-- 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,initcompPropFile,mvcompshort,mvcompsdk,mvcomptests,mvdistbuild,mvdistsite,mvdisttests">
<echo message=" Created build files for ${shortname}"/>
</target>
<target name="initcompPropFile">
<property file="${componentpropertyfile}"/>
</target>
<target name="mvcompshort">
<move todir="../components/${shortname}">
<fileset dir="../temp/components/template"/>
</move>
</target>
<target
name="mvcompsdk"
depends="checksdk"
unless="nosdk">
<move todir="../components/${shortname}_sdk">
<fileset dir="../temp/components/template_sdk"/>
</move>
</target>
<target
name="mvcomptests"
depends="checktest"
unless="notest">
<move todir="../components/${shortname}_tests">
<fileset dir="../temp/components/template_tests"/>
</move>
</target>
<target name="mvdistbuild">
<move todir="../distribution/${shortname}.build">
<fileset dir="../temp/distribution/template.build"/>
</move>
</target>
<target name="mvdistsite">
<move todir="../distribution/${shortname}.site">
<fileset dir="../temp/distribution/template.site"/>
</move>
</target>
<target
name="mvdisttests"
depends="checktest"
unless="notest">
<move todir="../distribution/${shortname}.tests">
<fileset dir="../temp/distribution/template.tests"/>
</move>
</target>
<!-- checks -->
<target name="checksdk">
<condition property="nosdk">
<equals
arg1="${sdksuffix}"
arg2="NONE"/>
</condition>
</target>
<target name="checktest">
<condition property="notest">
<equals
arg1="${testsuffix}"
arg2="NONE"/>
</condition>
<echo message="testsuffix: ${testsuffix}"/>
<echo message="notest: ${notest}"/>
</target>
<!-- replace tokens -->
<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="@featuresuffix@"
value="${featuresuffix}"/>
<replacefilter
token="@sdksuffix@"
value="${sdksuffix}"/>
<replacefilter
token="@testsuffix@"
value="${testsuffix}"/>
<replacefilter
token="@incubating@"
value="${incubating}"/>
<replacefilter
token="@prereq.eclipseplatform@"
value="${prereq.eclipseplatform}"/>
<replacefilter
token="@prereq.eclipse@"
value="${prereq.eclipse}"/>
<replacefilter
token="@prereq.emf@"
value="${prereq.emf}"/>
<replacefilter
token="@prereq.emfxsd@"
value="${prereq.emfxsd}"/>
<replacefilter
token="@prereq.emfvalidation@"
value="${prereq.emfvalidation}"/>
<replacefilter
token="@prereq.gef@"
value="${prereq.gef}"/>
<replacefilter
token="@prereq.dtp@"
value="${prereq.dtp}"/>
<replacefilter
token="@prereq.wst@"
value="${prereq.wst}"/>
<replacefilter
token="@prereq.jst@"
value="${prereq.jst}"/>
<replacefilter
token="@prereq.wtp@"
value="${prereq.wtp}"/>
<replacefilter
token="@prereq.dltk@"
value="${prereq.dltk}"/>
</replace>
</target>
<target name="copyToTemp">
<copy
todir="../temp"
overwrite="true">
<fileset
dir="../buildtemplates"
excludes="build.xml, variables.txt, *.properties"/>
</copy>
</target>
</project>