On Jun 13, 2010, at 2:02 AM, Niranjan Rao wrote: > Hi there, > > I would like to know the difference between eclipse:eclipse goal and directly > importing pom file as eclipse project. I have seen lot of references saying > use eclipse:eclipse goal to generate eclipse project file and then import the > created project. Since eclipse allows you to import pom file directly, I > don't see any benefit of doing this additional step. >
Eclipse does not natively allow you to import Maven projects. M2Eclipse is the Maven integration for Eclipse which allows you to import Maven projects. M2Eclipse as of 1.0 will not import projects where Eclipse project files have been generated with the eclipse:eclipse goal. So you either use the eclipse:eclipse goal and use stock Eclipse, or you import your Maven projects using M2Eclipse. One or the other, not both. The maven-eclipse-plugin (which provides eclipse:eclipse) and M2Eclipse are totally separate projects i.e. not developed in concert which cause lots of support issues and inconsistencies. > Can someone please recommend best practices for using eclipse/maven if these > two approaches are essentially doing the same thing. If not, can you please > explain the differences between two approaches. > If you just want to setup your classpath and want to use Eclipse in a standard way then use the maven-eclipse-plugin. If you want/need to use any features in M2Eclipse then don't use the maven-eclipse-plugin. > Thanks in advance. > > - Niranjan > > > Thanks, Jason ---------------------------------------------------------- Jason van Zyl Founder, Apache Maven http://twitter.com/jvanzyl --------------------------------------------------------- Our achievements speak for themselves. What we have to keep track of are our failures, discouragements and doubts. We tend to forget the past difficulties, the many false starts, and the painful groping. We see our past achievements as the end result of a clean forward thrust, and our present difficulties as signs of decline and decay. -- Eric Hoffer, Reflections on the Human Condition
