Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 24556 invoked from network); 17 Sep 2004 14:23:09 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 17 Sep 2004 14:23:09 -0000 Received: (qmail 6850 invoked by uid 500); 17 Sep 2004 14:22:58 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 6638 invoked by uid 500); 17 Sep 2004 14:22:55 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 6625 invoked by uid 99); 17 Sep 2004 14:22:54 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (hermes.apache.org: local policy) Received: from [213.94.219.177] (HELO corvil.com) (213.94.219.177) by apache.org (qpsmtpd/0.28) with ESMTP; Fri, 17 Sep 2004 07:22:53 -0700 Received: from [172.18.1.171] (angel.local.corvil.com [172.18.1.171]) by corvil.com (8.12.9/8.12.5) with ESMTP id i8HEMnwS033071 for ; Fri, 17 Sep 2004 15:22:49 +0100 (IST) (envelope-from peterreilly@apache.org) Message-ID: <414AF364.3080300@apache.org> Date: Fri, 17 Sep 2004 15:23:32 +0100 From: Peter Reilly User-Agent: Mozilla Thunderbird 0.8 (X11/20040913) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: AW: AW: AW: Prepend licence information to every source file References: <879A5AD5DD0ED511891F0003473A9B560E23F61F@Z011004> In-Reply-To: <879A5AD5DD0ED511891F0003473A9B560E23F61F@Z011004> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N yes that works too (slaps head!). Note that the file selector only works on one line at a time, so it cannot use Also, be careful with the contents of the license file, special characters like \ will cause problems (like \0) with the regexp replace string. Peter Jan.Materne@rzf.fin-nrw.de wrote: >just another idea: >- use selectors (contains,...) to get a fileset with files without the >header (like > Peter wrote) >- use regexps for inline editing ( task) > match: (.*) > replace: ${header}\1 > flags: s > >Jan > > > >>-----Urspr�ngliche Nachricht----- >>Von: Peter Reilly [mailto:peterreilly@apache.org] >>Gesendet am: Freitag, 17. September 2004 15:42 >>An: Ant Users List >>Betreff: Re: AW: AW: Prepend licence information to every source file >> >>There is no in-place prepend task (I think), but one can do this >>by >> 1) getting a fileset that contain the files the need the license to >> be added >> 2) iterate over the the files added the license by >> a) adding the licence to a file making a new file >> b) move that new file to overwrite the original file >> >>one can use the ant-contrib task to do the iteration: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >>Peter >>Kannan V wrote: >> >> >> >>>Hi Jan, >>> >>> Thanks for the help. So that means that if my source files >>> >>> >>doesn't have header info, then >> >> >>>I have to copy them to a temp location for adding the >>> >>> >>licence text. I was trying to avoid that >> >> >>>copying to temp location part so that I can run the task on >>> >>> >>my src folder directly. >> >> >>>thannks and regards, >>> >>>-- Kannan. >>> >>> >>> >>> >>--------------------------------------------------------------------- >>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