ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremiah Jahn <jerem...@goodinassociates.com>
Subject taskdef and classpath problem with 1.5
Date Tue, 30 Jul 2002 21:25:52 GMT
For some reason, I can't use taskdef.

I have added my jar file to the proper directory /usr/share/java/ant
it shows up in the classpath when starting
I have tried other jars, with the same effect
I have tried ten zillion different taskdef styles with no effect.
I've treid 1.4.1 1.5 these are all installed from the rpms

tried:
  <taskdef name="install"
classname="org.apache.catalina.ant.InstallTask"/>

my latest build.xml incarnation looks like this:

<taskdef resource="./tasks.properties">
    <classpath>
      <pathelement location="lib/catalina-ant.jar"/>
    </classpath>
  </taskdef>

tasks.proerties looks like this:
install=org.apache.catalina.ant.InstallTask

debug/verbose output looks like this:
[jeremiah@bluejay judici]$ ant -debug -verbose web_install
PATH:
/usr/share/java/ant/client.jar:/usr/share/java/ant/catalina-ant.jar:/home/
jeremiah/temp_judici/judici/lib/catalina-ant.jar:.:/usr/share/java/xml-commons-a
pis.jar:/usr/share/java/jaxp_parser_impl.jar:/usr/share/java/ant.jar:/usr/share/
java/ant-optional.jar:/usr/jdk/lib/tools.jar
Apache Ant version 1.5 compiled on July 12 2002
Apache Ant version 1.5 compiled on July 12 2002
Buildfile: build.xml
Detected Java version: 1.4 in: /usr/java/j2sdk1.4.0/jre
Detected OS: Linux
parsing buildfile build.xml with URI =
file:/home/jeremiah/temp_judici/judici/bu
ild.xml
Project base dir set to: /home/jeremiah/temp_judici/judici
  [taskdef] Loading definitions from resource ./tasks.properties

BUILD FAILED
file:/home/jeremiah/temp_judici/judici/build.xml:23: taskdef class
org.apache.ca
talina.ant.InstallTask cannot be found
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:240)
        at
org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:208)
        at
org.apache.tools.ant.helper.ProjectHelperImpl$TaskHandler.finished(Pr
ojectHelperImpl.java:821)
        at
org.apache.tools.ant.helper.ProjectHelperImpl$AbstractHandler.endElem
ent(ProjectHelperImpl.java:300)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
        at org.apache.xerces.impl.XMLNamespaceBinder.endElement(Unknown
Source)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S
ource)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElemen
t(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at
org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl
.java:155)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:117)
        at org.apache.tools.ant.Main.runBuild(Main.java:597)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)
--- Nested Exception ---
java.lang.NoClassDefFoundError: org/apache/tools/ant/Task
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:322)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:509)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:12
3)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:246)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at
org.apache.tools.ant.AntClassLoader.findBaseClass(AntClassLoader.java
:1102)
        at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:919
)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:262)
        at
org.apache.tools.ant.taskdefs.Definer.addDefinition(Definer.java:230)
        at
org.apache.tools.ant.taskdefs.Definer.execute(Definer.java:208)
        at
org.apache.tools.ant.helper.ProjectHelperImpl$TaskHandler.finished(Pr
ojectHelperImpl.java:821)
        at
org.apache.tools.ant.helper.ProjectHelperImpl$AbstractHandler.endElem
ent(ProjectHelperImpl.java:300)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source
)
        at org.apache.xerces.impl.XMLNamespaceBinder.endElement(Unknown
Source)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(Unknown S
ource)
        at org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(Unknown
Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElemen
t(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(
Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContent
Dispatcher.dispatch(Unknown Source)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Un
known Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown
Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
        at
org.apache.tools.ant.helper.ProjectHelperImpl.parse(ProjectHelperImpl
.java:155)
        at
org.apache.tools.ant.ProjectHelper.configureProject(ProjectHelper.jav
a:117)
        at org.apache.tools.ant.Main.runBuild(Main.java:597)
        at org.apache.tools.ant.Main.start(Main.java:196)
        at org.apache.tools.ant.Main.main(Main.java:235)

Total time: 2 seconds




-- 
"Ahead warp factor 1"
- Captain Kirk

Mime
View raw message