You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Jacob Kjome <ho...@visi.com> on 2004/01/27 21:53:13 UTC

multiple mappers for ?

I'd like to use multiple mappers for a <copy> but Ant-1.6.0 reports "Cannot
define more than one mapper".  I need to use the <mapper type="flatten"/> to
copy jars in a fileset (where the base directory of the fileset is a couple
directories back from any individual jar file location) to a single lib
directory without storing their original directory structure.  This works fine.
 However, now I also want those copied .jar files which are named something like
somepackage-1.2.2.jar to be copied to somepackage.jar.  That is, without the
version number info.  I could do this using the <mapper type="regexp">, but I
can't seem to use both.  

I'm trying to find an option where I don't have use two steps; to copy jars to
one directory using <mapper type="flatten"/> and then copy them to another
directory using <mapper type="regexp">.  Is there a way to do this in a single step?

Jake

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


Re: multiple mappers for ?

Posted by Jacob Kjome <ho...@visi.com>.
Quoting Matt Benson <gu...@yahoo.com>:

> --- Matt Benson <gu...@yahoo.com> wrote:
> > I will submit a CompositeMapper type hopefully
> > sometime this week.
> >

Very nice!

> Of course, in the meantime, you could write your own...
> 

I'll probably wait for your contribution and use a temporary workaround for now.

Thanks!

Jake  

> __________________________________
> Do you Yahoo!?
> Yahoo! SiteBuilder - Free web site building tool. Try it!
> http://webhosting.yahoo.com/ps/sb/
> 
> ---------------------------------------------------------------------
> 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


Re: multiple mappers for ?

Posted by Matt Benson <gu...@yahoo.com>.
--- Matt Benson <gu...@yahoo.com> wrote:
> I will submit a CompositeMapper type hopefully
> sometime this week.
> 
Of course, in the meantime, you could write your own...

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

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


Re: multiple mappers for ?

Posted by Matt Benson <gu...@yahoo.com>.
There is an enablemultiplemapping attribute on <copy>
that, if set to true, will copy to all files returned
by your <mapper>.  However, there are currently no
core mappers that return >1 result, to my knowledge. 
I will submit a CompositeMapper type hopefully
sometime this week.

-Matt

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free web site building tool. Try it!
http://webhosting.yahoo.com/ps/sb/

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