From user-return-70946-apmail-ant-user-archive=ant.apache.org@ant.apache.org Mon Sep 20 15:55:37 2010 Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 65327 invoked from network); 20 Sep 2010 15:55:37 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 20 Sep 2010 15:55:37 -0000 Received: (qmail 90238 invoked by uid 500); 20 Sep 2010 15:55:36 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 89935 invoked by uid 500); 20 Sep 2010 15:55:33 -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 89926 invoked by uid 99); 20 Sep 2010 15:55:32 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Sep 2010 15:55:32 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [88.84.128.168] (HELO samaflost.de) (88.84.128.168) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 20 Sep 2010 15:55:26 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by samaflost.de (Postfix) with ESMTP id 249A928985D1 for ; Mon, 20 Sep 2010 17:55:04 +0200 (CEST) Received: from samaflost.de ([127.0.0.1]) by localhost (v35516.1blu.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TJh3HrMs0S57 for ; Mon, 20 Sep 2010 17:55:03 +0200 (CEST) Received: by samaflost.de (Postfix, from userid 1000) id A819328985D2; Mon, 20 Sep 2010 17:55:03 +0200 (CEST) From: Stefan Bodewig To: user@ant.apache.org Subject: Re: simplify copy with regexpmapper (mapper/regexp) References: <51772743BEA5D44A9EA5BF52AADDD6FB010E96F6@hammai008.delphi.local> <87r5gsfsy2.fsf@v35516.1blu.de> <20100917124843.GA29028@nmhq.net> <87eicsfs2s.fsf@v35516.1blu.de> <20100917130809.GB29028@nmhq.net> X-Draft-From: ("nnfolder:mail.jakarta-ant-user" 68444) Date: Mon, 20 Sep 2010 17:55:03 +0200 In-Reply-To: <20100917130809.GB29028@nmhq.net> (Niklas Matthies's message of "Fri, 17 Sep 2010 15:08:09 +0200") Message-ID: <874odkv294.fsf@v35516.1blu.de> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On 2010-09-17, Niklas Matthies wrote: > On Fri 2010-09-17 at 14:54h, Stefan Bodewig wrote on user: >> On 2010-09-17, Niklas Matthies wrote: >>> But "flatten" also cuts away all sub-directories. >> 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, Michael wrote "I want to strip the leading two directories", and > also "/lib/**/*.*", which suggests that there can be directories below > "lib", and his regex just strips the directories up to "lib". OK, I missed that part, sorry. > Anyway, I'd be interested in a solution that really only removes a > prefix of the path. or for the full commit including rudimentary documentation and tests I couldn't figure out from the man-page (and was too lazy to trie) what wget does if you specify --cut-dirs=12 but the path is only two levels deep. The mapper will currently behave in a not-my-business way like the regexp mapper does when the from regex doesn't match. Stefan --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org