ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From otisg <ot...@ureach.com>
Subject taskdef doesn't see class in provided classpathref
Date Fri, 30 Aug 2002 16:55:14 GMT
Hello,

I am using Ant 1.5 and trying to use a
custom task (Checkstyle).
However I am getting an error:

BUILD FAILED
file:/home/otis/wgen/cvs/mclass/javaserver/build/build.xml:105:
Could not create task of type: checkstyle
due to java.lang.NoClassDefFoundError:
org/apache/regexp/RESyntaxException


This is a CLASSPATH problem.
If I set my CLASSPATH environment variable,
things work.
But I would like to make sure that my Ant
scripts don't rely on somebody's
environment, and instead get everything from
their properties file.

So when I try to load the custom task, I do
this:
    <path id="test.classpath"
path="${test.classpath}"/>

    <taskdef name="checkstyle"
    
classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"
     classpathref="test.classpath"/>

test.classpath property does contain all the
needed jars.  It does contain the Jakarta
regexp.jar which contains that
RESyntaxException.class.
test.classpath property does get set
properly (I echoed it to verify).

So my question is:

Is there any reason why this would be failing?
How come the CheckStyleTask is not seeing
RESyntaxException when I provided the
classpath ref in the taskdef call?

I have the same problem with a few other
custom Ant Tasks (e.g. DbUnit)

Thanks,
Otis


________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag

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


Mime
View raw message