Section 1.13. Using the Eclipse Maven Plug-in


1.13. Using the Eclipse Maven Plug-in

Yes, there is a quality Maven plug-in you can use in Eclipse. It supports a number of interesting features, such as the ability to edit project.xml files, support for Maven customization, and a Maven repository browser, among other features.

1.13.1. How do I do that?

Mevenide (http://mevenide.codehaus.org/mevenide-ui-eclipse/update/index.html) is an Eclipse plug-in which allows you to use Maven from within Eclipse. You can download it from an Eclipse Update site by following these directions:

  1. Start Eclipse.

  2. Select Help Software Updates Find and Install from the menu.

  3. In the Install/Update dialog, select "Search for new feature to install," and click Next.

  4. In the Install dialog, click New Remote Site.

  5. In the New Update Site dialog, type Mevenide into the Name field, and the location of the Eclipse Update site into the URL field. The Eclipse Update site for Mevenide is http://mevenide.codehaus.org/release/eclipse/update/site.xml.

  6. When the word Mevenide appears in the Install dialog, select both of the children, Maven and Mevenide, and click Next.

  7. Once Maven and Mevenide are downloaded and installed, restart Eclipse.

The first thing you'll notice is that Mevenide has marked every project.xml file with a green icon. To open project.xml in the Project Object Model Editor, right-click any project.xml file and select Open With... Project Object Model Editor. This editor will display the panel shown in Figure 1-3.

Figure 1-3. Overview panel of Mevenide's Project Object Model Editor


Mevenide provides a series of tabs which let you edit different sections of a project.xml file in Eclipse. As you learn more about the syntax of the project.xml file, know that the Mevenide Project Object Model Editor provides a GUI interface to maintaining this XML file. If you still wish to edit the XML directly, you can choose the rightmost Source tab.

In addition to a POM editor, Mevenide also provides you with a way to execute Maven goals as an Eclipse external tool. To execute a Maven goal in Eclipse, select Run External Tools... External Tools.... You can then create a new Maven configuration and select the desired goal from a list of every available goal. When a Maven goal is executed in Eclipse, its output is available through the Console view.

Another interesting feature of Mevenide is the Repository Browser. This tool allows you to examine the contents of a number of different remote repositories. To open the Repository Browser, select Window Show View... Other..., and then select Repository Browser from the Maven folder in the resulting dialog. The Repository Browser is simply a tree of every dependency in a repository, as shown in Figure 1-4, which shows dependencies for the HTTPClient and abbot groups.

Figure 1-4. Mevenide Repository Browser view


Mevenide also provides a repository search function if you want to search the repository for a particular artifact. This can come in handy because searching http://www.ibiblio.org/maven for a particular dependency can be annoying. Check out Mevenide; it will save you time.

1.13.2. What about...

...NetBeans and JBuilder?

Support for both of these IDEs is present in the current release of Mevenide. For more details see http://mevenide.codehaus.org/.

...what about IntelliJ?

The IDEA plug-in maintains some goals which you can use in the same way you use the Eclipse goals. For more information, see the IDEA plug-in online documentation at http://maven.apache.org/reference/plugins/idea/goals.html.



Maven. A Developer's Notebook
Maven: A Developers Notebook (Developers Notebooks)
ISBN: 0596007507
EAN: 2147483647
Year: 2003
Pages: 125

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net