pretty cool, been there and had my version of issues :) +1 from my side thanks Pierre-Arnaud On Wed, Feb 23, 2011 at 6:24 PM, Pierre-Arnaud Marcelot <[email protected]> wrote: > Hi Dev, > Eclipse is great but it has one major drawback for me (and others too I > believe), that's it's inability to import the same project twice in the > workspace. > Now, by "the same project" I don't mean the exact same project (which would > not make much sense) but I mean the same project but from various SVN > branches (e.g. one version from trunk and another from a branch). > Considering that we're now working in two different places ('trunks' and > 'milestones' branches), I would rather have all the projects in a common > workspace than having two workspaces (one for each branch). > The basic problem is that 'mvn eclipse:eclipse' generates the same project > names for both branches and that Eclipse only allows one project with a > given name at a time in the workspace (and I can understand that). > Recently, while looking at the Maven Eclipse plugin documentation I found > out an interesting configuration option that we could leverage to solve this > issue. > I built a specific profile that will be activated if we specify a string we > want to be appended to the name of the project when creating eclipse > descriptors using 'mvn eclipse:eclipse -Dappend.to.project.name=[string]'. > Here it is: > > <profile> > > <id>append-to-project-name</id> > > <activation> > > <property> > > <name>append.to.project.name</name> > > </property> > > </activation> > > <build> > > <plugins> > > <plugin> > > <artifactId>maven-eclipse-plugin</artifactId> > > <configuration> > > > <projectNameTemplate>[artifactId]-${append.to.project.name}</projectNameTemplate> > > </configuration> > > </plugin> > > </plugins> > > </build> > > </profile> > > Using this profile it is now possible to import the same project twice (and > more) by providing for example the name of the branch, which will be > appended to the name of the project. > I'd like to include this new profile in the 'project' pom to be able to > reuse it across all our projects. > Thoughts? > Regards, > Pierre-Arnaud >
-- Kiran Ayyagari
