I have a *scriptdef *to do some customization of the *javadoc *Ant task.
What I want to do is pass to the *scriptdef *a tag element precisely like
the tag element that can be a child of the javadoc task element. The class
that corresponds to the tag element is *Javadoc.TagArgument*.

Below is the relevant passage:
    <scriptdef name="manipulate-javadoc-script" language="beanshell"
classpathref="beanshell.taskdefs.classpath">
      <element name="tag" classname="*
org.apache.tools.ant.taskdefs.Javadoc.TagArgument*" />
...

When I invoke this, though, I get the following:
Class not found: org.apache.tools.ant.taskdefs.Javadoc.TagArgument

Here's the more detailed error output:
--- Nested Exception ---
java.lang.ClassNotFoundException:
org.apache.tools.ant.taskdefs.Javadoc.TagArgument
        at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
...

At first I thought the problem had something to do with the classpathref being
used. But if I change the element's class to a more recognizable class, it
gets accepted. See below:
<element name="tag" classname="org.apache.tools.ant.types.FileSet" />

Anyone understand why *Javadoc.TagArgument *is invisible to that classloader
while other Ant classes *are *visible?

Reply via email to