In my previous rant, I bitched about the eclipse:eclipse
plugin. I got a fair amount of feedback suggesting I look at the M2Eclipse IDE plugin instead. This plugs directly into Eclipse, introducing in-IDE maven support.
Well, I’ve looked at the M2Eclipse plugin, and decided it’s still not suitable for my personal working style.
For anyone interested, here’s a short list of reasons. Note that I haven’t actually _tried_ the plugin – I’m just going off their FAQ.
- No real support for separate output folder. I can’t stand having my IDE and my build tools compile to the same folders. With Eclipse, in particular, it’s a different compiler! Compiling to the same folders results in contention, and I don’t do it. The M2Eclipse plugin used to support this as an option, but they took it away in version 0.94. This isn’t hard folks – let Maven compile to one place, and Eclipse compile to the other, and never-the-twain-shall-meet. Strike one.
- It uses the Maven Embedder. The Maven Embedder is not Maven. It’s a somewhat bastardised version of an unreleased-even-as-beta version of Maven. It doesn’t even use the Maven Embedder that came with 2.1 – instead, it uses a “Embedder component build in May 2008 ” which is “somewhat outdated”. This means it’s got different bugs in it from the command-line Maven. I don’t need to chase down two sources of maven bugs. Strike two. (Okay, you can apparently tell it to use an installed Maven elsewhere – wonder what functionality _that_ breaks; we currently use Maven 2.0.9 because both Maven 2.1 and Maven 2.0.10 broke stuff)
- It wants to use the JDK associated with the JRE that launched Eclipse. Well, I use a Mac. Due to SWT issues, Eclipse on the Mac has to run under Java 1.5 (though that may change with the upcoming release). But I compile against Java 6, and that what I want to run Maven under. Strike three, and you’re out.
Look, it may be a great plugin. Obviously people like it. But it doesn’t suit me.
The Eclipse IAM project (formerly Q4E) seems be the new hotness for Maven Eclipse integration. I’ve never had much luck with m2eclipse, but IAM at least seems to work on smaller projects without drastically slowing down smaller projects.
http://www.eclipse.org/iam/
One more reason not to use maven.
Maven is definitely not a “slam-dunk” decision to use, that’s for sure. It has many benefits, but also a lot of pain.
In our situation at work, Maven has been a nett win. It’s just been (and continues to be) a very bumpy ride.
I hope you take another look when M2e 0.9.9 is released. This version significantly alters how the maven and eclipse integration is performed. Instead of using the maven lifecycle inside the IDE, it instead delegates only certain pieces to maven plugins and the rest is left to eclipse. These changes should address all three of your concerns.
I will definitely keep an eye on it. Thanks, Brian.
Just some notes from my experience with the plugin to address your issues:
1. Of course you can change the output-folder by modifying your pom.xml to have separate output-folders for your class-files.
2. You can tell the plugin which maven installation it should use and it doesn’t break anything if you do so.
3. If you don’t use the internamm maven builder then maven will use the JRE configured under “Installed JREs”.
Give it a try – it takes a little time getting used to but I wouldn’t want to miss working with the plugin.
@Benedict
1. Of course you can change the output-folder by modifying your pom.xml to have separate output-folders for your class-files.
U mean the output folder for eclipse could be configured to be different than the one in the pom.xml? How?
Are you sure about “Of course you can change the output-folder by modifying your pom.xml to have separate output-folders for your class-files”.
My experience is that a lot of Maven plugin cannot be configured to produce their output in a particular non-default location. 80 of your output will be produced in a separate folder, but 20 will still be produced in the same target folder, resulting in an even bigger nightmare.
Or am I wrong ? I hope so.
Like this:
i agree whith you!