I do it with XDoclet like this and it works well :
<artifactId>xdoclet-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals>
<goal>xdoclet</goal>
</goals>
<configuration>
<tasks>
<ejbdoclet
destDir="${project.build.directory}/generated-sources/xdoclet"
ejbSpec="2.1" verbose="true" force="true">
<fileset dir="${project.build.sourceDirectory}">
<include name="**/*Bean.java"></include>
<include name="**/*MDB.java"></include>
</fileset>
...HTH, Rémy
