DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7046>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7046 Exec doesn't find correct path if using nested ant files. ------- Additional Comments From [EMAIL PROTECTED] 2002-03-13 16:12 ------- Sorry you're having so much trouble -- hopefully this will clear things up some. You don't need to run executables from a (command) shell -- just batch files and built-ins (eg., dir, echo, type, etc.) [use "cmd"], and for shell-scripts on Win* running an *nix-type shell (eg., Cygwin) [use "sh"], which I probably should've made clearer before (on native *nix, you can run shell-scripts directly). But for Win*, the executable needs to be in a dir that's in your env %Path% (on *nix, you can do your ./ls, although you don't need the "./" if "." is in your $PATH). (I don't have access to a Sun at the moment, but running your <exec> for *nix on FreeBSD worked fine for me.) For example, on Win*, try (in your subdir build.xml): <exec dir="." executable="find" os="Windows NT"> <arg line='" foofile" foo.txt'/> </exec> With foo.txt (in your "subdir" dir) as: This is a foofile to test running the find command. (Note that you don't need the .exe suffix on the command, the way you had it for your ls.exe in your example -- it doesn't hurt, you just don't need it.) Running 'ant' from your "anttest" build.xml file, should result in: dist: dist: [exec] [exec] ---------- FOO.TXT [exec] This is a foofile to test However, to "cat" out the file on Win* (ie., run 'type foo.txt'), since 'type' is a built-in, you'd need to run it from 'cmd' (that's an aspect of Win*, not of Ant): <exec dir="." executable="cmd" os="Windows NT"> <arg value="/c"/> <arg value="type foo.txt"/> </exec> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
