views:

30

answers:

1

We have a Java application and a supporting Ant build.xml file, and the team use the Eclipse IDE. I (and others) have the same application checked out several times, usually different branches. In the Eclipse "Ant" view, I get a list of the Ant projects, but they all have the same name - coming from the 'project' element of the Ant buildfile.

I would dearly love to be able to rename these without having to change build.xml, because doing so will force me to have to commit or rollback the change, and will get confused with any "real" changes to the buildfile.

As it is, I have to click on the project name in the Ant view to check I'm in the right one before I run any target, and there's a continuing risk I'll run a target against the wrong project.

Ideally, I'd like either to be able to visually annotate the Ant projects in Eclipse OR to override the Ant project name from an Eclipse project variable or setting.

Surely this is a quite common issue, any ideas?

Thanks, Stephen.

A: 

If you don't need to actually edit code from all of the branches in the same window, you could always create and manage multiple Eclipse workspaces. Create one workspace for each branch. That might solve your problem.

Daniel Yankowsky
Thanks for the suggestion - I'll try it.It brings me to another question I have about using Eclipse with Java webapps: We used to keep our "source" and "target" areas completely separate, so all the projects' sources could sit in the same workspace directory, but we found we were copying a lot of static files from source to target, and this caused a version-control problem.So we switched to checking projects out directly into Tomcat's "webapps" dir, instead of the standard workspace dir, which "feels right" and makes the build MUCH simpler, but seems to be not the way Eclipse is intended..
Stephen