Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 62764 invoked from network); 20 Jan 2010 23:19:41 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 20 Jan 2010 23:19:41 -0000 Received: (qmail 42463 invoked by uid 500); 20 Jan 2010 23:19:40 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 42386 invoked by uid 500); 20 Jan 2010 23:19:40 -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 42376 invoked by uid 99); 20 Jan 2010 23:19:40 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 20 Jan 2010 23:19:40 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [68.142.207.237] (HELO n16b.bullet.mail.mud.yahoo.com) (68.142.207.237) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 20 Jan 2010 23:19:30 +0000 Received: from [68.142.200.227] by n16.bullet.mail.mud.yahoo.com with NNFMP; 20 Jan 2010 23:19:09 -0000 Received: from [76.13.13.26] by t8.bullet.mud.yahoo.com with NNFMP; 20 Jan 2010 23:19:08 -0000 Received: from [76.13.10.184] by t3.bullet.mail.ac4.yahoo.com with NNFMP; 20 Jan 2010 23:19:08 -0000 Received: from [127.0.0.1] by omp125.mail.ac4.yahoo.com with NNFMP; 20 Jan 2010 23:19:08 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 844250.31350.bm@omp125.mail.ac4.yahoo.com Received: (qmail 25555 invoked by uid 60001); 20 Jan 2010 23:19:08 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1264029548; bh=r8C9adt1ycEHV0xhrjCRyaJcK3fZsRX+5lv9k+Uu4tw=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=klCqY3NsweBTJsEj9HGm3eqVC3p+JH4AUn/BqbOMSZObbk19qOD6ENEn0CHijxZ+sbjkAtwBTEgIb9P9i29+bqck372XV8fRd6KdbTGt3U64WvdPlbYiunJAbpvG5pVQ9l4++jACTsPrDmFD4Ju44MzdHLvTavTzrcwY3dtCsBM= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:X-YMail-OSG:Received:X-Mailer:References:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=1ZoKSSjYHzrBk3c7PoLTqH9hbxyl7+XpCFYGDAOkDsft2LI6aNnCV0Yp0ZRHr4F14ndoRlHHb4vzpDFIZ0bzwdMQ5eOf2OnxxUhQvGnQ2ovIC6uFQ1Su/fzHohF0hafCcQTlVTmA5c5sODjcjCXXRR1rI+7RD3IjxN5v+mx/VLY=; Message-ID: <530019.24518.qm@web65707.mail.ac4.yahoo.com> X-YMail-OSG: oU4OiS0VM1mY2BxGw_CciWEyr1PtBluTJdf0tnF53LwapK91mGq133zQq3NA7DQwi9DjnG092H7tv0_VXQ8w4CbYdTPEL4E9GMEvoE90xW1oHUqCxKMqeOIeRHQtEJ4E4QqgCD2lXxHNjnmTh85Gl.vHxtmwLTgVEO4zFTw9VaAufxl.VhxL2I8xw0Y1gleqNk.xrc0hy6Gfi7n.L5VFDM6xXJNAH2cruXNuZfoZ..YRNDwwPJa0TTU.uEXwGAiT_COggeA2aCXqaX_emhx1IsXgGkKyckItnRCXhw6oVgotdlrcFnta.RFUnDri3HBI9F0bLh_yn8YyeIh4kBg4umWh1jeqFCQbyu6RmqRzwFl5SUjH5.gUuRov6OBvXidTPwlBWf7JtlryRIf_eMV_X0zxWA89M7JGRvsKXM6yMkYMGtWQfLx9CJlX Received: from [66.28.53.2] by web65707.mail.ac4.yahoo.com via HTTP; Wed, 20 Jan 2010 15:19:08 PST X-Mailer: YahooMailRC/272.7 YahooMailWebService/0.8.100.260964 References: <164872.58573.qm@web65713.mail.ac4.yahoo.com> <693266.43618.qm@web65716.mail.ac4.yahoo.com> Date: Wed, 20 Jan 2010 15:19:08 -0800 (PST) From: Eric Fetzer Subject: Re: AppendToProperty MacroDef To: Ant Users List In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-2105071900-1264029548=:24518" --0-2105071900-1264029548=:24518 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable I tried this Scot, but it didn't do it.=A0 So here's an easy repro:=0A=0A=0A=0A= =0A=A0 =0A=A0=A0=A0 =0A=A0=A0=A0 =0A= =A0 =0A=0A=0AIt produces:=0A=0A[echo] tmpProp is:=A0 C:\= myDog\Loves\Big\Juicy\Bones=0A=0AIf I change it to:=0A=0A=0A=0A=0A=0A=A0 =0A=A0=A0=A0 = =0A=A0=A0=A0 =0A=A0 = =0A=0Ait crashes with:=0A=0Ajava.util.regex.PatternSyntaxExceptio= n: Unexpected internal error near index 1=0A\=0A=A0^=0A=A0=A0=A0=A0=A0=A0= =A0 at java.util.regex.Pattern.error(Pattern.java:1650)=0A=A0=A0=A0=A0=A0= =A0=A0 at java.util.regex.Pattern.compile(Pattern.java:1403)=0A=A0=A0=A0=A0= =A0=A0=A0 at java.util.regex.Pattern.(Pattern.java:1124)=0A=A0=A0=A0= =A0=A0=A0=A0 at java.util.regex.Pattern.compile(Pattern.java:840)=0A=A0=A0= =A0=A0=A0=A0=A0 at org.apache.tools.ant.util.regexp.Jdk14RegexpMatcher.getC= ompiledPatter=0An(Jdk14RegexpMatcher.java:67)=0A=A0=A0=A0=A0=A0=A0=A0 at or= g.apache.tools.ant.util.regexp.Jdk14RegexpMatcher.matches(Jdk14Rege=0AxpMat= cher.java:94)=0A=A0=A0=A0=A0=A0=A0=A0 at net.sf.antcontrib.property.RegexTa= sk.doReplace(RegexTask.java:135)=0A=A0=A0=A0=A0=A0=A0=A0 at net.sf.antcontr= ib.property.RegexTask.execute(RegexTask.java:192)=0A=A0=A0=A0=A0=A0=A0=A0 a= t org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)=0A= =A0=A0=A0=A0=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ= e Method)=0A=A0=A0=A0=A0=A0=A0=A0 at sun.reflect.NativeMethodAccessorImpl.i= nvoke(NativeMethodAccessorImpl.=0Ajava:39)=0A=A0=A0=A0=A0=A0=A0=A0 at sun.r= eflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces=0AsorImpl.= java:25)=0A=A0=A0=A0=A0=A0=A0=A0 at java.lang.reflect.Method.invoke(Method.= java:585)=0A=A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.dispatch.Dispatch= Utils.execute(DispatchUtils.jav=0Aa:106)=0A=A0=A0=A0=A0=A0=A0=A0 at org.apa= che.tools.ant.Task.perform(Task.java:348)=0A=A0=A0=A0=A0=A0=A0=A0 at org.ap= ache.tools.ant.Target.execute(Target.java:357)=0A=A0=A0=A0=A0=A0=A0=A0 at o= rg.apache.tools.ant.Target.performTasks(Target.java:385)=0A=A0=A0=A0=A0=A0= =A0=A0 at org.apache.tools.ant.Project.executeSortedTargets(Project.java:13= 37)=0A=A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.Project.executeTarget(P= roject.java:1306)=0A=A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.helper.De= faultExecutor.executeTargets(DefaultExe=0Acutor.java:41)=0A=A0=A0=A0=A0=A0= =A0=A0 at org.apache.tools.ant.Project.executeTargets(Project.java:1189)=0A= =A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.Main.runBuild(Main.java:758)= =0A=A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.Main.startAnt(Main.java:21= 7)=0A=A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.launch.Launcher.run(Laun= cher.java:257)=0A=A0=A0=A0=A0=A0=A0=A0 at org.apache.tools.ant.launch.Launc= her.main(Launcher.java:104)=0A=0A=0A=0AI don't know that what we're trying = to do is possible with propertyregex.=A0 It seems it may need some scriptin= g.=A0 All I'm really trying to=A0do is:=0A=0Aif(property1.indexOf(string1) = >=3D 0) then return true;=0A=0AI'll take a look at how to achieve this tomo= rrow.=A0 Thanks!=0A=0AEric=0A=0A=0A________________________________=0AFrom:= Scot P. Floess =0ATo: Ant Users List =0ASent: Wed, January 20, 2010 2:21:41 PM=0ASubject: Re: AppendToPropert= y MacroDef=0A=0A=0AMmm - you may need to do this before your first property= regex=0A=0A=0A=0AB= asically the above will escape the \=0A=0A=0AOn Wed, 20 Jan 2010, Eric Fetz= er wrote:=0A=0A> Well, out of that error and on to the next.=A0 It seems th= at PropertyRegEx has an issue with the "\" as well.=A0 I wrote a different = macrodef that works without slashes, but not with slashes.=A0 Anyone see a = better way?=0A>=0A> =A0 =0A> =A0=A0=A0 =0A> =A0=A0=A0 =0A> = =A0=A0=A0 =0A> =A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0= =0A> =A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0 =0A> =A0= =A0=A0=A0=A0=A0=A0=A0=A0 =0A> = =A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0= =A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0 =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 input=3D"${propertyList}"= =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 override=3D"true"=0A> =A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0 regexp=3D".*(@{item})"=0A> =A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0 select=3D"\1"=0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 casesensitive= =3D"false"=0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0 />=0A> =A0=A0=A0=A0=A0=A0=A0=A0= =A0 = =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =0A> =A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0=A0=A0 =0A> =A0=A0=A0=A0=A0 =0A> =A0=A0=A0 =0A> =A0 =0A>=0A>=0A> Thanks,=0A> Eric=0A>=0A>=0A>=0A>=0A> ___________________= _____________=0A> From: Eric Fetzer =0A> To: Ant User= s List =0A> Sent: Wed, January 20, 2010 1:40:34 PM=0A>= Subject: Re: AppendToProperty MacroDef=0A>=0A> Beautiful, thanks Scott!=0A= >=0A>=0A>=0A> On Jan 20, 2010, at 1:18 PM, "Scot P. Floess" wrote:=0A>=0A>=0A> You could use Ant Contrib's var task - probably be = a little easier :)=0A>=0A> =0A> =0A> = =0A> =0A> =A0 =0A> =0A> =0A= >=0A> On Wed, 20 Jan 2010, Eric Fetzer wrote:=0A>=0A> Hi all.=A0 I wrote a = MacroDef to append a string to a property.=A0 All works as planned until yo= u slip a "\" in there and then it gets jacked up.=A0 My javascripting has M= UCH to be desired.=A0 Any help?=0A>=0A> =A0 =0A> =A0 =A0 =0A> =A0 =A0 =0A> =A0 =A0 =0A> =A0 =A0 =A0 = =0A> =A0 =A0 =0A> =A0 =0A>=0A> Thanks,=0A> Eric=0A>=0A> Scot P. Floess=0A> 27 Lake Royale=0A>= Louisburg, NC=A0 27549=0A>=0A> 252-478-8087 (Home)=0A> 919-890-8117 (Work)= =0A>=0A> Chief Architect JPlate=A0 http://sourceforge.net/projects/jplate= =0A> Chief Architect JavaPIM=A0 http://sourceforge.net/projects/javapim=0A>= =0A> Architect Keros=A0 =A0 =A0 =A0 =A0 http://sourceforge.net/projects/ker= os=0A>=0A> ----------------------------------------------------------------= -----=0A> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org=0A> For a= dditional commands, e-mail: user-help@ant.apache.org=0A>=0A>=0A>=0A> =A0 = =A0 =A0 =0A>=0A>=0A> ------------------------------------------------------= ---------------=0A> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org= =0A> For additional commands, e-mail: user-help@ant.apache.org=0A=0AScot P.= Floess=0A27 Lake Royale=0ALouisburg, NC=A0 27549=0A=0A252-478-8087 (Home)= =0A919-890-8117 (Work)=0A=0AChief Architect JPlate=A0 http://sourceforge.ne= t/projects/jplate=0AChief Architect JavaPIM=A0 http://sourceforge.net/proje= cts/javapim=0A=0AArchitect Keros=A0 =A0 =A0 =A0 =A0 http://sourceforge.net/= projects/keros=0A=0A-------------------------------------------------------= --------------=0ATo unsubscribe, e-mail: user-unsubscribe@ant.apache.org=0A= For additional commands, e-mail: user-help@ant.apache.org=0A=0A=0A --0-2105071900-1264029548=:24518--