ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rez P <>
Subject RE: Copying external file into WAR
Date Fri, 12 Feb 2010 00:56:01 GMT

Check out the Ant manual, it has some examples. In the excerpt below, all you have to do in
the war task is to change the location or path of the webxml attribute.  If the web.xml is
outside of your project in a higher heirachy than your project, all you have to do is to type
the absolute path, starting at the root of the system and tell it where the web.xml is.


e.g. /my/other/project/web.xml


<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"/>
  <classes dir="build/main"/>
  <zipfileset dir="src/graphics/images/gifs"

> Date: Thu, 11 Feb 2010 19:17:40 -0500
> Subject: Copying external file into WAR
> From:
> To:
> Hi,
> Could someone please tell me how I can accomplish the following?
> I want to build a war file. Additionally there is a configuration file that
> is found outside of the WEB-INF directory, but when that WEB-INF dir is
> packaged into the war I want to place that config file in WEB-INf in the war
> - without having to copy it into the actual WEB-INF before making the WAR
> file.
> Thanks.
Hotmail: Free, trusted and rich email service.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message