I've searched the web, this BB, and apache's site and still have not found my answer so I thought I would take a stab at posting a question.
I am trying to create a WAR file that includes directories that would reside as peers to the WEB-INF directory. Using the WAR task this works fine for classes and the lib directory, but not for special folders that are necessary like a folder I have called config or templates.
Using the fileset tag, I can get the contents of the directories in the WAR, but not the actual directory with its contents which is what I need. I
I noticed that the TAR task had a fullpath attrbiute that allowed for this, but I can't find docs on a similar jarfileset tag that supports this.
What I have resorted to is copying the necessary folders to my project's web folder, setting web as the basdir, and war'ing from there (using jar task). I then delete the copied folders so I don't have double the space taken up.
Can someone tell me a leaner way to script this build?
In this era of ultrafat disks, worrying about duplicates simply isn't worth it. I've taken to making the "web" directory in my projects be an exact image of my static content, then as part of the build process, copy it into the build/webapp directory (which is also the recipient of the IDE's compiles/Ant compiles). So I have a compile step, a copy step and an WAR step. The build/webapp directory as of the time the WAR step would be executed is an exploded WAR suitable for direct use by Tomcat, so I only actually have to WAR when I'm ready to make a distro.
When a project is finished, I run Ant clean to wipe away the build directory. I have "build" listed as an entry in .cvsignore, so it doesn't waste space in the source code repository.
Done properly, you only have duplications when duplications are useful.
Customer surveys are for companies who didn't pay proper attention to begin with.
subject: Creating WAR file directories (maintain fullpath)