ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject RE: [PATCH] adds 'if'/'unless' to <antcall> (
Date Tue, 26 Nov 2002 16:45:42 GMT
> -----Original Message-----
> From: Stefan Bodewig []
> On Tue, 26 Nov 2002, <> wrote:
> >> -----Original Message-----
> >> From: Stefan Bodewig []
> >> 
> >> In the case of <antcall> I pretty much doubt it would be too useful
> >> as you could always add the if/unless attributes to the target you
> >> intend to call.
> > 
> > No, you can't really do that because if/unless tests for a
> > properties existence.  How would you *not* pass a property using
> > <param>?
> inheritall="false"

<target name="my-func" unless="my-func.notRequired" depends="">
  <!-- do some stuff -->

<target name="call-my-func">
  <uptodate .../>
  <antcall target="my-func">
    <param name="my-func.notRequired" value="?"/>

How would this caller sometimes pass 'my-func.notRequired' and other times
not?  As soon as you create <param>, the property is defined for the callee.

> > I see <antcall> allowing me to write certain repetitive tasks
> > once-and-only-once.
> IMHO writing a task to perform the "certain repetitive tasks" would be
> better than using <antcall>.


<target name="ejbdoclet" depends="">

  <!-- check parameters -->
  <fail unless="metainf" message="no 'metainf' parameter"/>
  <fail unless="gen.src" message="no 'gen.src' parameter"/>
  <fail unless="merge.dir" message="no 'merge.dir' parameter"/>
  <fail unless="ejb.spec" message="no 'ejb.spec' parameter"/>
  <fail unless="src" message="no 'src' parameter"/>
  <fail unless="includes" message="no 'includes' parameter"/>
  <fail unless="excludes" message="no 'excludes' parameter"/>

  <!-- create output directories -->
  <mkdir dir="${gen.src}"/>
  <mkdir dir="${metainf}"/>

  <ejbdoclet destdir="${gen.src}" mergedir="${merge.dir}"
             ejbspec="${ejb.spec}" verbose="true">

  <fileset dir="${src}" includes="${includes}"/>

  <packageSubstitution packages="ejb" substituteWith="interfaces"/>

  <homeinterface />





    <packageSubstitution packages="ejb" substituteWith="dao"/>

  <utilobject includeGUID="true"/>

  <deploymentdescriptor destdir="${metainf}" validatexml="true"/>

  <jboss version="${jboss.version}" xmlencoding="UTF-8"
         destdir="${metainf}" validatexml="true"


I really would rather not rape-and-paste this task for each of my 4
different EJB jar files.  I also do not want to expend the time running each
subtask if none of the *Bean files have changed...


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message