Solution (Eclipse): EAR Projects Generated for JavaEE Import

Importing my project into Eclipse, I found so many additional EAR projects were being generated. To stop this feature, I went to Eclipse > Preference > Maven > Java EE Integration and unchecked Enable Java EE Configuration. I removed the cached EAR projects (deleting from disk) and removed the regular projects, and imported again.  Voila…. it worked.

Solution: Overriding Behavior In Eclipse

In order to override behavior in Eclipse, use the following profile.

<profile>
   <id>m2e</id>
   <activation>
      <property>
         <name>m2e.version</name>
      </property>
   </activation>
   <properties>
      <my.maven.war.plugin>2.6</my.maven.war.plugin>
      <my.maven.jar.plugin>2.6</my.maven.jar.plugin>
   </properties>
</profile>

Solution: Random EAR Projects

I had a similar experience and ran across m2e-wtp: 1.1.0.

m2e-wtp can also be disabled via the m2e.wtp.activation set tofalse in the Maven section of your project pom.xml.

I create a new workspace and cloned a fresh copy of my code in a temp directory. I then updated the parent pom.xml with the following:

<properties>
   <m2e.wtp.activation>false</m2e.wtp.activation>
   <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>
</properties>

I then imported Existing Maven Projects and no extra EAR projects.

The JAX-RS, JPA and JSF configurators can be enabled or disabled at a workspace level from Window > Preferences > Maven > Java EE Integration.

Links