At the moment you can use properties.
ant target -Darg1=a -Darg2=b -Darg3=c
<property name="arg1" value=""/>
<property name="arg2" value=""/>
<property name="arg3" value=""/>
<java ...>
<arg value="${arg1}"/>
<arg value="${arg2}"/>
<arg value="${arg3}"/>
</java>
Setting the props to empty string results in passing "no-args" to the
class if not set.
Jan
> -----Urspr�ngliche Nachricht-----
> Von: Matt Benson [mailto:[EMAIL PROTECTED]
> Gesendet am: Dienstag, 7. Dezember 2004 00:05
> An: Ant Users List
> Betreff: Re: pass command-lines through to class
>
> --- Kendall Shaw <[EMAIL PROTECTED]> wrote:
> [blank lines removed]
> > I have to use main(String[] args) in a class,
> > instead of using properties.
> > Is there a way to pass through arguments to the
> > class?
> > I've read an example such as:
> > ant target -- a b c
> > But, ant complains that -- is an unknown argument.
>
> This is an incomplete representation of one of
> Dominique's proposals, IIRC. You probably want to
> define properties and pass them as nested <arg>
> elements to the <java> task.
>
> -Matt
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>