I’m currently working on a demonstration application to show interested parties (and blog readers) how to tie j2ee applications together with some simple xdoclet and ant. There are plenty of great examples for the java source files. However the build.xml files are usually somewhat daunting.
What I’m looking for now is a relatively ‘standard’ build.xml and corresponding directory structure to make this all much easier.
Something like
- Seperate directories for the various sources. One for EJBs, one for struts classes, another for POJOs (some of which will be hibernate mapped).
- Ant targets to run xdoclet where applicable and build them all
- Targets to produce the ejb jar files, the war files and then the EAR file.
- lib directories for jars that are required at build time, and deploy time.
To start with I went to the same code that taught me struts, Matt Raible’s AppFuse and the Roller weblogger. However both of these have build files that are fairly heavy going. I don’t want to scare anyone off.
I think I may start with the sample build.xml from xdoclet and go from there. However if anyone else has a good suggestion for directory layout and build files I’d be glad to hear it.