hello,

you can something like that

<your_project>
   |_ <folders>
      |_ <resources>
         |_ <config>
            |_ <env_1>
            |      |_ config files for env_1
            |_ <env_2>
                   |_ config files for env_2

and calling ant with the 'env' parameter

in your build file, you've defined a property 'env' and after, the build process uses the
${env} property
for example, you can define a log4j file for each env and put a log4j file in the different 'env' folders in the config folder
in your build.xml, the property of the log4j file will be:

<property name="log4j.file" value="resources/config/${env}/log4j.xml">
etc...

hope this help!

supareno

But it looks like I can't put it under if/else. Something like:

<if>
     <${env} = "x">
      <then>
        <fileset includes="*.jar" dir="${WEB_INF}/lib" />

On Wed, Oct 1, 2008 at 8:02 PM, Kamal Chandana Mettananda
<[EMAIL PROTECTED]> wrote:
Yes you can. Following is just an example of using .jar files from a given
directory.

<fileset includes="*.jar" dir="${WEB_INF}/lib" />




---------------------------------------

Kamal Mettananda
http://lkamal.blogspot.com


On Wed, Oct 1, 2008 at 8:31 PM, Mohit Anchlia <[EMAIL PROTECTED]>wrote:

Can I also use patterns inside of fileset?

On Tue, Sep 30, 2008 at 10:20 PM,  <[EMAIL PROTECTED]> wrote:
With conditional pattern ...

<war...>
   <fileset ...>
       <include name="log4j.xml" if="anAntPatternIsSet"/>


Jan

-----Ursprüngliche Nachricht-----
Von: Mohit Anchlia [mailto:[EMAIL PROTECTED]
Gesendet: Dienstag, 30. September 2008 20:54
An: [email protected]
Betreff: Packaging war

I have a war file that gets deployed in tomcat and jboss. I need to
include log4j.xml in WEB-INF/lib only in certain env. How can I
include this lib file selectively while pacakging war file

---------------------------------------------------------------------
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]



---------------------------------------------------------------------
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]

Reply via email to