Adding a facet to a J2EE project

This topic explains how to add a facet to an existing project in your workspace.

New projects generally have facets added to them when they are created. To add another facet to a project that already exists, follow these steps:

  1. In the Project Explorer view, right-click the project and then click Properties.
  2. In the Properties window, click Project Facets. The Project Facets page lists the facets in the project.
  3. Click Add/Remove Project Facets.
  4. In the Add/Remove Project Facets window, select the check boxes next to the facets you want this project to have.
    Only the facets that are valid for the project are listed:
    • The list of runtimes selected for the project limits the facets shown in the list. Only the facets compatible with all selected target runtimes are shown.
    • The currently selected facets and their version numbers limit the other facets shown in the list. For example, if the project contains the Dynamic Web Module facet, the EJB Module facet is not listed because these two facets cannot be in the same project.
    You can find out more about the requirements and limitations for each facet by right-clicking the facet name and then clicking Show Constraints.

    You can also choose a preset combination of facets from the Presets list.

  5. Choose a version number for the facet by clicking the current version number and selecting the version number you want from the drop-down list.
  6. To remove a facet, clear its check box. Not all facets can be removed.
  7. If you want to limit the project so it will be compatible with one or more runtimes, click the Show Runtimes button and select the runtimes that you want the project to be compatible with. For more information on runtimes, see Specifying target servers for J2EE projects.
  8. Click Finish.
  9. Click OK.
Related concepts
Project facets
Related tasks
Changing the Java compiler version for a J2EE project
Changing the version of a facet