> The ${label} parameter becomes set to "Release_2007_12_01_001" when
> the build script is executed. Even better, it cannot be reset via a
> <parameter> task. That means you could have a default value defined in
> your build file, and then have the command line value over ride it.
He meant <property> task instead of <parameter> ;)
> As I said before, you should set a default inside the build file, so
> if you don't provide a command line value, it will still have some
> sort of value.
If you dont know a good default and therefore rely on the "user input",
you could
do a
<fail unless="label">You must provide a 'label'</fail>
which causes the build to fail if you dont provide that property.
If you want to use "derived" values you could also provide a bunch of
property files
and load one of them using the given property. Again you should provide
defaults ...
<property file="${label}.properties"/>
<property file="default.properties"/>
Example:
Release_2007_12_01_001.properties :
version=2007.12
release.manager=John Doe
default.properties :
name=${ant.project.name}
version=${dstamp}
release.manager=${user.name}
company.name=ACME inc.
build.xml
...
<jar ...>
<manifest>
<attribute name="Built-By" value="${release.manager}"/>
<attribute name="Implementation-Vendor"
value="${company.name}"/>
<attribute name="Implementation-Title" value="${name}"/>
<attribute name="Implementation-Version"
value="${version}"/>
Jan
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]