blob: 5ec8be3eb72e454a9631f969ca9563bb45ed4cc7 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-us" xml:lang="en-us">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- /*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/ -->
<link rel="stylesheet" type="text/css" href="../../org.eclipse.wst.doc.user/common.css" />
<title>Adding a facet to a J2EE project</title>
</head>
<body id="taddingfacet"><a name="taddingfacet"><!-- --></a>
<h1 class="topictitle1">Adding a facet to a J2EE project</h1>
<div><div>This topic explains how to add a facet to an existing project in
your workspace.</div><div class="section">Facets define characteristics and requirements for projects. When
you add a facet to a project, that project is configured to perform a certain
task, fulfill certain requirements, or have certain characteristics. For example,
the EAR facet sets up a project to function as an enterprise application by
adding a deployment descriptor and setting up the project's classpath.<p>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:</p>
</div>
<ol><li class="stepexpand"><span>In the Project Explorer view, right-click the project and then
click <span class="uicontrol">Properties</span>.</span></li>
<li class="stepexpand"><span>In the Properties window, click <span class="uicontrol">Project Facets</span>.</span> The Project Facets page lists the facets in the project. </li>
<li class="stepexpand"><span>Click <span class="uicontrol">Add/Remove Project Facets</span>.</span></li>
<li class="stepexpand"><span>In the Add/Remove Project Facets window, select the check boxes
next to the facets you want this project to have and select a version number
for each facet.</span> You can also choose a preset combination of facets
from the <span class="uicontrol">Presets</span> list, and you can find out more about
the requirements for each facet by right-clicking the facet name and then
clicking <span class="uicontrol">Show Constraints</span>.</li>
<li class="stepexpand"><span>If you want to limit the project so it will be compatible with
one or more runtimes, click the <span class="uicontrol">Show Runtimes</span> button
and select the runtimes that you want the project to be compatible with.</span></li>
<li class="stepexpand"><span>Click <span class="uicontrol">Finish</span>.</span></li>
<li class="stepexpand"><span>Click <span class="uicontrol">OK</span>.</span></li>
</ol>
</div>
<div>
<div class="familylinks">
<div class="parentlink"><strong>Parent topic:</strong> <a href="../topics/ph-projects.html" title="The workbench can work with many different types of projects. The following topics cover creating and managing some of the types of projects related to J2EE development.">Working with projects</a></div>
</div>
<div class="reltasks"><strong>Related tasks</strong><br />
<div><a href="../topics/tjear.html">Creating an enterprise application project</a></div>
<div><a href="../topics/tjappproj.html" title="You can use a wizard to create a new application client project and add it to a new or existing enterprise application project.">Creating an application client project</a></div>
<div><a href="../topics/tjrar.html" title="A connector is a J2EE standard extension mechanism for containers to provide connectivity to enterprise information systems (EISs).">Creating a connector project</a></div>
</div>
</div>
</body>
</html>