You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by David Scassa <ds...@journee.com> on 2001/05/16 21:29:30 UTC

War! (revised)

I am attempting to create a WAR file and I am having some difficulty
Here is what I am trying to do.

I would like to create a WAR file by the name of "Webapps.war".

My current directory structure is as follows:

D:\context\webapps
\---context
    +---StuffAdmin
    +---images
    +---LogAdmin
     \---WEB-INF
         +---classes
          |   \---com
          |       +---company
          |            +---context
          |                 +---appadmin
          |                  |   +---applet
          |                  |    \---util
          |                  \---logadmin
          \---lib

I would like to have an output war file that looks something like this:

Index.jsp
ContextAdmin/
LogAdmin/
Images/
WEB-INF/
+---classes
          |   \---com
          |       +---Journee
          |            +---context
          |                 +---appadmin
          |                  |   +---applet
          |                  |    \---util
          |                  \---logadmin
          \---lib


Here is my current target:
<target name="war" depends="init">
		<war warfile="WebApps.war"
webxml="webapps/context/WEB-INF/web.xml" basedir="./webapps">
			<fileset dir="webapps/context/ContextAdmin">
				<exclude name="**/*.java"/>
			</fileset>
			<fileset dir="webapps/context/LogAdmin">
				<exclude name="**/*.java"/>
			</fileset>
			<classes dir="${outDir}"/>
			<zipfileset dir="webapps/context/images"
prefix="images"/>
		</war>
</target>

David