Hi, I have a j2ee application that consists of the: ejbs jsps, images, html, helper classes used both by the ejbs and the jsps property files. The application will be deployed as an EAR file that will contain the jar file and the war file. I want to use ANT tool to automate the build and deploy of my application. I want to know the ideal directory structure for keeping my code, property files and build scripts, both for the development machines and production machines. Hope I am clear with my problem.
I don't think the application server matters because you'll be creating .war/.jar/.ear files in any case (or the same structure but in exploded form). TheServerSide has a thread titled "Writing a good build.xml" in case you're using Ant. You could also take a look at how popular open source projects have organized their code.
You are right. I was just pointing to one of many places to get that information...
Joined: Jun 25, 2001
Many thanks for help. We are planning to use the WAS. I will surely go through the docs. But my main concern or question infact is that of the directory structure prior to creating jars/wars/ears. e.g. say on the dev machines, where the developers are developing their code, need to deploy/redploy it.
Hi P Manchanda, I'd suggest taking a look at Maven. I've not used it myself but I've heard lots of really good stuff about it. If you want a simpler solution the sample code from my blog on J2EE AntiPatterns has a decent directory layout (IMO of course). The sample code for the JSF talk also has a more comprehensive layout. Both examples also encorperate Cactus which is a great tool for doing in container testing, as well as XDoclet which is also very helpful for building j2ee apps... Hope this helps.