Good morning everyone.
I would like to use the condition task in my build file within my war task.
The billing target calls the compile target and initiates the war task.
Depending on the environment, say QA, I would like the zipfileset task to be
executed, otherwise excluded.
1. I'm not sure if I understand the description of the condition task
correctly, it's like really bad English. I'm also stuck and don't know the
correct syntax for the arg task sandwich between my and's.
2. I'm not sure if nesting the condition task within a war task is supported.
I currently call 4 different targets in my build file to generate a war file
for each env. The targets vary by just one zipfileset task. So instead of
having and maintaining 4 targets, I'd like to combine them into 1 target and
depending on a property or flag, have the correct war file generated per
environment.
<target name="billing" depends="clean,init,compile"> <war
destfile="${dist}/${war.file}" webxml="./web-inf/web.xml"> <classes
dir="${build}/classes"/> <exclude name="**/properties/**"/> <lib
dir="./lib" excludes="servlet.jar,log4j-1.2.8.jar,ojdbc14.jar"/>
<zipfileset dir="./common" includes="**/*.*" prefix="common" />
<zipfileset dir="./clients" includes="**/*.*" prefix="clients" />
<zipfileset dir="./ftp" includes="**/*.*" prefix="ftp" /> <zipfileset
dir="./xml" includes="**/*.*" prefix="xml" /> <zipfileset
dir="./accounts" includes="**/*.*" prefix="accounts" /> <zipfileset
dir="./images" includes="**/*.*" prefix="images" />
<condition property="abc"> <and><arg1=qa></and>
<or><arg1=staging></or> <zipfileset dir="./source/clients/*"
includes="**/client.properties" prefix="WEB-INF/classes/clients/" />
</condition> <zipfileset dir="./data" includes="**/*.*"
prefix="data" /> <zipfileset dir="./web-inf" includes="**/*.*"
prefix="WEB-INF" excludes="**/web.xml" /> <zipfileset dir="."
includes="**/*.jsp, **/*.js,**/*.jsi,**/*.htm,**/*.css,**/*.swf,**/*.html" />
</war> <copy file="${dist}/${war.file}"
todir="${jboss.home}/server/default/deploy" overwrite="true"/> </target>
Thanks for all your help.
Rez
_________________________________________________________________
Stay up to date on your PC, the Web, and your mobile phone with Windows Live.
http://clk.atdmt.com/MRT/go/msnnkwxp1020093185mrt/direct/01/