Is maven-eclipse-plugin no longer needed with the new M2Eclipse in Indigo?

前端 未结 4 1548
温柔的废话
温柔的废话 2021-02-03 11:18

Historically, its been a major hassle for our team to import our multi-module Maven project into Eclipse given all the Flex, WTP, and GWT stuff in there. We were recently think

4条回答
  •  Happy的楠姐
    2021-02-03 12:04

    From a methodology perspective, I would really prefer the m2eclipse way -- i.e. Eclipse invoking maven for builds, so it does exactly the same thing as a pure maven-build.

    The problem I found with the m2eclipse, though, was that it always got so horribly, ridiculously, go-have-a-coffee-break-while-you-wait-for-it slow performance, when the maven project became larger adding more and more sub-projects.

    I first tried it in 2010, and finally gave up on it. Tried it again a year later, and to my dismay it still sucked just as much -- I dont get it -- it takes MUCH MUCH longer than just building with "mvn clean install" directly -- shouldnt it actually do the same thing???

    The "mvn eclipse:eclipse" plugin, on the other hand, works like a charm, as long as you just have a PURE java/jar/war build. But if the maven build does other "plugin" stuff, for example legacy rmi-compiles or using ant for sub-tasks, etc, that will just be ignored during the Eclipse-build and so doesnt work.

    The workaround for that is that you FIRST need to build the project ONCE in maven, then run "mvn eclipse:eclipse", then you can edit java-code and it works in Eclipse -- as long as you dont do Project => Clean !

    If you do you that (or change anything in the maven-plugins parts Eclipse doesnt understand about) you need to re-build in maven, then do eclipse:eclipse again, then refresh the project in Eclipse. Thats how I usually work, and I think and it works good enough.

提交回复
热议问题