JBoss.orgCommunity Documentation

Chapter 4. Adding Maven support to an existing project

Select the project that Maven support will be added to from the Project Explorer.

Selecting Convert to Maven Project from the context menu of the chosen project.

Figure 4.1. Selecting Maven project conversion


Right-click on the project to bring up the context menu and click on Properties.

From the Properties screen click on Project Facets.

The Project Facets properties screen.

Figure 4.2. Project Facets screen


Select JBoss Maven Integration from the facets list. You will notice that a Further configuration required button appears at the bottom of the screen.

The Maven integration facet has been selected from the facets menu.

Figure 4.3. Maven Integration facet selected


Click on the Further configuration required button and you can either modify or accept the default values for all fields. Click the OK button to return to the facets screen.

Setting the configuration for Maven integration.

Figure 4.4. Maven Integration facet settings


The Further configuration required button has now changed to Further configuration available. Click the Apply button and then the OK button to complete the addition of Maven support to your project.

The JBoss Maven Integration facet has now been configured for the project.

Figure 4.5. Maven Integration facet configured


Maven support has been added to the project, and a new pom.xml file appears in the list of files for the project. This can be viewed in the Project Explorer.

The project now has a new pom.xml file, seen in the Project Explorer.

Figure 4.6. New pom.xml file


Double-click on the pom.xml file to view the settings associated with it. The settings here were set in the Further configuration required step, and can be edited from this Overview screen.

It is recommended that you change the Packaging option to pom to avoid any issues in expansion of the project with Maven modules in the future.

The Overview screen for the new pom.xml file.

Figure 4.7. Overview screen for pom.xml