简体   繁体   English

Eclipse Java Maven项目禁用dafault项目方面

[英]Eclipse Java Maven project disable dafault project facets

Using Eclipse Luna SR1 with the m2e plugin, I have created a Java web project with Maven. 使用带有m2e插件的Eclipse Luna SR1,我使用Maven创建了一个Java Web项目。

How do I remove the default project facets (eg CDI, JPA, etc.) in the project's pom.xml? 如何在项目的pom.xml中删除默认项目方面(例如CDI,JPA等)?

在此输入图像描述

Unchecking "Project Facets" in Project -> Properties resets after Maven -> Update Project. 在项目 - >属性中取消选中“项目构面”,在Maven - >更新项目后重置。

You can either disable the m2e integration with the related Facets at the workspace preferences or the project properties level, under Maven > Java EE integration (for JAX-RS, JPA, JSF) and under JBoss Tools > JBoss Maven Integration for CDI, Hibernate, ... 您可以在Maven> Java EE集成(适用于JAX-RS,JPA,JSF)和JBoss工具> JBoss Maven Integration for CDI,Hibernate下,在工作区首选项或项目属性级别禁用m2e与相关Facet的集成。 ...

Alternatively, you can use pom properties directly in your pom.xml : 或者,您可以直接在pom.xml中使用pom属性:

 <m2e.jaxrs.activation>false</m2e.jaxrs.activation>
 <m2e.jpa.activation>false</m2e.jpa.activation>
 <m2e.jsf.activation>false</m2e.jsf.activation>
 <m2e.cdi.activation>true</m2e.cdi.activation>

For more information, please refer to : 有关更多信息,请参阅:

Please note that the JAX-WS Node you see in the project explorer is automatically added by WTP and is not controlled by any m2e integration plugin. 请注意,您在项目资源管理器中看到的JAX-WS节点是由WTP自动添加的,不受任何m2e集成插件的控制。

If it bothers you, you can hide it from the Project Explorer view, Customize View...>Content> uncheck JAX-WS Web Services Elements 如果它困扰您,您可以从Project Explorer视图中隐藏它,自定义视图...>内容>取消选中JAX-WS Web服务元素

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM