Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

When should we move to Maven 3?

Our project badly needs to move to Flexmojos4 to get a fix, but this requires Maven 3. Our project makes extensive use of Maven and we really love it, but have configured it very heavily. Between a dozen modules we probably have 50+ pages of XML configuration.

We also use Eclipse and make heavy use of the M2Eclipse plug-in. We also use the following Maven plug-ins:

  • Resources
  • BuildNumber
  • SQL
  • Hibernate3
  • Flexmojos
  • Assembly
  • Jetty
  • Cargo
  • JAR/WAR

and several others. Reading this blog makes me feel like Eclipse Indigo is when it'll all work together. When should we invest the time to make the move?

like image 317
HDave Avatar asked Oct 30 '10 19:10

HDave


2 Answers

In fact "the move" should actually consist of simply upgrading the maven installation / m2eclipse only. Maven 3 is almost completely backward-compatible with Maven 2.

Check the compatibility notes to make sure you are not breaking something that will need a lot to fix.

like image 103
Bozho Avatar answered Oct 02 '22 10:10

Bozho


(...) Makes me feel like Eclipse Indigo is when it'll all work together. When should we invest the time to make the move?

No, you can use Maven 3 and Eclipse 3.5 / 3.6 now (I don't even remember when I started to use Maven 3).

First, Maven 3 is backward compatible (see Maven 3 - Worth it?) so, as I commented in Should I upgrade to Maven 3?:

why don't you just try it? There is nothing to "upgrade", just install Maven 3 along your Maven 2 install, change your PATH settings and try it on an existing POM.

Second, m2eclipse 0.10 uses Maven 3 as embedded version for a long time (for dependency resolution even if you declare an "external" install) and is thus already Maven 3 ready. Just add the final version of Maven 3.0 as external install and there you go.

To sum up: Maven 3 is totally usable, I almost had nothing to change in my poms (only a few things to fix them thanks to the better reporting of Maven 3), it just works inside Eclipse and it builds faster. Just try it.

PS: I use the script attached to MNG-2730 to switch between the maven versions I have on my machine, if required.

like image 35
Pascal Thivent Avatar answered Oct 02 '22 11:10

Pascal Thivent