Hi Brian,
I had a look at the thread and the sample in MNG-743 since I have to
setup a multiproject (eclipse) as well.
Brian Bonner wrote:
FWIW, This sample posted in MNG-743 is *very useful*. Nice way of
illustrating dependent builds. If you haven't pulled this down already,
I'd recommend doing so and running an m2 install against it and then m2
eclipse:eclipse. It's a great starter template.
The biggest pain I see is that if a developer (me) uses eclipse to
checkout the root project he has to check it out to another location and
then delete the project from the workspace (without actually deleting
the contents).
After this (at least with 3.1) the developer (me, again) can import the
root project. It will correctly import each of the modules into eclipse
(or so it seems).
Now, I've found a solution which I *don't* consider to be
"best-practice"-style at all, but it seems to work for me / us right at
the moment:
+ parent
+ pom.xml
+ module
+ pom.xml
+ webapp
+ pom.xml
...
The modules in the parent are referenced like this:
<modules>
<module>../module</module>
<module>../webapp</module>
</modules>
If I really understood right, for the recommended layout to work
a) the top-most-pom could e.g. reside directly in my eclipse workspace
folder and the subprojects would all be proper eclipse projects in the
workspace
- or -
b) none of my projects are actually in the workspace (filesystem) but
referenced from some other location on the fs - IMHO this would allow
any level of nesting.
Maybe I should give the b)-approach a try when I get some more time...
A couple of questions:
1. I noticed the dependencies are at the pom packaging level vs. the
war/ear, etc. level. Is there a reason for this, except that if you for
example added another war to the servlets project, the assumption is
that this *too* would be dependent upon fop?
AFAIK the additional nesting levels are just for grouping, the
dependencies are computed independently reading all pom's of dependent
projects recursively... so if module-a depends on fop, webapp-a depends
on module-a, so fop would be packed into webapp-a as well.
2. I noticed that eclipse:eclipse only uses standard builders (i.e.
jar). Did anyone have any thoughts on generating the other eclipse
artifacts (for example for the WTP) for WARs.
No idea. I'm also using WTP, but only because of the editors (xml, jsp,
etc.) but no builders... for all building / packaging I'm using maven
(except for java files of course).
Cheers,
mika
Thanks.
Brian
Brian Bonner wrote:
Doh! I found this post after posting my post:
http://www.nabble.com/Re%3A-M2-Recommended-Project-Layout-and-Eclipse-t361944.html#a1002147
I'm reading through it now.
Brian
Brian Bonner wrote:
Hi,
Is there any way to create a flattened project hierarchy that is
eclipse-friendly. I.e.
instead of:
master-project
+---sub-project-A
+---sub-project-B
to have a hierarchy like this:
master-project
sub-project-A
sub-project-B
Likewise, maybe this is my naivete with respect to using maven w/
eclipse and sub-projects. Can anybody give me some suggestions in
this regard?
Eclipse (seems) to cater to a flattened hierarchy (dynamic web
project, EAR, etc.) projects and it expects things in a nice
location for testing and easy use of their debugger.
btw, I found this post:
http://www.nabble.com/Eclipse-configuration-for-a-root-multiproject-t66873.html#a190854,
but this is for maven-1 and I'm not sure if it's easy to convert this
for m2.
Thanks.
--
Brian
---------------------------------------------------------------------
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]
---------------------------------------------------------------------
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]