You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Dick, Brian E." <Br...@FMR.com> on 2004/10/22 17:04:37 UTC
Macrodef: default for optional element
Is there a way to specify a default for an element in a macrodef? Here
is a simplified example.
<macrodef name="mycopy"/>
<attribute name="dir"/>
<attribute name="todir"/>
<attribute name="value"/>
<element name="cpyfileset" implicit="true" optional="yes"/>
<sequential>
<copy taskname="mycopy" todir="@{todir}">
<fileset dir="@{dir}">
<cpyfileset/>
</fileset>
<filterset>
<filter token="ATOKEN" value="@{value}"/>
</filterset>
</copy>
</sequential>
</macrodef
I want to invoke the above macro with the following.
<mycopy dir="./source" todir="./build" value="test"/>
<include name="afile.xml"/>
</mycopy>
<mycopy dir="./source" todir="./build" value="test"/>
The second invocation above should effectively work like
<mycopy dir="./source" todir="./build" value="test"/>
<include name="**/*.*"/>
</mycopy>
-----Original Message-----
From: Rebhan, Gilbert [mailto:Gilbert.Rebhan@huk-coburg.de]
Sent: Friday, October 22, 2004 10:10 AM
To: Ant Users List
Subject: RE: Improving Tasks
Hi,
-----Original Message-----
From: Rhino [mailto:rhino1@sympatico.ca]
Sent: Friday, October 22, 2004 3:36 PM
To: ant-user
Subject: Improving Tasks
/*
1. Provide for a masked input field so that it could be used to prompt
for a password that would remain unreadable to anyone looking over the
users shoulder. (I envision adding a 'mask="true"' parameter to make
that possible with the default for 'mask' being 'false'.)
*/
There's already a task = Kasisoft.
"Task allowing to run a dialog within a build used to setup some
properties. This way you can fill a property with the input of a user."
The given url on Ant site
http://www.kasisoft.de/build/ant/interactive/
is not working anymore (404), but i could mail it to you, if you're
interested
It's easy to add a "masked" (******) password field.
/*
2. I'm thinking about adding the capability of having a radio button
group and/or drop down lists so that there are some additional ways for
users to provide input.
The problem here is that I haven't any real idea how to go about this.
*/
Could possibly also be done with expanding the original kasisoft task ?
btw =
The license for the kasisoft task is given as LGPL.
I'm no specialist for license, does anyone know the details about LGPL :
May i give it to someone else, may i change it the way i like ?
Regards, Gilbert
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org