It's a bit of a hack in that ideally you would nest the projects, but it should work fine, although you might have to work on the reactor setup a bit so you don't include your root.

The main issue with using Eclipse in similr scenarios is when you get handed a maven or ant based nested structure (root with subs underneath), and you can't rearrange stuff like this. Then you have to go to something like putting the eclipse metadata for the root somewhere else, then linking back to any source in the root project.

Sonnek, Ryan wrote:

Thank you both for your replies.
So, I'm basically hearing two different approaches, one to create a
subproject of the root project (something like subroot), and place the
project.xml, maven.xml, etc there. The other option would be to map all
subprojects into one eclipse project.


I personally think that mapping all the source directories into one project
defeats the purpose of having the subprojects in the first place.  My
current project is relatively small, but having 10-20 subprojects does not
seem uncommon.  Having projects broken apart so that developers can focus on
their own modules and not have to see all other java and test files is a
major development bonus.  I can imagine having this master project easily
having 20 different src directories, and now THAT would be a maintenance
nightmare.

Placing the root files in a subproject seems to be a pretty good idea.  Will
the Reactor still perform as it should?  This is the project layout that
you're suggesting right?

+MyProject
|--+common subproject
 |--project.xml (extends ../root subproject/project.xml)
 |--maven.xml
|--+ejb subproject
 |--project.xml (extends ../root subproject/project.xml)
 |--maven.xml
|--+root subproject
 |--project.xml (main project.xml defining dependencies, etc)
 |--maven.xml

so, no files exist outside of a subproject?  Does this seem like a good
solution or more of a hack?

Ryan

-----Original Message-----
From: Gilles Dodinet [mailto:[EMAIL PROTECTED] Sent: Friday, May 30, 2003 10:14 AM
To: Maven Users List
Subject: Re: eclipse subprojects


your layout makes me think you need to have one and only one eclipse project (say root), with several source directories (common/src/java, ejb/src/java, etc..). maven-new module illustrates that. The drawback of such an approach is that .classpath isnot easily generated since maven-eclipse-plugin doesnt yet take such layout into consideration. another approch would be to have different eclipse projects (so common module should not be under root) but then the problem is that you break the semantical relationships that exist between the various subprojects.


-- gd


Sonnek, Ryan wrote:



Ack!
I've just switched my project over to maven and have broken it up into
several subprojects (ejb, common, war, etc). now, I know this is not a
"maven" problem, but as this is a common layout for a maven project I hope
someone will be able to help. i've been able to create my subprojects
within eclipse, but I cannot get the files from my project root (ie:
project.xml, maven.xml, etc) to be included. I've tried creating a new
project for the root module, but eclipse throws an error saying that "project root and project root/common overlap." Is there some other way to
get these files included into eclipse? I need to have these files tracked
by cvs, and eclipse is my main cvs tool. Any help would be greatly
appreciated!


Here's my project layout:
+--project root
|--+common module
|--project.xml
|--maven.xml
|--+ejb module
|--project.xml
|--maven.xml
|--project.xml
|--maven.xml


I hope someone can answer this one! Ryan

---------------------------------------------------------------------
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]



Reply via email to