Mail Archives: cygwin/2001/05/21/17:07:19
Hi Daniel,
I know nothing about Ant, but I guess it isn't a Cygwin version,
so unaware of cygwin mount of /usr/bin!
Try inside bash: mount
and change your PATH to contain the equivalent full path!
Bye, Heribert (heribert_dahms AT icon-gmbh DOT de)
> -----Original Message-----
> From: Daniel Barclay [SMTP:Daniel DOT Barclay AT digitalfocus DOT com]
> Sent: Monday, May 21, 2001 18:44
> To: ant-user AT jakarta DOT apache DOT org; cygwin
> Subject: help - Ant execution search path / Cygwin interaction
>
> Can anyone help me understand how Ant and Cygwin interact?
>
> Does Ant's exec task somehow ignore or reset the execution search path
> instead of using the value of the PATH environment variable inherited
> from the process that ran Ant?
>
>
> When I run Ant from CygWin bash, Ant seems to be ignoring or resetting
> the execution search path.
>
> Specifically, when I try to run the GNU find command using an exec task,
> it runs the DOS find command instead. It seems to ignore my PATH
> variable.
>
> My PATH variable in bash lists the CygWin directories first:
>
> $ printenv PATH
>
> /c/tools/emacs-20.7/bin:/usr/bin:/usr/bin:/c/WINNT/system32:/c/WINNT:/c/PR
> OGRA~1/Tcl/bin:/c/Daniel/bin:/c/tools/ant-1.3/bin:/c/tools/jdk1.3/bin:/c/t
> ools/j2sdkee1.3/bin:/c/WINNT/system32:/c/WINNT:/c/PROGRA~1/Tcl/bin
>
> Bash correctly finds the GNU version when I run "find":
>
> $ find -version
> GNU find version 4.1
> $
>
> When I run "printenv PATH" using ant Ant "exec" task, it shows that the
> process run by Ant has inherited the correct value of the PATH environment
> variable (it has found Cygwin's printenv executable, and printenv prints
> a search path with /usr/bin before WINNT directories):
>
> ...
> [exec] The command attribute is deprecated. Please use the executable
> attribute and nested arg
> elements.
> [exec] Myos = Windows NT
> [exec] printenv PATH
> [exec]
> /c/tools/emacs-20.7/bin:/c/tools/emacs-20.7/bin:/usr/local/bin:/usr/bin:/u
> sr/bin:/c/WINNT/system32:/c/WINNT:/c/PROGRA~1/Tcl/bin:/c/Daniel/bin:/c/too
> ls/ant-1.3/bin:/c/tools/jdk1.3/bin:/c/tools/j2sdkee1.3/bin:/c/WINNT/system
> 32:/c/WINNT:/c/PROGRA~1/Tcl/bin
> ...
>
> However, when I run "find" using an exec task, it's obvious that Ant runs
> the DOS version:
>
> ...
> [exec] The command attribute is deprecated. Please use the executable
> attribute and nested arg
> elements.
> [exec] Myos = Windows NT
> [exec] find -version
> [exec] FIND: Parameter format not correct
> [exec] Result: 2
> ...
>
> So if Ant inherits the correct variable of PATH, as evidenced above, why
> doesn't Ant find the Cygwin version of find instead of the DOS version?
>
>
> Cygwin environment variables seem to propagate into spawned DOS shell just
> fine (starting in bash, runnning "export x=y", "cmd", "set x" shows
> "x=y").
>
> The Cygwin PATH variable seems to propagate fine (starting in bash, "cmd",
>
> "find -version" runs GNU find).
>
> Does Ant (e.g., Java) somehow reset the environment to Windows/DOS
> defaults
> when it starts an executable? Does it do anything else that might cause
> this behavior?
>
>
> Thanks,
> Daniel
> --
> Daniel Barclay
> Digital Focus
> Daniel DOT Barclay AT digitalfocus DOT com
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -