You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Vincent Massol <vm...@pivolis.com> on 2005/10/23 20:17:44 UTC

[Feedback] Limitations of using the m2 eclipse plugin

Hi,

I have been a long fan of using a master eclipse project. I'm now trying to
use the m1/m2-preferred strategy, which is to have one eclipse project per
module. I'm doing this using "m2 eclipse:eclipse".

However, I've found the following limitations which still make this strategy
less good than the master project approach IMO:

1/ How do I edit files that in pom packaging projects (i.e. top level
directories)? This is for example where the common pom.xml files are
located.

2/ How do I share eclipse settings between projects? See
http://jira.codehaus.org/browse/MNG-1062

Unfortunately I'm not sure if there's a solution for 1/ but I'm curious to
know how people using this strategy are coping with it?

Thanks
-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Stephen Duncan <st...@gmail.com>.
> another suggestion: if you are starting from a maven project with a
> parent project in the root dir, try creating a new project in eclipse,
> calling it (yourproject)-parent and linking all the needed resources
> (pom.xml, the /src dir, ...). In this way you will be able to use
> resources from the root dir in eclipse without having to change the
> project structure at all.
>
> fabrizio

I was very hopeful about this suggestion, but I have a problem with
it.  Do you use Eclipse as your SCM manager?  I would prefer to use
Eclispe to manage CVS'ing my project as well, but this doesn't seem
like it works for the parent project.  Are you dealing with this, or
have any suggestions?

--
Stephen Duncan Jr
www.stephenduncanjr.com

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Fabrizio Giustina [mailto:fgiust@gmail.com]
> Sent: dimanche 23 octobre 2005 22:43
> To: Maven Developers List
> Subject: Re: [Feedback] Limitations of using the m2 eclipse plugin

[snip]

> another suggestion: if you are starting from a maven project with a
> parent project in the root dir, try creating a new project in eclipse,
> calling it (yourproject)-parent and linking all the needed resources
> (pom.xml, the /src dir, ...). In this way you will be able to use
> resources from the root dir in eclipse without having to change the
> project structure at all.

Sounds good. However I'd like the eclipse plugin to do that for me. It
should detect "pom" packagings and create such projects for me by linking
the parent project directory.

-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Fabrizio Giustina <fg...@gmail.com>.
On 10/23/05, Vincent Massol <vm...@pivolis.com> wrote:
> > normally I move the parent project to a subdirectory or, if the parent
> > project only contains a pom.xml file, I import it in another project
> > as a linked resource (calling it pom-parent.xml or something similar)
>
> Ok. I would hate to have to change my preferred build directory structure
> because an IDE cannot cope with it. The projects I'm referring to here are
> open source projects and people should be free to use whatever IDE they want
> to work on the project. Telling them I'm using a sub-optimal directory
> structure because I use Eclipse and the m2 eclipse plugin wouldn't be a good
> reason enough IMO :-)

Absolutely true, but using a single project VS multiple modules is a
lot more than a different directory structure... Spring for example
uses a single project (not with maven) and then split the jars during
a custom and build: it's a lot simpler to handle but you end up with
an eclipse classpath with tons of dependencies, and that's not always
recommended (maybe you will introduce dependencies in packages where
they are not expected).

BTW, if you want to try working with a single eclipse project that
should be anyway supported if you install WTP (there should an option
about "allow multiple modules in flexible projects" somewhere). I just
never liked it because of this classpath limitations...

Oh, and if you are going to work with j2ee projects you can also have
different kinds of projects (jars, ejbs, wars, ...). Using a single
module per project is IMHO a lot better in this situation, I don't
think you want to mix everything...

> > > 2/ How do I share eclipse settings between projects? See
> > > http://jira.codehaus.org/browse/MNG-1062

> How do you share the default code formatter with other person working on
> your project. Do you export something, check it in in your project and ask
> developers to import it in their project? That wouldn't work in an open
> source environment as you can't consider that developer's workspaces are
> going to be used only for developing on your project...

Yes, at the moment that's left to the developer, I usually export the
code formatter configuration and publish it on the website.
Unfortunately adding this kind of settings automatically using maven
is not so simple... I will see if I can add something to the m1/m2
eclipse plugin...

> Thanks Fabrizio for this feedback! That helps me to understand the pros and
> cons of each approach :-)

You are welcome, you are talking to another maven/eclipse user trying
to get the best of both ;)

another suggestion: if you are starting from a maven project with a
parent project in the root dir, try creating a new project in eclipse,
calling it (yourproject)-parent and linking all the needed resources
(pom.xml, the /src dir, ...). In this way you will be able to use
resources from the root dir in eclipse without having to change the
project structure at all.

fabrizio

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Fabrizio Giustina [mailto:fgiust@gmail.com]
> Sent: dimanche 23 octobre 2005 21:41
> To: Maven Developers List
> Subject: Re: [Feedback] Limitations of using the m2 eclipse plugin
> 
> On 10/23/05, Vincent Massol <vm...@pivolis.com> wrote:
> > I have been a long fan of using a master eclipse project. I'm now trying
> to
> > use the m1/m2-preferred strategy, which is to have one eclipse project
> per
> > module. I'm doing this using "m2 eclipse:eclipse".
> 
> well, actually that's also the eclipse preferred strategy.
> Multiple-modules-per-project support has been introduced in WTP but it
> didn't enconter a good feedback from users. And anyway, this will
> force you to have a single common classpath, which is probably not
> desiderable if you are using multiple maven modules...
> 
> > 1/ How do I edit files that in pom packaging projects (i.e. top level
> > directories)? This is for example where the common pom.xml files are
> > located.
> 
> normally I move the parent project to a subdirectory or, if the parent
> project only contains a pom.xml file, I import it in another project
> as a linked resource (calling it pom-parent.xml or something similar)

Ok. I would hate to have to change my preferred build directory structure
because an IDE cannot cope with it. The projects I'm referring to here are
open source projects and people should be free to use whatever IDE they want
to work on the project. Telling them I'm using a sub-optimal directory
structure because I use Eclipse and the m2 eclipse plugin wouldn't be a good
reason enough IMO :-)
 
> > 2/ How do I share eclipse settings between projects? See
> > http://jira.codehaus.org/browse/MNG-1062
> 
> For large workspaces I usually add modules related to the same project
> (for example all the maven 1 or maven 2 modules) and set up a default
> code formatter in general preferences. For project with a limited
> number of modules at the moment I generally choose the code formatter
> setting manually after running eclipse:eclipse (not optimal, I know,
> we could try to improve it...)

How do you share the default code formatter with other person working on
your project. Do you export something, check it in in your project and ask
developers to import it in their project? That wouldn't work in an open
source environment as you can't consider that developer's workspaces are
going to be used only for developing on your project...

Thanks Fabrizio for this feedback! That helps me to understand the pros and
cons of each approach :-)

-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Fabrizio Giustina <fg...@gmail.com>.
On 10/23/05, Vincent Massol <vm...@pivolis.com> wrote:
> I have been a long fan of using a master eclipse project. I'm now trying to
> use the m1/m2-preferred strategy, which is to have one eclipse project per
> module. I'm doing this using "m2 eclipse:eclipse".

well, actually that's also the eclipse preferred strategy.
Multiple-modules-per-project support has been introduced in WTP but it
didn't enconter a good feedback from users. And anyway, this will
force you to have a single common classpath, which is probably not
desiderable if you are using multiple maven modules...

> 1/ How do I edit files that in pom packaging projects (i.e. top level
> directories)? This is for example where the common pom.xml files are
> located.

normally I move the parent project to a subdirectory or, if the parent
project only contains a pom.xml file, I import it in another project
as a linked resource (calling it pom-parent.xml or something similar)

