You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Matt Benson <gu...@yahoo.com> on 2004/08/27 15:49:35 UTC

Re: Copy, Mapper and the Composite and Chained Mappers

This is really more of a user question.  Anyway, per
the manual, if you use nested mappers of any type the
<mapper> element will behave as a composite mapper,
which unions any child mapper elements.  So the answer
is you would nest this way for a composite:

<copy ...>
  <mapper>
    <flattenmapper />
    <mapper type="?" />
  </mapper>
</copy>

and this way for a chained mapper:
<copy ...>
  <mapper>
    <chainedmapper>
      <unpackagemapper />
      <flattenmapper />
    </chainedmapper>
  </mapper>
</copy>

HTH,
Matt

--- Phil Weighill-Smith
<ph...@volantis.com> wrote:

> I noticed that Ant 1.6.x has added composite mapper
> and chained mapper
> options as implementations of the FileNameMapper.
> 
> I can't see how to use these with the copy task
> since copy seems to only
> support the "mapper" nested element and the latter
> doesn't list
> "composite" and "chained" as appropriate types.
> 
> Have I missed something or is this a bug with the
> Mapper.MapperType
> enumeration?
> 
> Phil :n.
> -- 
> Phil Weighill-Smith
> <ph...@volantis.com>
> Volantis Systems
> 



		
_______________________________
Do you Yahoo!?
Win 1 of 4,000 free domain names from Yahoo! Enter now.
http://promotions.yahoo.com/goldrush

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Copy, Mapper and the Composite and Chained Mappers

Posted by Phil Weighill-Smith <ph...@volantis.com>.
Thanks Matt. Sorry folks. Another RTFM moment. :n(

Phil

On Fri, 2004-08-27 at 14:49, Matt Benson wrote:

> This is really more of a user question.  Anyway, per
> the manual, if you use nested mappers of any type the
> <mapper> element will behave as a composite mapper,
> which unions any child mapper elements.  So the answer
> is you would nest this way for a composite:
> 
> <copy ...>
>   <mapper>
>     <flattenmapper />
>     <mapper type="?" />
>   </mapper>
> </copy>
> 
> and this way for a chained mapper:
> <copy ...>
>   <mapper>
>     <chainedmapper>
>       <unpackagemapper />
>       <flattenmapper />
>     </chainedmapper>
>   </mapper>
> </copy>
> 
> HTH,
> Matt
> 
> --- Phil Weighill-Smith
> <ph...@volantis.com> wrote:
> 
> > I noticed that Ant 1.6.x has added composite mapper
> > and chained mapper
> > options as implementations of the FileNameMapper.
> > 
> > I can't see how to use these with the copy task
> > since copy seems to only
> > support the "mapper" nested element and the latter
> > doesn't list
> > "composite" and "chained" as appropriate types.
> > 
> > Have I missed something or is this a bug with the
> > Mapper.MapperType
> > enumeration?
> > 
> > Phil :n.
> > -- 
> > Phil Weighill-Smith
> > <ph...@volantis.com>
> > Volantis Systems
> > 
> 
> 
> 
> 		
> _______________________________
> Do you Yahoo!?
> Win 1 of 4,000 free domain names from Yahoo! Enter now.
> http://promotions.yahoo.com/goldrush
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org

-- 
Phil Weighill-Smith <ph...@volantis.com>
Volantis Systems