Hi,
Using ant1.3, linux.
[lengthy post - thanks in advance for reading...]
I've rewritten the ejbdoclet.jar
(http://www.sourceforge.net/projects/ejbdoclet) so that I can extend it and
not have to rebuild the jar for each different extension. What this means is
that I have my doclet in its own jar, which extends another doclet, which is
in another jar.
javadoc -d ejbdoclet/ -doclet com.nuix.util.ejbdoclet.NuixDoclet
bdogen/com/nuix/bdo/AccountEJB.java
This works fine at command line.... provided I have set my classpath. I
understand that the -classpath flag is part of the standard doclet, and so
doesn't work when you use a custom doclet. What I want to do is build this
using ant. I've tried numerous variations of the build script, the most sane
being
<javadoc packagenames="${nuix.packagenames}">
<sourcepath>
<pathelement path="${java.dir}"/>
<pathelement path="${ejbdoclet.dir}"/>
<pathelement path="${bdogen.dir}"/>
</sourcepath>
<classpath id="classpath">
<fileset dir="${lib.dir}">
<include name="**/*.jar"/>
</fileset>
</classpath>
<doclet name="com.nuix.util.ejbdoclet.NuixDoclet"
path="${lib.dir}/nuixdoclet.jar,${lib.dir}/ejbdoclet.jar">
<param name="-name" value="Extreme Transaction Platform" />
<param name="-d" value="${ejbdoclet.dir}" />
</doclet>
</javadoc>
The key line being the doclet path... I've tried to specify both jars there,
but it appears to be not picking them up:
javadoc: Cannot find doclet class com.nuix.util.ejbdoclet.NuixDoclet
1 error
Now the two jar files are:
[dim@host63 lib]$ jar -tf ejbdoclet.jar
META-INF/
META-INF/MANIFEST.MF
ejbdoclet/
ejbdoclet/EJBDoclet.class
ejbdoclet/TemplateDoclet.class
ejbdoclet/JBossDoclet.class
ejbdoclet/entitybmp.j
ejbdoclet/dataobject.j
ejbdoclet/entitypk.j
ejbdoclet/remote.j
ejbdoclet/entitycmp.j
ejbdoclet/home.j
[dim@host63 lib]$ jar -tf nuixdoclet.jar
META-INF/
META-INF/MANIFEST.MF
com/
com/nuix/
com/nuix/util/
com/nuix/util/ejbdoclet/
ejbdoclet/
com/nuix/util/ejbdoclet/NuixDoclet.class
ejbdoclet/nuixcmp.j
The only way I have been able to make this work is to have one jar, and place
everything in the one file. This works fine, apart from the fact that it is
exactly what I'm trying to avoid.
My question then: has anyone else been able to make something like this work?
- setting a classpath for the javadoc, using a custom doclet. In the docs,
there are docletpath and docletpathref attributes documented, but when I try
to use them with doclet I get error messages....
cheers, and tia for any suggestions.
dim.