Project Facets

首先上个链接:http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.jst.j2ee.doc.user%2Ftopics%2Fcfacets.html

 

Facets define characteristics and requirements for Java EE projects and are used as part of the runtime configuration.

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.

You can add facets only to Java EE projects and other types of projects that are based on J2EE projects, such as enterprise application projects, dynamic Web projects, and EJB projects. You cannot add facets to a Java™ project or plug-in project, for example. Typically, a facet-enabled project has at least one facet when it is created, allowing you to add more facets if necessary. For example, a new EJB project has the EJB Module facet. You can then add other facets to this project like the EJBDoclet (XDoclet) facet. To add a facet to a project, see Adding a facet to a Java EE project.

Some facets require other facets as prerequisites. Other facets cannot be in the same project together. For example, you cannot add the Dynamic Web Module facet to an EJB project because the EJB project already has the EJB Module facet. Some facets can be removed from a project and others cannot.

Facets also have version numbers. You can change the version numbers of facets as long as you stay within the requirements for the facets. To change the version number of a facet, see Changing the version of a facet.

 

简单翻译概括下:

 Facets(面,刻面)定义了javeEE项目的特性和要求,被用来作为运行时配置的一部分。

当你增加了一个刻面(facet)到项目中,使这个项目可以执行特定的任务或满足特定的需求或拥有确定的特征。
你只能添加刻面到Java EE项目或其他基于JavaEE的项目,比如 enterprise application projects(企业应用项目),dynamic Web projects(动态网页项目), 和 EJB projects(企业JavaBean项目).你不能添加刻面到普通的java项目或插件项目。一般一个允许刻面的项目在它创建时至少有一个刻面,如果需要更多的话,你自己可以添加。
一些刻面需要其他刻面作为必要条件,而一些刻面不能在一个项目中共存。比如:Dynamic Web Module facet和 EJB facet.一些刻面可以从项目中移除,而一些不可以。
刻面也有版本号,你可以按照要求来更改它。

 

Project Facets是eclipse中的WTP(Web Tools Platform )插件中配置的。WTP由两个子项目构成:WST(Web标准工具集) 与JST(J2EE标准工具集) 。eclipse JavaEE版自带这个插件,标准版eclipse没有这个插件,可以自己添加。
 

你可能感兴趣的:(project)