I just want to share how I set up to do development on my Mac OS X machine, specifically, in my case, Java development, especially my use of a local Homebrew root.
All the project I hack on live under ~/dev, in there I create a directory for the project (ex. cool-java-library), which represents the workspace for the project (and, before I switched to IntelliJ IDEA, was also the workspace within Eclipse).
Inside the workspace I typically have:
- a directory which is either a mercurial (hg) or git repository of the project (source code, configuration, committed documentation), or a local checkout from Subversion (but even in this case it’s probably a mercurial clone of the Subversion repository, using hgsubversion).
- any additional repositories/clones/checkouts, such as a local Subversion checkout when using a hgsubversion clone (for some things that can’t be done with hgsubversion, or to check Subversion-specific commits, or other checks)
- any temporary files, such as diffs, patches, SQL dumps, floating documentation files
- a local Homebrew root (see below)
One of the peculiarities of my setup is the Homebrew root. Homebrew allows you to make a local installation of itself, and any package (or formula as they call it) installed with the workspace-local ‘brew’ will be installed in the workspace-local root, as well as any dependencies it has. This allows me to install & setup project-specific dependencies with Homebrew (instead of having to fiddle with installing them directly from the original provider, e.g. Apache, Eclipse, PostgreSQL), without having to impact my system-wide software.
I’m really quite happy with this setup, please let me know what you think 🙂
P.S. If there are any Arch Linux users out there, do you know if it is possible to have something akin to this ‘local Homebrew root’ setup in Arch Linux using pacman?
Thanks for sharing, Didn’t know about Homebrew local roots. Very nice feature