You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Chris <sh...@yahoo.com> on 2008/12/01 00:16:24 UTC

Missing class for regex

I'm trying to use the <propertyregex> task from ant-contrib. It works 
fine when I call my ant build script directly, but when I call it 
indirectly within a Maven/Eclipse environment, I get this error message:

build.xml:67: No supported regular expression matcher found: 
java.lang.ClassNotFoundException: 
org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp

I'm guessing that this is a classpath problem, and Maven isn't 
automatically including all the libs it needs, so I need to include them 
  manually. No problem -- I found the jar that contains the class, 
ant-nodeps.jar, and put it on the classpath. (And confirmed that it's 
there.)

Still getting the same error, though. What's wrong?


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: Missing class for regex

Posted by Chris <sh...@yahoo.com>.
Chris wrote:
> I'm trying to use the <propertyregex> task from ant-contrib. It works 
> fine when I call my ant build script directly, but when I call it 
> indirectly within a Maven/Eclipse environment, I get this error message:
> 
> build.xml:67: No supported regular expression matcher found: 
> java.lang.ClassNotFoundException: 
> org.apache.tools.ant.util.regexp.Jdk14RegexpRegexp
> 
> I'm guessing that this is a classpath problem, and Maven isn't 
> automatically including all the libs it needs, so I need to include them 
>  manually. No problem -- I found the jar that contains the class, 
> ant-nodeps.jar, and put it on the classpath. (And confirmed that it's 
> there.)
> 
> Still getting the same error, though. What's wrong?

Figured it out. The trick is to add the dependency to the plugin, not to 
the main dependencies section of the pom file. It needs "plugin" scope. 
See 
http://maven.apache.org/plugins/maven-antrun-plugin/examples/customTasks.html


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org