ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Kuhn <bnk...@gmail.com>
Subject Re: uncopy -- custom task supporting mapper
Date Thu, 17 Nov 2005 19:16:56 GMT
I just realized I can achieve this using the <present> selector...

<target name="copy">
<copy todir="${dir1}/com/briankuhn/app">
<fileset dir="${dir2}/com/briankuhn/app"/>
</copy>
</target>

<target name="uncopy">
<delete failonerror="false" includeEmptyDirs="true">
<fileset dir="${dir1}/com/briankuhn/app">
<present targetdir="${dir2}/com/briankuhn/app"/>
</fileset>
</delete>
</target>

I'd still like to know if anyone knows of a resource that explains how to
support mappers in a custom task.

Thanks,
Brian


On 11/17/05, Brian Kuhn <bnkuhn@gmail.com> wrote:
>
> Deleting the files created during the copy is exactly what I want. I don't
> care about any overwritten files. Perhaps uncopy is a bad name. I really
> want a delete task that supports some kind of mapper.
>
> -Brian
>
> On 11/16/05, Jan.Materne@rzf.fin-nrw.de <Jan.Materne@rzf.fin-nrw.de >
> wrote:
> >
> > Ok, so just <delete>ing it wouldnt be enough.
> > But where to get the "old" version? From <cvs>, <svn>, ... ?
> >
> > Jan
> >
> > >-----Urspr√ľngliche Nachricht-----
> > >Von: dbrosius@baybroadband.net [mailto:dbrosius@baybroadband.net ]
> > >Gesendet: Mittwoch, 16. November 2005 21:02
> > >An: Ant Users List
> > >Betreff: Re: uncopy -- custom task supporting mapper
> > >
> > >
> > >Puts back the old version of course. With infinite levels of undo, too.
> >
> > >:)
> > >
> > >
> > >
> > >-----Original Message-----
> > >From: "Matt Benson" <gudnabrsam@yahoo.com>
> > >Sent: Wednesday, November 16, 2005 2:50 pm
> > >To: "Ant Users List" <user@ant.apache.org>
> > >Subject: Re: uncopy -- custom task supporting mapper
> > >
> > >--- Brian Kuhn < bnkuhn@gmail.com> wrote:
> > >[SNIP]
> > >> I'm currently using the copy task to copy a fileset from one
> > >directory
> > >> to another.
> > >[SNIP]
> > >> I'd like to somehow reverse (undo) this operation in my
> > >clean target.
> > >> My first thought is something like this:
> > >>
> > >> <uncopy>
> > >> <mapper
> > >> from="${dir-b}/LAYER/com/mycompany/appl/layer/*"
> > >> to="${dir-a}/com/mycompany/appl/layer/*"/>
> > >> <fileset
> > >> dir="${dir-b}/LAYER/com/mycompany/appl/layer"/>
> > >> </uncopy>
> > >[SNIP]
> > >
> > >Okay... I'll bite. What would <uncopy> DO?
> > >
> > >-Matt
> > >
> > >
> > >
> > >
> > >__________________________________
> > >Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
> > >
> > >---------------------------------------------------------------------
> > >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