ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rez <>
Subject RE: about the ear task
Date Mon, 06 Oct 2008 18:10:01 GMT

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="**/" 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.
See how Windows connects the people, information, and fun that are part of your life.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message