> 2/ How do I share eclipse settings between projects? See
> http://jira.codehaus.org/browse/MNG-1062

For large workspaces I usually add modules related to the same project
(for example all the maven 1 or maven 2 modules) and set up a default
code formatter in general preferences. For project with a limited
number of modules at the moment I generally choose the code formatter
setting manually after running eclipse:eclipse (not optimal, I know,
we could try to improve it...)

fabrizio

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


RE: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Vincent Massol <vm...@pivolis.com>.

> -----Original Message-----
> From: Brett Porter [mailto:brett@apache.org]
> Sent: dimanche 23 octobre 2005 21:27
> To: Maven Developers List
> Subject: Re: [Feedback] Limitations of using the m2 eclipse plugin
> 
> Vincent Massol wrote:
> > Hi,
> >
> > 1/ How do I edit files that in pom packaging projects (i.e. top level
> > directories)? This is for example where the common pom.xml files are
> > located.
> 
> It seems that using ../parent-project/pom.xml is working for some people.

You mean using the "link to folder" feature of Eclipse? The problem is that
this link needs to be installed into an existing project.  Which one are you
going to pick? You can't have a parent project because it would contain the
children. So I guess you'd need to create a completely fake project into
your workspace (as opposed to somewhere in your existing project). In any
case that might not be that bad if the eclipse plugin would support it.
Doing it by hand is too much work compared to having a single eclipse
project.
 
> FYI, Eclipse have decided that they want to allow such a project
> structure (swayed by the WTP I believe), but that it won't happen until
> after 3.2 (which I guess could mean up to 2 years before we see it as GA).

Yep...
 
> > Unfortunately I'm not sure if there's a solution for 1/ but I'm curious
> to
> > know how people using this strategy are coping with it?
> 
> Using IDEA? :)

Come on! I've been using both IDEA and Eclipse since early 2002. I know
exactly the strengths and weaknesses of each. I'd just like to use Eclipse
for now and it works very well if I use a single project approach. BTW I
have no issue with the single project approach which I really find the
easiest (for refactoring, for newcomers, etc). However, as Maven is
suggesting another approach and people keep asking me about why I'm doing it
with a single project, I'm trying to find how it works... :-)
 
> I'm using Eclipse now for a bit of a trial and I'm really hurting. It's
> the little things that are missing... I can deal with different
> keybindings and different approaches to problems but there are just so
> many nice things not there unfortunately.

YMMV. Let it be enough to say that I have been a happy IDEA users for
several years (at least 2.5) and that I've now been a happy Eclipse user for
the past 2 years. I haven't lost touch with IDEA though and I'm still trying
it every 5-6 months or so, every time for a duration of a few weeks to 1
month (enough time to get used to the new features) and I'm still switching
back to Eclipse every time.

But I don't want to start an IDE fight... I'd just like to understand how
Maven users (especially m2 users) are using the eclipse plugin efficiently.

Thanks
-Vincent


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org


Re: [Feedback] Limitations of using the m2 eclipse plugin

Posted by Brett Porter <br...@apache.org>.
Vincent Massol wrote:
> Hi,
> 
> 1/ How do I edit files that in pom packaging projects (i.e. top level
> directories)? This is for example where the common pom.xml files are
> located.

It seems that using ../parent-project/pom.xml is working for some people.

FYI, Eclipse have decided that they want to allow such a project 
structure (swayed by the WTP I believe), but that it won't happen until 
after 3.2 (which I guess could mean up to 2 years before we see it as GA).

> Unfortunately I'm not sure if there's a solution for 1/ but I'm curious to
> know how people using this strategy are coping with it?

Using IDEA? :)

I'm using Eclipse now for a bit of a trial and I'm really hurting. It's 
the little things that are missing... I can deal with different 
keybindings and different approaches to problems but there are just so 
many nice things not there unfortunately.

- Brett

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org