These are really good remarks and it reflects the show-stopper that we
received after we realized there is slim chance on sharing our ear
application modules between maven 2 and eclipse's WTP.
I think more discussion on this subject could be useful and some help on
how to manage code base between the environments and hints on how do
maven/eclipse developers might evolve their environments would be useful.
Chris Tucker wrote:
Hi,
The page http://maven.apache.org/guides/mini/guide-ide-eclipse.html
explains how to use Eclipse with a multi-module Maven2 project.
Specifically, it gives instructions to "handle maven multiple module
projects with eclipse while keeping the recommended hierachical
project layout.". I'd be interested to hear why the hierarchical
project layout is preferred. So far, I can see the following pros and
cons:
1) The hierarchical structure is more natural: it's not necessary for
users to dig around in POMs to see what other POMs are likely to play
a part in the build.
2) The hierarchy nicely deals with organizing a set of artifacts that
combine to produce another (e.g. for organizing the war/jar/par/ejb3
modules that make up an ear in a EE 5 app)
3) As a corollary to (2) you can create changesets against a tree
spanning multiple projects in Eclipse where appropriate (as it can be
in, for example, an EAR project). With a flat structure, this is much
more cumbersome.
4) The hierarchy does not map cleanly into Eclipse: if the hierarchy
gets deep, you end up with lots of "dummy" directory projects that
house other projects. Eclipse isn't really aware of the relationship
between the "dummy" projects and the "real" projects, increasing the
chances of Eclipse getting confused.
5) It's a pain to set up a freshly checked out tree in the
hierarchical model: mvn eclipse:eclipse won't generate .project files
for <packaging>pom</packaging> type projects.
I'm sure there are other arguments for and against that I'm missing,
but right now I'm finding it hard to determine one as being superior
to the other: indeed, both seem to have significant downsides.
Ideally Eclipse would support a more structured project model, but it
seems unlikely that's going to happen any time soon so I'd be
interested to hear how others have solved this problem.
Cheers,
Chris
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]