Using Environment Variables So You Can Commit Your .project File

Quick Update: this apparently only works with Zend Studio for Eclipse. Sorry for any confusion if you’re trying to figure out where the f$#@ those dialogs are.

All of my projects reside in an SVN repository and now they’re starting to get accessed by multiple users.  Typically with eclipse, I would just have a project that contained externally required libraries – such as the Zend Framework – but now the location of this is required to be more flexible.

filtered-propertiesThat’s where a trusty environment variable comes in to play.  Now, Zend Studio for Eclipse already implements this but – unless you keep up to date – you’ll probably notice that it only has variables set for ZF 1.5 and ZF 1.6.

new-variable-entryI want to add ZF 1.7 to this, and well, it’s fairly simple. Just click ‘New…’ and enter the path to where you’re freshly downloaded ZF 1.7 is.

newly-added-pathAfter that, it’s all set and you can add that newly created environment variable to your project properties as an include path.  This is far more flexible and useful in the long run when multiple people and multiple platforms.

Now, you can commit your .project file and have it used for everybody without conflicting hard coded paths to included projects or libraries.

Cool, huh?

Published by Darryl Clarke

random text goes here, i guess