ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dick, Brian E." <Brian.D...@FMR.com>
Subject RE: launching Ant from a perl script
Date Fri, 11 Mar 2005 15:34:43 GMT
The "exit" command terminates the command shell and not the bat file.
You exit a bat file by "goto :eof".

-----Original Message-----
From: John Cortell [mailto:cortell@cox.net] 
Sent: Friday, March 11, 2005 9:34 AM
To: Ant Users List
Subject: RE: launching Ant from a perl script


I had tried that, too, but that opens up a different can of worms. The
perl 
script I'm writing can't assume that .pl is registered as an executable 
extension (such that one can simply type, for example, runant.pl, at a 
command line and the file will automatically by fed to perl.exe). So I 
can't do something like:

         `runant.pl -version`;

in my perl script. It would have to be

         `perl $ENV{ANT_HOME}/bin/runant.pl -version`;

OK. That works, but my actual scenario is more complicated. I'm not 
directly writing a perl script but rather composing a data file. In the 
data file, I'll be specifying a literal string that will be invoked as a

command in a perl script. Yes; it's all very messy and I'll spare you
all 
the gory details. I could probably make that work with some enhancements
to 
the system I'm working with, but that's a lot of work that could be
avoided 
if ant.bat file simply returned the error code.

Since I can fix *that* issue by simply adding an 'exit' at the end of 
ant.bat, that's what I'll probably do. Hopefully someone in the Apache
ant 
development team is following this thread and makes the change in the 
production bat file.

Thanks for the suggestion,
John

At 05:54 AM 3/11/2005, Keith Hatton wrote:
>Isn't there a runant.pl in your ANT_HOME/bin?


---------------------------------------------------------------------
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


Mime
View raw message