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(RegexpFactory.java:112)
at org.apache.tools.ant.util.regexp.RegexpFactory.newRegexp(RegexpFactory.java:75)
at org.apache.tools.ant.types.RegularExpression.<init>(RegularExpression.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

[EMAIL PROTECTED] wrote:
<propertyregex> 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:[EMAIL PROTECTED]
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


[EMAIL PROTECTED] wrote:

Use <propertyregex/> of Ant-Contrib


<?xml version="1.0" encoding="ISO-8859-1"?>
<project name="test" basedir="." default="main">
<target name="main">
<taskdef

resource="net/sf/antcontrib/antcontrib.properties"/>


<property name="package" value="org.apache.tools.ant" />
<propertyregex property="path" input="${package}"

regexp="\."


replace="/" global="true" />
       <echo message="package = ${package}"/>
       <echo message="path    = ${path}"/>
   </target>
</project>


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:[EMAIL PROTECTED]
Gesendet am: Mittwoch, 18. Juni 2003 12:55
An: [EMAIL PROTECTED]
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 <uptodate> in comparison with the xml schema.

Thanks in advance for any help,

Adam




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to