ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject RE: How to pass a fileset as parameter
Date Tue, 15 Jul 2003 09:43:31 GMT
> Is there a way to pass a fileset as a parameter?

You can pass the name of the reference or the scanned value.
(Convert the fileset to a property <property name="fs.value"
refid="thefileset"/>
or with <pathconvert/>)



> I been using the below method, however there is a problem with it now
> as it also causes all other references to be passed as well.
> 
>   ...
>     <fileset id="db.sqlscripts.fileset"
>              dir="${dbscript.dir}" 
>              includes="${patch*.sql}"

I think you´re using the wrong includes pattern: ${patch}/*.sql  ?

>              excludes="${excludes}"/>
>     <antcall target="record.sqlscripts" inheritRefs="true"/>
>   ...
> 
>   <target name="record.sqlscripts">
>     <foreach target="record.sqlscript"
>              param="sqlscript.file" 
>              inheritall="true">
>       <path>
>         <fileset refid="db.sqlscripts.fileset"/>
>       </path>
>     </foreach>
>   </target>



  ...    
    <fileset id="db.sqlscripts.fileset" ... />
    <antcall target="record.sqlscripts" ... />
  ...
   
  <target name="record.sqlscripts">
    <pathconvert property="db.sqlscripts.fileset.value" 
                 refid="db.sqlscripts.fileset"
                 pathsep=","
    />
    <foreach ... list="${db.sqlscripts.fileset.value}" />
  </target>



Jan
       

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message