Hi, Thanks. I'd read that documentation (and anything else I could find on the war task), as well as searched the list archives, prior to posting my question.
One problem is that I have my build results in a jar file, not class files. I don't know anything to go into the /WEB-INF/classes directory of the war file. I don't want to use a nested <classes> element inside my .war task. I want the jar files from my build directory, as well as (some of) those from my lib directory, to go into the /WEB-INF/lib directory of the war file. Any ideas, suggestions welcome. Yoav Shapira Millennium ChemInformatics >-----Original Message----- >From: Scott Francis [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, February 04, 2003 5:46 PM >To: Ant Users List >Subject: RE: war task question > >I would recommend looking at the documentation for Ant under the war >task...they have an example that is very similar to your question. I've >cut-n-pasted it for ease of finding it. > >Examples >Assume the following structure in the project's base directory: > >thirdparty/libs/jdbc1.jar >thirdparty/libs/jdbc2.jar >build/main/com/myco/myapp/Servlet.class >src/metadata/myapp.xml >src/html/myapp/index.html >src/jsp/myapp/front.jsp >src/graphics/images/gifs/small/logo.gif >src/graphics/images/gifs/large/logo.gif > >then the war file myapp.war created with ><war destfile="myapp.war" webxml="src/metadata/myapp.xml"> > <fileset dir="src/html/myapp"/> > <fileset dir="src/jsp/myapp"/> > <lib dir="thirdparty/libs"> > <exclude name="jdbc1.jar"/> > </lib> > <classes dir="build/main"/> > <zipfileset dir="src/graphics/images/gifs" > prefix="images"/> ></war> > >will consist of >WEB-INF/web.xml >WEB-INF/lib/jdbc2.jar >WEB-INF/classes/com/myco/myapp/Servlet.class >META-INF/MANIFEST.MF >index.html >front.jsp >images/small/logo.gif >images/large/logo.gif > >using Ant's default manifest file. The content of WEB-INF/web.xml is >identical to src/metadata/myapp.xml > >-----Original Message----- >From: Shapira, Yoav [mailto:[EMAIL PROTECTED]] >Sent: Tuesday, February 04, 2003 4:42 PM >To: [EMAIL PROTECTED] >Subject: war task question > > >Hi, >I have the following source organization I'd like to get into a war >file: > >/lib/jar1.jar >/lib/jar2.jar >/lib/jar3.jar >/build/myjar1.jar >/build/myjar2.jar >/images/image1.gif >/images/image2.gif >/config/web.xml >/config/otherConfiguration.prop >/html/file1.html >/html/file2.html > >I need all the jars in the lib directory except one, and the jars in the >build directory, to go into the /WEB-INF/lib directory of the war file. > >The other files (html, images, config/otherConfiguration.prop) should >just go under the war root directory (not under WEB-INF). > >I'm using Ant 1.5.1. > >My war task skeleton looks like: > ><target name="createWarFile"> > <war destfile="myWarFile.war" webxml="/config/web.xml"> > </war> ></target> > >Can someone please help me fill in the rest? ;) > >Thanks, > >Yoav Shapira >Millennium ChemInformatics > > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] > > >--------------------------------------------------------------------- >To unsubscribe, e-mail: [EMAIL PROTECTED] >For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
