Search code examples
javamavenejb

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


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


Solution

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