DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4065>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4065

Regexp mapper and classpath

           Summary: Regexp mapper and classpath
           Product: Ant
           Version: 1.4
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Core tasks
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Hi,

   I'm trying to use the regexp mapper with a specific classpath (much as it is
now possible with style). The documentation says : 

 � The regexp mapper needs a supporting library and an implementation of
org.apache.tools.ant.util.regexp.RegexpMatcher that hides the specifics of the
library. Ant comes with implementations for the java.util.regex package of JDK
1.4, jakarta-regexp and jakarta-ORO. If you compile from sources and plan to use
one of them, make sure the libraries are in your CLASSPATH. �

and indeed, with one of these jars in the build classpath, the mapper will work.

However when the classpath is specified via the documented classpathref
attribute of mapper :

***

<path id="regexp.path">
<pathelement location="lib/extlib/regexp/1.2/lib/jakarta-regexp-1.2.jar"/>
</path>

<target name="make-src">

<copy todir="${dest}">
<mapper to="\1/\2" from="^(.*)/src/java/(.*)$$" classpathref="regexp.path"
type="regexp"/>
***

ant will fail with :  No supported regular expression matcher found

So there seem to be a problem somewhere.

That's a pain, the regexp jar is downloaded somewhere else in the build process
and therefore I can't use in in the general classpath since it won't exist at 
first.

(btw a nested classpath element to mapper would be nice)

Reply via email to