Have you looked in the archive at the following message: http://marc.theaimsgroup.com/?l=ant-user&m=113040722211523&w=2 It describes a way to create a "driver" batch file to take the traditional command-line parameters (i.e. without the -D business) and converts them so that they have -D in front it before call ant Thanx to Jan for the contribution, Ninju
----- Original Message ---- From: Michael Giroux <[EMAIL PROTECTED]> To: Ant Users List <user@ant.apache.org> Sent: Friday, December 09, 2005 12:44:37 PM Subject: Re: AW: How to use ANT as a command shell Thanks for all the comments. After reading the entire thread, it seems that the short answer is "no", at least not at the moment. My specific requirement could be handled if a target had visibility to the list of remaining targets: ant dosomething arg1 arg2 ... Given this command line, ant will run targets dosomething, arg1 and arg2 in order. For my purposes, arg1 and arg2 are actually input to dosomething. This could be achieved as ant -Darg1=something -Darg2=somethingelse dosomething however, the -D is more difficult to type, and most users are not expecting to use RPN style command lines. As I said, I'm attempting to replace existing batch scripts, so the user expects to do something like ant dosomething arg1 ... If there was a task to enumerate the list of remaining targets (aka command line args) and another task to remove args so ant doesnt try to execute them as targets, then the problem would be solved. I'll keep watching the ant project for future developments. On 12/8/05, Matt Benson <[EMAIL PROTECTED]> wrote: > > I haven't seen it mentioned on this thread yet, but > are we all aware of commons-exec in the sandbox, which > was ported from a 1.6.x version of Ant's code? We had > this discussion before... one idea was that if Ant > switched over we would probably depend on > commons-exec, but that our build process would suck > down the files and include that way. We might then > have to decide how to avoid conflicting with other > versions of the library, or whether to explicitly say, > Ant 1.* includes commons-exec 1.0 or whatever, or we > could use jarjar or if bootstrapping is an issue, roll > our own similar solution. > > -Matt > > --- Steve Loughran <[EMAIL PROTECTED]> wrote: > > > [EMAIL PROTECTED] wrote: > > > > > > > > Mmh, so we tune the ant-launcher.jar and that´s > > all. Other could just reuse > > > that jar with a different configuration? > > > > no,. nothing to do with ant-launcher. > > > > its the stuff behind Exec and Java that people want. > > Ant has the most > > debugged process execution logic out there. Plus > > property env works on > > pre-java1.5 systems > > > > with the code behind these two in their own library, > > you can do a > > launcher that takes some xml manifest of a program > > to run > > > > <program> > > <name>myapp</name> > > <javaversion min="1.5.05" /> > > <jvmargs> > > <maxmem bits="32">128</maxmem> > > <maxmem bits="64">400</maxmem> > > </jvmargs> > > <classpath> > > <....> > > </classpath> > > > > ..whatever. It would be up to someone else to do > > this stuff, ideally > > using some of the tomcat launcher task. > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > > [EMAIL PROTECTED] > > For additional commands, e-mail: > > [EMAIL PROTECTED] > > > > > > > __________________________________________________ > Do You Yahoo!? > Tired of spam? Yahoo! Mail has the best spam protection around > http://mail.yahoo.com > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]