Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 30905 invoked from network); 17 Sep 2010 21:47:52 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 17 Sep 2010 21:47:52 -0000 Received: (qmail 64960 invoked by uid 500); 17 Sep 2010 21:47:51 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 64865 invoked by uid 500); 17 Sep 2010 21:47:50 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 64857 invoked by uid 99); 17 Sep 2010 21:47:50 -0000 Received: from Unknown (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 17 Sep 2010 21:47:50 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of milu71@gmx.de designates 213.165.64.22 as permitted sender) Received: from [213.165.64.22] (HELO mail.gmx.net) (213.165.64.22) by apache.org (qpsmtpd/0.29) with SMTP; Fri, 17 Sep 2010 21:47:26 +0000 Received: (qmail invoked by alias); 17 Sep 2010 21:47:06 -0000 Received: from e182087198.adsl.alicedsl.de (EHLO localhost) [85.182.87.198] by mail.gmx.net (mp048) with SMTP; 17 Sep 2010 23:47:06 +0200 X-Authenticated: #48488578 X-Provags-ID: V01U2FsdGVkX1/gUDkmAe/grEMB6dy92cqMwfvtb3kIUfh241+bEX HvUdC8QTngYrzV Date: Fri, 17 Sep 2010 23:47:01 +0200 From: Michael Ludwig To: Ant Users List Subject: Re: simplify copy with regexpmapper (mapper/regexp) Message-ID: <20100917214701.GB5892@wladimir> Mail-Followup-To: Ant Users List References: <51772743BEA5D44A9EA5BF52AADDD6FB010E96F6@hammai008.delphi.local> <87r5gsfsy2.fsf@v35516.1blu.de> <20100917124843.GA29028@nmhq.net> <87eicsfs2s.fsf@v35516.1blu.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87eicsfs2s.fsf@v35516.1blu.de> User-Agent: Mutt/1.5.20 (2009-12-10) X-Y-GMX-Trusted: 0 X-Virus-Checked: Checked by ClamAV on apache.org Stefan Bodewig schrieb am 17.09.2010 um 14:54 (+0200): > On 2010-09-17, Niklas Matthies wrote: > > On Fri 2010-09-17 at 14:36h, Stefan Bodewig wrote on user: > >> On 2010-09-16, Ludwig, Michael wrote: > > >>> What I'm wondering is if there isn't some option like in tools > >>> such as wget (--cut-dirs to shorten the path) or cpio or tar, > >>> which in Ant's case would probably translate to a mapper, like > >>> cut-dirs-mapper. > > >> flatten > > >> Since you really want to remove all dirs, flatten="true" or the > >> flattenmapper should do what you want. > > > But "flatten" also cuts away all sub-directories. Exactly. I want to preserve those. > Absolutely, hence "since you really want to remove all dirs". > > > If for example the files to copy are Java source files under > > multiple source roots, "flatten" would also remove the Java package > > directories from the file paths, instead of just the part above the > > source roots. > > This is correct, but this is not the case in the problem Michael is > trying to solve. Well, these aren't Java files, but the requirement is the same. I may not have specified it clearly enough, but what I want is what to preserve the structure below the directories to copy, which is the way the following UNIX utilities do it: * wget --cut-dirs=2 * tar --strip-components=2 * cd/find/cpio achieves the same thing -- Michael Ludwig --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org