OS X: Environment variables don’t work in IntelliJ’s ant support
Running ant tasks from within IntelliJ that rely on environment variables doesn’t seem to work on OS X. I have an ant task that copies static files such as CSS and Freemarker templates to my local tomcat installation – this allows me to see updates much faster than performing a full deploy of the application. Under Mac OS X however, the CATALINA_HOME environment variable it relies upon cannot be seen by the ant task when running in IntelliJ. I have come up with a simple workaround:
On the ant pane, click the Settings icon. Then, on the Properties tab click Add and enter the name of the environment variable prefixed by the namespace that you have given to it in the ant script (in my case, the full property name is env.CATALINA_HOME). Assign the appropriate value (e.g. /opt/tomcat5.5.20). Click OK – you’re done.

(1 votes, average: 4 out of 5)
December 6th, 2007 at 1:16 pm
Same problem for me as well but using Eclipse. Similar resolution (right click Ant task -> External Tools Dialog -> set Property)
Cheers,
Damian.