JBoss.orgCommunity Documentation

Chapter 3. Adding CDI Support to a project

CDI support can be added either to an existing project or during project creation.

To add CDI support to an existing project, select the project, and right-click to bring up the context menu. From the menu select ConfigureAdd CDI support. The following preferences page will now display:

CDI project settings.

Figure 3.1. CDI project settings


You can also add CDI support to a project during project creation. To do so, click the Modify button beside the selected Configuration on the first screen of the project wizard.

Modifying project configuration.

Figure 3.2. Modifying project configuration


From the Project Facets screen, add CDI to the project by selecting the checkbox beside the facet CDI (Contexts and Dependency Injection) . Click the OK button to accept the configuration change and return to the project creation wizard.

Adding CDI facet support.

Figure 3.3. Adding CDI facet support