Will a filterset work for you?
e.g.
<web-app>
<servlet>
<servlet-name>MyServlet</servlet-name>
<servlet-class>mypkg.MyServlet</servlet-class>
<init-param>
<param-name>sessionTimeout</param-name>
<param-value>@sessionTimeout</param-value>
<init-param>
</servlet>
<!-- etc -->
</web-app>
Then you could copy the source war files to some other
location using a filterset something like this:
<copy todir='${war.filtered.dir}'>
<fileset dir='${war.src.dir}'>
<patternset refid='descriptor.pattern'/>
</fileset>
<filterset>
<filtersfile file='${war.replace.properties}'/>
</filterset>
</copy>
Then use the filtered war file in your war.
-----Original Message-----
From: Mark Derricutt [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, February 13, 2002 3:26 PM
To: Ant Users List
Subject: Wars and filesets....
Two questions,
as part of my build, I want to to make two war files, that are exactly the
same, except for the contents of 1-2 files. The first one is my web.xml
file.
I want to build two wars which have different servlet init params, now, I
could do with this having two web.xml files, and using each in the
respective call, but would rather have one web.xml, that I could store a
${property} in, and have that expanded and -then- stored in the war file.
Is this possible?
The other file is my log4j properties, I have three files,
log4j-qa.properties, log4j-release.properties, log4j-devel.properties.
These have various settings for the different logging settings we want, in
each of my targets (localqa, qa, release) I set a property "log4j.props" to
the filename to be used in each. In the dist target, I copy ${log4j.props}
to "log4j.properties" and include that in the war file, however, sometimes
I'm noticing its not copying properly, is it possible to have some kind of
"include-file-as" feature? If I could do the above web.xml expansion this
wouldn't be a problem, as I could set the init parameters to {$log4j.props}.
????
Mark
-- \m/ --
"...if I seem super human I have been misunderstood." (c) Dream Theater
[EMAIL PROTECTED] - ICQ: 1934853 JID: [EMAIL PROTECTED]
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>