ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From supareno <reno.rkc...@free.fr>
Subject Re: Packaging war
Date Thu, 02 Oct 2008 18:45:19 GMT
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
> <lkamal@gmail.com> 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 <mohitanchlia@gmail.com>wrote:
>>
>>     
>>> Can I also use patterns inside of fileset?
>>>
>>> On Tue, Sep 30, 2008 at 10:20 PM,  <Jan.Materne@rzf.fin-nrw.de> wrote:
>>>       
>>>> With conditional pattern ...
>>>>
>>>> <war...>
>>>>    <fileset ...>
>>>>        <include name="log4j.xml" if="anAntPatternIsSet"/>
>>>>
>>>>
>>>> Jan
>>>>
>>>>         
>>>>> -----Urspr√ľngliche Nachricht-----
>>>>> Von: Mohit Anchlia [mailto:mohitanchlia@gmail.com]
>>>>> Gesendet: Dienstag, 30. September 2008 20:54
>>>>> An: user@ant.apache.org
>>>>> 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: user-unsubscribe@ant.apache.org
>>>>> For additional commands, e-mail: user-help@ant.apache.org
>>>>>
>>>>>
>>>>>           
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>>> For additional commands, e-mail: user-help@ant.apache.org
>>>>
>>>>
>>>>         
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>>> For additional commands, e-mail: user-help@ant.apache.org
>>>
>>>
>>>       
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message