Zigac
Zigac

Reputation: 1611

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.

How do I remove the default project facets (e.g. CDI, JPA, etc.) in the project's pom.xml?

enter image description here

Unchecking "Project Facets" in Project -> Properties resets after Maven -> Update Project.

Upvotes: 5

Views: 5557

Answers (1)

Fred Bricon
Fred Bricon

Reputation: 5589

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, ...

Alternatively, you can use pom properties directly in your pom.xml :

 <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.

If it bothers you, you can hide it from the Project Explorer view, Customize View...>Content> uncheck JAX-WS Web Services Elements

Upvotes: 11

Related Questions