Search code examples
eclipseeclipse-pluginm2eclipse

Eclipse pom.xml content assistant


I'm new to Eclipse. I'm using Eclipse Kepler to create Maven project, everything works fine except when i'm working with pom.xml the content assistant doesn't give me auto complete just like Netbeans does. Below is the screenshot from Netbeans enter image description here

My question is can Eclipse be like that in term of gives me auto complete on pom.xml? Do i need plugin for it? thank you


Solution

  • There are basically 2 ways for doing that:

    1. Refer to the XML's DTD/XSD in its header, so the simple Eclipse XML editor can help you in a minimal way (e.g., check well-formedness, offers Ctrl+Space assist, etc.).
    2. A better option is to install m2e which is the official Eclipse Maven integration plug-in. It should be available through the Install new software... menu item by default, just search for it. It has quite a heavy support for Maven projects (specific editors, repo browsers, it does update the project configuration automatically, helps you select the dependencies, hanldes multi-module projects, makes easier to import Maven-based projects, etc.)