Return-Path: Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 1638 invoked by uid 500); 20 Jun 2003 14:10:41 -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 1548 invoked from network); 20 Jun 2003 14:10:40 -0000 Received: from moutng.kundenserver.de (212.227.126.185) by daedalus.apache.org with SMTP; 20 Jun 2003 14:10:40 -0000 Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 19TMbA-0006Xt-00 for user@ant.apache.org; Fri, 20 Jun 2003 16:10:40 +0200 Received: from [80.128.24.126] (helo=cyberspaceroad.com) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 19TMbA-0007vS-00 for user@ant.apache.org; Fri, 20 Jun 2003 16:10:40 +0200 Message-ID: <3EF315A5.9020400@cyberspaceroad.com> Date: Fri, 20 Jun 2003 16:09:41 +0200 From: Adam Hardy Reply-To: user@ant.apache.org User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3a) Gecko/20021212 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: AW: AW: changing a java package name to a directory path References: <879A5AD5DD0ED511891F0003473A9B5608FF6ACA@Z011004> In-Reply-To: <879A5AD5DD0ED511891F0003473A9B5608FF6ACA@Z011004> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Fantastic. Thanks again. Adam Jan.Materne@rzf.fin-nrw.de wrote: > ${line.separator} > > > But if you have a , you can use . > > > Jan > > >>-----Urspr�ngliche Nachricht----- >>Von: Adam Hardy [mailto:adam.ant@cyberspaceroad.com] >>Gesendet am: Freitag, 20. Juni 2003 15:36 >>An: Ant Users List >>Betreff: Re: AW: changing a java package name to a directory path >> >>Hi Jan, >>thanks. I've got it working now. I updated my source. More >>specifically >>though I'm not sure what I was doing wrong. >> >>Now that I've got it working, I would like to use >>propertyregex to add >>carriage returns and indents to a string, replacing colons. >>I've got this: >> >>> input="${blah}" >> regexp=":" >> replace="\n" >> global="true" /> >> >> >>I am trying to use \n to represent carriage returns. It >>doesn't work. Do >>you know what I should use instead? >> >>Thanks >>Adam >> >>Can I somehow >>Jan.Materne@rzf.fin-nrw.de wrote: >> >>>The code worked on my machine >>>- Win 2000 >>>- JDK 1.4.0_02 >>>- Ant 1.6 (compiled on 2003-06-16 from CVS source tree) >>>- ant/lib includes >>> - jakarta-oro-2.0.7.jar >>> - jakarta-regexp-1.2.jar >>> >>>Maybe one of these libs is needed. It try to "comment" them out ... >>> >>>With >>> 27.804 ant-contrib-20030617.jar >>> 3.773 ant-jakarta-regexp.jar >>> 893.738 ant.jar >>> 2.645.149 xalan.jar >>>it works on my machine. I couldn�t remove any of these libraries. >>> >>>ant-contrib contains the task >>>ant contains Ant base classes >>>Without ant-jakarta-regexp.jar I got "No supported regular >> >>expression >> >>>matcher found" >>>Without xalan.jar I got "No supported regular expression >> >>matcher found" >> >>>I don�t know why the xalan and ant-j-r has to be there if a >> >>JDK 1.4 is >> >>>present ... >>> >>> >>> >>> >>>------- Ant diagnostics report ------- >>>Apache Ant version 1.6alpha compiled on June 16 2003 >>> >>>------------------------------------------- >>> Implementation Version (JDK1.2+ only) >>>------------------------------------------- >>>core tasks : 1.5.9 >>>optional tasks : not available >>> >>>------------------------------------------- >>> ANT_HOME/lib jar listing >>>------------------------------------------- >>>ant.home: d: >>>ant-contrib-20030617.jar (27804 bytes) >>>ant-jakarta-regexp.jar (3773 bytes) >>>ant.jar (893738 bytes) >>>xalan.jar (2645149 bytes) >>> >>>------------------------------------------- >>> XML Parser information >>>------------------------------------------- >>>XML Parser : org.apache.crimson.jaxp.SAXParserImpl >>>XML Parser Location: C:\seu\jdk14\jre\lib\rt.jar >>> >>>------------------------------------------- >>> System properties >>>------------------------------------------- >>>java.vm.version : 1.4.0_01-b03 >>>java.vm.name : Java HotSpot(TM) Client VM >>>user.country : DE >>>sun.os.patch.level : Service Pack 2 >>>java.runtime.version : 1.4.0_01-b03 >>>os.arch : x86 >>>os.name : Windows 2000 >>>java.library.path : >>> >> >>c:\seu\jdk14\bin;.;C:\WINNT\System32;C:\WINNT;c:\bin;C:\seu\ar >>cstyler\jre\bi >> >>n;C:\seu\arcstyler\bin;C:\Programme\TCl\bin;C:\Programme\MiKTe >>X\miktex\bin;C >> >>:\seu\perl\bin\;C:\PROGRA~1\RATIONAL\RATION~1\NUTCROOT\bin;C:\ >>PROGRA~1\RATIO >> >>NAL\RATION~1\NUTCROOT\mksnt;C:\Programme\oracle\ora_v8_1_7_cl\ >>bin;C:\Program >> >>me\Continuus\CCM51\BIN;C:\Programme\Perl\bin;C:\WINNT\system32 >>;C:\WINNT;C:\W >> >>>INNT\System32\Wbem;C:\Programme\Resource >>> >> >>Kit;c:\seu\bes\bin;C:\Programme\Rational\common;C:\Programme\R >>ational\Rose\T >> >>opLink\;C:\seu\CVSServer;C:\Programme\Unisys\RoseXMLTools;C:\s >>eu\jswdk12\jws >> >>>dp-shared\bin >>>java.class.path : >>> >> >>c:\seu\jdk14\lib\tools.jar;d:\lib\xalan.jar;d:\lib\ant.jar;d:\ >>lib\ant-jakart >> >>>a-regexp.jar;d:\lib\ant-contrib-20030617.jar; >>> >>> >>> >>>Jan >>> >>> >>> >>> >>>>-----Urspr�ngliche Nachricht----- >>>>Von: Adam Hardy [mailto:adam.ant@cyberspaceroad.com] >>>>Gesendet am: Freitag, 20. Juni 2003 11:51 >>>>An: Ant Users List >>>>Betreff: Re: AW: AW: changing a java package name to a >> >>directory path >> >>>>No I don't think it's your code. I think I'm missing another >>>>jar. It's >>>>ant.util.regexp.RegexpFactory which is complaining. Do you >>>>know what I'm >>>>missing? >>>> >>>>file:///home/adam/src/projects/linklibrary/build.xml:156: No >>>>supported >>>>regular expression matcher found >>>> at >>>>org.apache.tools.ant.util.regexp.RegexpFactory.newRegexp(Regex >>>>pFactory.java:112) >>>> at >>>>org.apache.tools.ant.util.regexp.RegexpFactory.newRegexp(Regex >>>>pFactory.java:75) >>>> at >>>>org.apache.tools.ant.types.RegularExpression.(RegularExp >>>>ression.java:109) >>>> at >>>>net.sf.antcontrib.property.RegexTask.setRegexp(Unknown Source) >>>> >>>>According to the source, it's looking for >>>>java.util.regex.Matcher, which >>>>should be there since I'm using java 1.4 - I can only assume it is >>>>throwing an exception that ant is swallowing before spitting >>>>out its own >>>>exception as above. >>>> >>>>Adam >>>> >>>>Jan.Materne@rzf.fin-nrw.de wrote: >>>> >>>> >>>>> is implemented by >>>> >>>>net.sf.antcontrib.property.RegexTask (part >>>> >>>> >>>>>of >>>>>AntContrib). >>>>>That task uses >>>>> org.apache.tools.ant.types.RegularExpression; >>>>> org.apache.tools.ant.types.Substitution; >>>>> org.apache.tools.ant.util.regexp.Regexp; >>>>>These classes are indeed in ant.jar (1.5.3.1 and 1.6). For >>>> >>>>former versions >>>> >>>> >>>>>of Ant I don�t know. >>>>> >>>>>Do you have any problems with my code? >>>>> >>>>> >>>>>Jan >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>>-----Urspr�ngliche Nachricht----- >>>>>>Von: Adam Hardy [mailto:adam.ant@cyberspaceroad.com] >>>>>>Gesendet am: Mittwoch, 18. Juni 2003 18:59 >>>>>>An: Ant Users List >>>>>>Betreff: Re: AW: changing a java package name to a directory path >>>>>> >>>>>>Hi Jan, >>>>>>ant is complaining: >>>>>> >>>>>>No supported regular expression matcher found >>>>>> >>>>>>This doesn't mean it's looking for >>>>>>org.apache.tools.ant.util.regexp.RegexpMatcher does it? I >>>>>>found that in >>>>>>ant.jar. >>>>>> >>>>>> >>>>>>Adam >>>>>> >>>>>>Jan.Materne@rzf.fin-nrw.de wrote: >>>>>> >>>>>> >>>>>> >>>>>>>Use of Ant-Contrib >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>> >>>>>>resource="net/sf/antcontrib/antcontrib.properties"/> >>>>>> >>>>>>> >>>>>>> >>>>> >>>>>>regexp="\." >>>>>> >>>>>> >>>>>> >>>>>>>replace="/" global="true" /> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>gave me >>>>>>> >>>>>>>main: >>>>>>> [echo] package = org.apache.tools.ant >>>>>>> [echo] path = org/apache/tools/ant >>>>>>> >>>>>>>BUILD SUCCESSFUL >>>>>>> >>>>>>> >>>>>>> >>>>>>>Ant-Contrib: >>>>>>>Homepage: http://sourceforge.net/projects/ant-contrib/ >>>>>>>CVS-Source: >>>>>>> >>>>> >>>>> >>>>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ant-contrib/ant >>>>-contrib/src/n >>>> >>>> >>>>>>et/sf/antcontrib/ >>>>>>CVS-Manual: >>>>>> >>>>> >>>>> >>>>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/ant-contrib/ant >>>>-contrib/manua >>>> >>>> >>>>>>l/index.html >>>>>> >>>>>> >>>>> >>>>> >>>>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/ant- >>>>contrib/ant-co >>>> >>>> >>>>>>ntrib/manual/tasks/index.html >>>>>>Binary: http://gump.covalent.net/jars/latest/ant-contrib/ >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>Jan >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>>>-----Urspr�ngliche Nachricht----- >>>>>>>Von: Adam Hardy [mailto:adam.ant@cyberspaceroad.com] >>>>>>>Gesendet am: Mittwoch, 18. Juni 2003 12:55 >>>>>>>An: user@ant.apache.org >>>>>>>Betreff: changing a java package name to a directory path >>>>>>> >>>>>>>Hi, >>>>>>> >>>>>>>I would like to create a directory path from a property >>>>>>>containing a >>>>>>>java package name. >>>>>>> >>>>>>>e.g.: >>>>>>> >>>>>>>org.foo.bar to org/foo/bar >>>>>>> >>>>>>>Is there a way of doing this in Ant? I'm using JAXB (the >>>> >>>>xml binding >>>> >>>> >>>>>>>package). I created a task to run its executable xjc, >>>> >>>>which creates a >>>> >>>> >>>>>>>package of java classes from an xml schema. You have to >> >>give it a >> >>>>>>>package name, e.g. org.foo.bar, to create. It's this property >>>>>>>I need to >>>>>>>convert into a path so I can check if it's in >>>>>>>comparison with >>>>>>>the xml schema. >>>>>>> >>>>>>>Thanks in advance for any help, >>>>>>> >>>>>>>Adam >>>>>>> >>>>>>> >>>>>>> >>>>>>> >>>>>>>----------------------------------------------------------- >>>> >>>>---------- >>>> >>>> >>>>>>>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 >>>>> >>>> >>>> >>>>------------------------------------------------------------ >> >>--------- >> >>>>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 > > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org