Error assembling EJB: META-INF/ejb-jar.xml is required for ejbVersion 2.x

bob-cac picture bob-cac · Nov 27, 2013 · Viewed 12.4k times · Source

Is there a way to build with maven an EJB project that doesn't contain deployment descriptor?

Answer

Thomas picture Thomas · Nov 27, 2013
<build>
  <plugins>
    <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-ejb-plugin</artifactId>
        <configuration>
            <ejbVersion>3.0</ejbVersion>
        </configuration>
    </plugin>
  </plugins>
</build>

You need to tell Maven to use EJB 3.0.