david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 1 | <?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_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 50 | <property name="componentpropertyfile" value="xmlsec.properties" /> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 51 | |
| 52 | |
| 53 | <target name="default" depends="replaceTokens"> |
| 54 | <property file="${componentpropertyfile}" /> |
| 55 | <echo message=" Creating build files for ${shortname}" /> |
| 56 | |
david_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 57 | <move todir="../components/${shortname}"> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 58 | <fileset dir="../temp/components/template" /> |
| 59 | </move> |
david_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 60 | <move todir="../components/${shortname}_sdk"> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 61 | <fileset dir="../temp/components/template_sdk" /> |
| 62 | </move> |
david_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 63 | <move todir="../components/${shortname}_tests"> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 64 | <fileset dir="../temp/components/template_tests" /> |
| 65 | </move> |
david_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 66 | <move todir="../distribution/${shortname}.build"> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 67 | <fileset dir="../temp/distribution/template.build" /> |
| 68 | </move> |
david_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 69 | <move todir="../distribution/${shortname}.site"> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 70 | <fileset dir="../temp/distribution/template.site" /> |
| 71 | </move> |
david_williams | 067725b | 2009-01-13 06:31:51 +0000 | [diff] [blame] | 72 | <move todir="../distribution/${shortname}.tests"> |
david_williams | 88cbf01 | 2009-01-12 21:53:05 +0000 | [diff] [blame] | 73 | <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> |