Working with Maven Projects
The m2eclipse plugin also provides a set of features for working
with Maven projects once they are inside Eclipse. Many features make Maven in Eclipse easier to use, so
letâs dive right into them. In the previous section, I materialized a
Maven project and selected a subproject from the Apache Camel project
named camel-core
. Weâll use that project to
demonstrate these features.
By right-clicking on the camel-core
project and selecting the Maven
menu item, you can see the available Maven features. Figure 14-17 shows a screenshot of
this.
Figure 14-17. Available Maven features
Notice in Figure 14-17 the
available Maven features for the camel-core
project, including:
Adding dependencies and plugins
Updating dependencies, snapshots and source folders
Creating a Maven module
Downloading the source
Opening Project URLs such as the Project Web Page, Issue Tracker, Source Control, and Continuous Integration tool
Enabling/disabling workspace resolution, nested Maven modules and dependency management
These features are also big timesavers, so letâs review them briefly.
Adding and Updating Dependencies and Plugins
Letâs say weâd like to add a dependency or a plugin to the
camel-core
POM. For the sake of demonstration, weâre going to add
commons-lang
as a dependency. (Please note that the functionality for adding a dependency and a plugin is exactly the same, so ...
Get Maven: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.