Netbeans And Yii Project Style Directory Structure?

I have organized my website as described in The directory structure of the Yii project site with a frontend, backend, and common setup.

I’m using Netbeans 7.2 for my IDE. Currently I have a single netbeans project which includes the frontend, backend and common folders. The problem I’m having is in Netbeans you can specify a single webroot (Project Properties->Sources->Web Root). So in order to run my app locally on my development machine (pressing F6) I have to change this webroot setting between backend/www and frontend/www depending on whether I want to run my my frontend app or my backend app.

How can I easily run either my backend or frontend app without having to change project settings?

My first thought is to make separate netbeans projects for the backend, frontend, and common folders. However, I also have the code under version control with mercurial and the repository .hg folder is in the parent directory of the backend, frontend, common folders so I’m wondering will netbeans mercurial integration play nicely with the repo being defined one folder above the netbeans project folders.

make use of .htaccess

Can you elaborate? Also in my case I’m using php’s built-in webserver rather than apache for local development.

Turns out netbeans and mercurial play fine with setting up three separate projects (one for backend, common, and frontend). I was thinking the mercurial repository had to be at the same level as the netbeans project, but that isn’t the case at all. Netbeans detects that the files are under version control even though the repository folder is in the parent directory and does the right thing.

However, I’d still prefer one netbeans project as three separate projects feels a little kludgy.