Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 3737 invoked from network); 30 Apr 2007 15:32:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 Apr 2007 15:32:02 -0000 Received: (qmail 35691 invoked by uid 500); 30 Apr 2007 15:31:57 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 35652 invoked by uid 500); 30 Apr 2007 15:31:57 -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 35641 invoked by uid 99); 30 Apr 2007 15:31:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 08:31:57 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 30 Apr 2007 08:31:49 -0700 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1HiXqa-00037Z-KN for user@ant.apache.org; Mon, 30 Apr 2007 08:31:28 -0700 Message-ID: <10255358.post@talk.nabble.com> Date: Mon, 30 Apr 2007 08:31:28 -0700 (PDT) From: mpr To: user@ant.apache.org Subject: Re: Perform a task for every folder from the file. In-Reply-To: <10253485.post@talk.nabble.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: marcin.rembisz@curamsoftware.com References: <10221352.post@talk.nabble.com> <965308.19607.qm@web55111.mail.re4.yahoo.com> <10221747.post@talk.nabble.com> <392130.88344.qm@web55112.mail.re4.yahoo.com> <10222424.post@talk.nabble.com> <367057.42607.qm@web55106.mail.re4.yahoo.com> <10251022.post@talk.nabble.com> <4665.5924.qm@web55107.mail.re4.yahoo.com> <10253485.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Try to replace those '\' by an other character, like '/' You can do that by adding a filter *before* . Camer38 wrote: > > It is a part of a bigger application so I cannot change the version af > Ant. > I would like to follow my first idea , that almost work correctly. The > problem that I have > is describe below. > > > I have the file user.properties and inside a paths to folders are defined > e.g. > C:\CMDOCUMENTATION4\DOCCENTER\BUILD > C:\CMApplicationTools2\PackagingTools > > For each folder from user.properties I need to perform a task. > I read a file and for each line I create a property(${prefix}) starting > with ~~ > > > > > > > > > > > > > > > > match="~~(.+)" select="\1"/> > > > > > At the end of the target I need a list of all those properties so, I use > ac:propertyselector but I do not get a right result. What I received is a > path b-to-file but without \ character. > Do you have an idea why? > Could you suggest a right solution, please? > counteach task is taken from: > http://antcount.sourceforge.net/ > > > > OUTPUT > > > genericTokenReplacement: > [echo] 2 > [echo] C:\CURAMDOCUMENTATION4\DOCCENTER\BUILD > [echo] C:\CuramApplicationTools2\PackagingTools > [echoproperties] #Ant properties > [echoproperties] #Mon Apr 30 14:21:19 BST 2007 > [echoproperties] ~~C\:\\CURAMDOCUMENTATION4\\DOCCENTER\\BUILD=1 > [echoproperties] ~~C\:\\CuramApplicationTools2\\PackagingTools=1 > [echo] > C:CURAMDOCUMENTATION4DOCCENTERBUILD,C:CuramApplicationTools2PackagingTools > > I would be very very grateful for a help > > > > Matt Benson wrote: >> >> I didn't read your error message closely enough the >> first time. It shows that is taken as >> belonging to the ac namespace, indicating it couldn't >> be found in the default namespace. The example >> requires Ant 1.7 . >> >> -Matt >> >> --- mpr wrote: >> >>> >>> I have followed your instructions, download the >>> latest AC release and build >>> ant-contrib.jar from source but I still get the same >>> error. >>> What do I have to do? >>> >>> >>> >>> Matt Benson wrote: >>> > >>> > I can't recall when AC last had a release; you >>> might >>> > have to build from the current source, wherein >>> >>> > can handle any type that returns an Iterator. >>> > >>> > -Matt >>> > >>> > --- mpr wrote: >>> > >>> >> >>> >> I get >>> >> The type doesn't >>> >> support the nested >>> >> "antlib:net.sf.antcontrib:tokens" element. >>> >> >>> >> What version ant-contrib.jar should I have? >>> >> >>> >> >>> >> >>> >> Matt Benson wrote: >>> >> > >>> >> > >>> >> > --- mpr >>> wrote: >>> >> > >>> >> >> >>> >> >> Hi, >>> >> >> >>> >> >> Could you provide an example, please? >>> >> >> >>> >> > >>> >> > >>> >> > >> /> >>> >> > >> >> file="tokens">foo${br}bar${br}baz${br} >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > @@{t}=@{t} >>> >> > >>> >> > >>> >> > >>> >> > >>> >> > -Matt >>> >> > >>> >> >> >>> >> >> >>> >> >> Matt Benson wrote: >>> >> >> > >>> >> >> > The resourcecollection should be >>> >> directly >>> >> >> > passable to . >>> >> >> > >>> >> >> > HTH, >>> >> >> > Matt >>> >> >> > >>> >> >> > --- mpr >>> >> wrote: >>> >> >> > >>> >> >> >> >>> >> >> >> Hi, >>> >> >> >> >>> >> >> >> I have the file user.properties and inside >>> a >>> >> >> paths >>> >> >> >> to folders are defined >>> >> >> >> e.g. >>> >> >> >> C:\Application\PackagingTools4 >>> >> >> >> C:\ApplicationTools2\PackagingTools3 >>> >> >> >> >>> >> >> >> For each folder from user.properties I need >>> to >>> >> >> >> perform an Operation (task). >>> >> >> >> >>> >> >> >> What is the simplest way to do that? >>> >> >> >> At this moment I do: >>> >> >> >> >>> >> >> >> [CODE] >>> >> >> >> >>> >> >> >> >> >> description="genericTokenReplacements" >>> >> >> >> name="genericTokenReplacement"> >>> >> >> >> >> >> >> >> property="src.file.head"> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >> >> property="nb.matching.tokens" >>> >> >> >> match="([\w\\/]+)+"> >>> >> >> >> >>> >> >> >> >> >> >> >> select="\1"/> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >> property="user.files" >>> >> >> >> delimiter="${delimiter}" >>> >> >> >> match="~~(.+)" select="\1"/> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> <--! OPERATION here--> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> >> [/CODE] >>> >> >> >> >>> >> >> >> but I have noticed the problem. >>> >> >> >> >> >> >> >> delimiter="${delimiter}" >>> >> >> >> match="~~(.+)" select="\1"/> >>> >> >> >> trim out (eat) character "\" so i get full >>> >> path >>> >> >> to >>> >> >> >> folder whit out "\" >>> >> >> >> >>> >> >> >> Could you suggest to solve it? >>> >> >> >> Thank you in advance, >>> >> >> >> MR >>> >> >> >> >>> >> >> >> -- >>> >> >> >> View this message in context: >>> >> >> >> >>> >> >> > >>> >> >> >>> >> > >>> >> >>> > >>> >> http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10221352 >>> >> >> >> Sent from the Ant - Users mailing list >>> archive >>> >> at >>> >> >> >> Nabble.com. >>> >> >> >> >>> >> >> >> >>> >> >> >> >>> >> >> > >>> >> >> >>> >> > >>> >> >>> > >>> >> --------------------------------------------------------------------- >>> >> >> >> To unsubscribe, e-mail: >>> >> >> >> user-unsubscribe@ant.apache.org >>> >> >> >> For additional commands, e-mail: >>> >> >> >> user-help@ant.apache.org >>> >> >> >> >>> >> >> >> >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >>> __________________________________________________ >>> >> >> > Do You Yahoo!? >>> >> >> > Tired of spam? Yahoo! Mail has the best >>> spam >>> >> >> protection around >>> >> >> > http://mail.yahoo.com >>> >> >> > >>> >> >> > >>> >> >> >>> >> > >>> >> >>> > >>> >> --------------------------------------------------------------------- >>> >> >> > To unsubscribe, e-mail: >>> >> >> user-unsubscribe@ant.apache.org >>> >> >> > For additional commands, e-mail: >>> >> >> user-help@ant.apache.org >>> >> >> > >>> >> >> > >>> >> >> > >>> >> >> >>> >> >> -- >>> >> >> View this message in context: >>> >> >> >>> >> > >>> >> >>> > >>> >> http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10221747 >>> >> >> Sent from the Ant - Users mailing list archive >>> at >>> >> >> Nabble.com. >>> >> >> >>> >> >> >>> >> >> >>> >> > >>> >> >>> > >>> >> --------------------------------------------------------------------- >>> >> >> To unsubscribe, e-mail: >>> >> >> user-unsubscribe@ant.apache.org >>> >> >> For additional commands, e-mail: >>> >> >> user-help@ant.apache.org >>> >> >> >>> >> >> >>> >> > >>> >> > >>> >> > >>> __________________________________________________ >>> >> > Do You Yahoo!? >>> >> > Tired of spam? Yahoo! Mail has the best spam >>> >> protection around >>> >> > http://mail.yahoo.com >>> >> > >>> >> > >>> >> >>> > >>> >> --------------------------------------------------------------------- >>> >> > To unsubscribe, e-mail: >>> >> user-unsubscribe@ant.apache.org >>> >> > For additional commands, e-mail: >>> >> user-help@ant.apache.org >>> >> > >>> >> > >>> >> > >>> >> >>> >> -- >>> >> View this message in context: >>> >> >>> > >>> >> http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10222424 >>> >> Sent from the Ant - Users mailing list archive at >>> >> Nabble.com. >>> >> >>> >> >>> >> >>> > >>> >> --------------------------------------------------------------------- >>> >> To unsubscribe, e-mail: >>> >> user-unsubscribe@ant.apache.org >>> >> For additional commands, e-mail: >>> >> user-help@ant.apache.org >>> >> >>> >> >>> > >>> > >>> > __________________________________________________ >>> > Do You Yahoo!? >>> > Tired of spam? Yahoo! Mail has the best spam >>> protection around >>> > http://mail.yahoo.com >>> > >>> > >>> >> --------------------------------------------------------------------- >>> > To unsubscribe, e-mail: >>> user-unsubscribe@ant.apache.org >>> > For additional commands, e-mail: >>> user-help@ant.apache.org >>> > >>> > >>> > >>> >>> -- >>> View this message in context: >>> >> http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10251022 >>> Sent from the Ant - Users mailing list archive at >>> Nabble.com. >>> >>> >>> >> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: >>> user-unsubscribe@ant.apache.org >>> For additional commands, e-mail: >>> user-help@ant.apache.org >>> >>> >> >> >> __________________________________________________ >> Do You Yahoo!? >> Tired of spam? Yahoo! Mail has the best spam protection around >> http://mail.yahoo.com >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org >> For additional commands, e-mail: user-help@ant.apache.org >> >> >> > > -- View this message in context: http://www.nabble.com/Perform-a-task-for-every-folder-from-the-file.-tf3658328.html#a10255358 Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org