Nick,
I'm trying to keep things really small at this point (like HelloWorlds) but
I setup a directory structure similar to the DayTrader and performed the
import into eclipse.
First thing I noticed (and I think this is what you mentioned) is that the
top level directory is not there. Because of this, I can't run Maven (mvn
install) because the parent pom is not available. You mentioned making a
symlink but we're developing on our PCs (XP).
Directory Structure Eclipse
=================== =======
TestApp + testcommon
+ testcommon + testejb
+ testejb + testear
+ testear
So, it seems like I'm back to where I started. Eclipse and Maven aren't too
compatible. All the books and articles talk about a "flat" directory
structure but it's really nested. Maven needs (or recommends) a top
directory to hold the parent pom but Eclipse doesn't like the notion of
sub-projects.
I'm using CVS and I've played with the idea of having something setup like
the following where I have a parent directory that just holds the parent pom
and the ear to create the ear and then the two modules that actually hold
the code but this seems pretty ugly. At least with Ant I can layout the
code the way I want too.
Eclipse
=======
+ testcommon
+ testejb
+ testear
+ testparent
On 9/4/07, Nick Stolwijk <[EMAIL PROTECTED]> wrote:
>
> In your daytrader directory, run mvn eclipse:eclipse. This will create
> the .project and .classpath files of the child modules with dependencies
> for eclipse between them if necessary. Then, in Eclipse, import your
> projects. If you want your parent pom.file easily accessible from
> eclipse, make a symlink to it from one of the other directories.
>
> If your developers use a SCM from Eclipse (like subclipse) they will not
> pickup any changes to the root directory. That's why we've setup our
> environment to send mails when the root pom changes. (This was often a
> pain in the butt, people not upgrading their parent pom)
>
> I hope it is clear, if not, ask.
>
> Nick Stolwijk
>
> Brian Smith wrote:
> > Has anyone come up with a decent way to setup a project in Eclipse that
> will
> > support a multi-module project? The best example I've seen is in the
> > "Better Builds with Maven" book (
> > http://www.devzuz.com/web/guest/products/resources#BBWM - Chapter 4) but
> I'm
> > having some difficulty. The book is creating the "DayTrader"
> application
> > and recommends the file structure that I've tried to describe below. It
> > also mentioned that this flat structure is the best and a "nested
> directory
> > structure" has some drawbacks -- especially for Eclipse users.
> >
> > daytrader
> > |
> > +--ear
> > | +...
> > |
> > +--ejb
> > | +...
> > |
> > +--streamer
> > | +...
> > |
> > +--web
> > | +...
> > |
> > +--wsappclient
> > | +...
> > |
> > +--pom.xml
> >
> >
> > Unless I'm missing something, this is a nested directory
> structure. I've
> > tried creating "Java Projects" and "Simple Projects" in Eclipse for the
> > "daytrader". I've tried "source folders" for the ear, ejb... I can't
> seem
> > to get this directory structure to work using Eclipse. Has anyone found
> a
> > good way to make this work?
> >
> > I'm a maven newbie but it seems that there is some incompatibility
> between
> > one of the main IDEs (Eclipse) and Maven. If Maven is geared to a
> > particular directory structure and Eclipse to another, and you have to
> have
> > major tweaks to Maven to make everything work, then you lose a large
> > percentage of the benefits of using Maven.
> >
> > Hopefully I'm missing something easy on how to setup a project in
> Eclipse.
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>