ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "T Master" <tmas...@iknowledgeinc.com>
Subject custom task location ??
Date Mon, 13 Aug 2001 21:11:50 GMT
Where should my custom task class file be located?

This is my filesystem hierarchy:

basedir
|
+----  xml build files   (my project's basedir is "../" )
+--- project class files
+--- project source files
+--- project classpath libs

My taskdef code is as follows:
    <taskdef name="javancss" classname="JavaNcssTask"/>

I've copied the task class file to each place.  The error received is:

parsing buildfile C:\dev\java\build\build.xml with URI =
file:C:/dev/java/build/build.xml
Setting project property: basedir -> C:\dev\java
Project base dir set to: C:\dev\java
   +Task: property
Loading C:\dev\java\build\mybuild.properties
Setting project property: buildfile.dir -> build
Setting project property: src.dir -> src
Setting project property: src.test.dir -> test
Setting project property: buildtools.buildfile -> buildtools-build.xml
Setting project property: lib.build.dir -> lib/build
Setting project property: build.dir -> class
Setting project property: dist.dir -> jar
Setting project property: javadoc.dir -> docs/api
   +Task: taskdef
build.xml [33] taskdef class JavaNcssTask cannot be found
--- Nested Exception ---
java.lang.ClassNotFoundException: Will not load classes from the default
package
        at
org.netbeans.core.MultiURLClassLoader.loadClass(MultiURLClassLoader.java:176
)
        at
org.netbeans.core.MultiURLClassLoader.loadClass(MultiURLClassLoader.java:140
)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at org.apache.tools.ant.taskdefs.Taskdef.execute(Taskdef.java:111)
        at
org.apache.tools.ant.ProjectHelper$TaskHandler.finished(ProjectHelper.java:4
82)
        at
org.apache.tools.ant.ProjectHelper$AbstractHandler.endElement(ProjectHelper.
java:204)
        at
org.xml.sax.helpers.XMLReaderAdapter.endElement(XMLReaderAdapter.java:347)
        at
org.apache.xerces.parsers.SAXParser.endElement(SAXParser.java:1403)
        at
org.apache.xerces.validators.common.XMLValidator.callEndElement(XMLValidator
.java:1180)
        at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1861)
        at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1234)
        at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
        at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
        at
org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at org.apache.tools.ant.ProjectHelper.parse(ProjectHelper.java:117)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.java:85)
        at
org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:236)
        at
org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:118)

Assistance grateful as always!

T Master.


Mime
View raw message