I’m trying to find the path of an executable (on Linux) using ant (similar to the “which” command). For example:
which ls
output:
/bin/ls
It can’t search the filesystem, it must search the $PATH.
So far all I’ve seen is that scripting with jython will work, but I was wondering about alternatives as jython seems to require installation (I’d rather avoid that). Any suggestions?
You could embed a scripting language inside your build script.
The following example uses ivy to download the required dependencies and should also work on windows: