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: copy only if newer
Date Fri, 18 Jul 2003 09:18:52 GMT
Because the <present> is inside a <fileset> the chance that that is a task 
is not very high :-)

<present> is a selector:
http://ant.apache.org/manual/CoreTypes/selectors.html#presentselect

Selectors are used to decide whether a file should be selected by a fileset
according to
other criteria than filename.


Jan


> -----Original Message-----
> From: Daniel Joshua [mailto:daniel.joshua@gridnode.com]
> Sent: Friday, July 18, 2003 11:10 AM
> To: 'Ant Users List'
> Subject: RE: copy only if newer
> 
> 
> Can somebody you point me to the documentation for the <present> task.
> 
> I dun seem to find it.
> 
> 
> Regards,
> Daniel
> 
> 
> -----Original Message-----
> From: mark.russel@pncbank.com [mailto:mark.russel@pncbank.com]
> Sent: Thursday, 17 July, 2003 10:01 PM
> To: Ant Users List
> Subject: Re: copy only if newer
> 
> 
> 
> Antoine,
> thanks for the pointer to filters.
> I actually did it like this:
> 
>      <patternset id="pattern.files.to.move">
>           <include name="**/*.pl"/>
>           <include name="**/*.sh"/>
>           <include name="**/*.xml"/>
>           <include name="**/*.properties"/>
>           <exclude name="**/convert.xml"/>
>           <exclude name="**/config*.xml"/>
>      </patternset>
> 
>      <fileset dir="${base.dir}" id="outofdate">
>           <patternset refid="pattern.files.to.move"/>
>           <or>
>                <depend targetdir="${deploy.dir}"/>
>                <present present="srconly" targetdir="${deploy.dir}"/>
>           </or>
>      </fileset>
> 
> Mark Russell
> PNC
> 412-768-9603
> 
> 
> |--------+----------------------->
> |        |          "Antoine     |
> |        |          Levy-Lambert"|
> |        |          <antoine@antb|
> |        |          uild.com>    |
> |        |                       |
> |        |          07/16/2003   |
> |        |          05:38 PM     |
> |        |          Please       |
> |        |          respond to   |
> |        |          "Ant Users   |
> |        |          List"        |
> |        |                       |
> |--------+----------------------->
> 
> >-------------------------------------------------------------
> --------------
> --------------------------------------------|
>   |
> |
>   |       To:     "Ant Users List" <user@ant.apache.org>
> |
>   |       cc:
> |
>   |       Subject:     Re: copy only if newer
> |
> 
> >-------------------------------------------------------------
> --------------
> --------------------------------------------|
> 
> 
> 
> ----- Original Message -----
> From: <mark.russel@pncbank.com>
> Sent: Wednesday, July 16, 2003 8:54 PM
> Subject: copy only if newer
> 
> 
> >
> > I have a set of files in /opt/app/foo and a staging area ~/stage.
> > the files in /opt/app/foo are owned by admin
> > the files in ~/stage are owned by user
> >
> > via scp user can copy the files to /opt/app/foo under the admin id
> >
> > I need an ant task to build a fileset that will only give 
> me the files
> that
> > are out of date.
> >
> 
> You need a custom selector.
> In ant 1.6 there is a <different/> selector which finds 
> different files
> between 2 directories, but this is not exactly what you want.
> Have a look here in the manual for general information about 
> selectors.
> http://ant.apache.org/manual/CoreTypes/selectors.html
> 
> Selectors can be nested in filesets to restrict the filesets.
> 
> Antoine
> 
> 
> 
> ---------------------------------------------------------------------
> 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
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message