views:

271

answers:

2

I'm using ant to build my project, and use the 'svnversion' executable to insert a version id into my sources for easy tracking of versions.

Running this ant file from the command line works, I've set my $PATH in .profile to include the path to svnversion and it works fine.

Now I try and run this same ant file from inside Eclipse and that does not work - the PATH in eclipse is set in another way than the PATH of the shell, I suspect this has to be set in a plist somewhere, but I don't know where.

+2  A: 

A quick search at developer.apple.com turned up Setting environment variables for user processes.

Egil
Never thought of actually searching the apple site, I kept on trying google, lesson leared ;-)
Simon Groenewolt
+4  A: 

Correct -- it's in the plist file

~/.MacOSX/environment.plist

This file actually contains key-value pairs for any environment variables you want to set, for the whole login session. Unlike .profile/.cshrc etc, it's available to GUI programs. Unfortunately, you can't access other environment variables (e.g., you can't use $HOME) or use any other programmatic constructs here.

Andrew Jaffe
Thanks, that was what I was looking for.
Simon Groenewolt