anyway, having such a environment switcher is "more or less" what the maven profile support does (except the destionation is always in the build result, anyone know if that can be changed/customzied?).
What would be nice is to (for those locations where it is possible) to do the "inverse operation" by simply comparing the src and destination and just do an intelligent merge ;)

Am I missing some obvious way to work? Put Maven completely aside for a moment and just focus on how to deal with different settings for different environment in any Java EE project. How is the problem solved? That is where we need to start when we discuss a solution.
The problem is unfortunately normally solved with what I normally refer to as Ant voodoo ;)

but yes, this is something better done face-2-face since its solution very much depend on what kind of 'property replacement' and what type of file you do it on.

Great, I'll star this e-mail and we can use it as an agenda for a conversation at JBoss World.

I do have a rough idea of how to solve this. Obviously, and IDE has to work with a concrete file. That's a fixture for the time being. What I think we can do in JBoss Tools is offer an environment manager.

The environment manager is aware of source files with replacement properties and the cooresponding real file locations (such as META-INF/persistence.xml or WEB-INF/web.xml). When you select your profile, JBoss Tools runs the property replacements (perhaps using Maven 2) and sets the resolved files into their expected location (in the source tree).

When you make a change to a source file hooked into this manager, JBoss Tools should be able to keep track that you have made a change and offer to update the source file accordingly (or the Maven 2 properties definition for that environment).

It may sound a little complicated, but this would be a great feature. There is no voodoo magic.

your idea is what i'm kinda hoping to do via m2eclipse's profile resource replacement...but I haven't looked into if it is flexible enough yet....doesn't solve it for non-maven projects either so some middleroad needs to be done ;)

/max