Increasingly, developers are turning to tools that automate much of bean development. For instance, more and more tools provide support for descriptor generation and manipulation. Simple and easy, XDoclet saves you time and energy while generating excellent code.

XDoclet requires the use of Ant, a build tool from Apache, which you can find at http://ant.apache.org. Specifically, XDoclet relies on the Ant task 'ejbdoclet'. Once inserted into the build.xml, the 'ejbdoclet' task allows you to specify subtasks for file generation, method construction, and more:

...
<target name="ejbdoclet" depends="init">
	
	<!-- defines the new ejbdoclet task> -->
	<taskdef name="ejbdoclet" 
		classname="xdoclet.modules.ejb.EjbDocletTask">

		<classpath>
			<fileset dir="${xdoclet.lib.dir}" includes="*.jar"/>
		</classpath>

	</taskdef>

	<ejbdoclet destdir="${src}" ejbspec="2.0" >
		<!-- sets up the task-->
		<fileset dir="${src}">
			<include name="**/*Bean.java" />
		</fileset>

		<!-- adds subtasks to generate code-->
		<remoteinterface/>
		<homeinterface/>
		<localhomeinterface/>
		<homeinterface/>
		
		<deploymentdescriptor destdir="${build}/ejb/META-INF" />
	</ejbdoclet>
	
</target>
...