我遇到了JavaDoc Ant任务的问题。它给了我一个java.lang.NoClassDefFoundError
的类,就我所知,它肯定在类路径上。根据{{3}},当类在编译期间存在时抛出NoClassDefFoundError
,但在运行时期间无法找到。 (A the documentation。)
当我删除classpath项时,它会按预期失败(许多包/符号未找到错误),而仍然给出相同的NoClassDefFoundError
。为什么这个类是否在类路径上而对于taglet失败了?
细节:
它找不到的类称为com.github.xbn.io.SimpleDebugable
,它在这个jar文件中:
C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\z_build\jar_dependencies\xbnjava-0.1.4.2-all.jar
JavaDoc Ant任务。上面的jar文件是类路径中的第一个项目。
<target name="doca" description="Generates javadoc documentation.">
<property name="jar_base_dir" value="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\z_build\jar_dependencies\"/>
<property name="taglet_jar" value="C:\data_jeffy\programming\build\codelet-0.1.4.1\download\codelet-0.1.4.1-all.jar"/>
<javadoc
packagenames="com.github.aliteralmind.codelet,com.github.aliteralmind.codelet.alter,com.github.aliteralmind.codelet.simplesig,com.github.aliteralmind.codelet.taglet,com.github.aliteralmind.codelet.type,com.github.aliteralmind.codelet.util"
defaultexcludes="yes"
destdir="C:\data_jeffy\programming\build\codelet-0.1.4.1\documentation\javadoc"
splitindex="true"
additionalparam="-J-Dcodelet_config_dir=C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\codelet_config\"
classpath="${jar_base_dir}xbnjava-0.1.4.2-all.jar;
C:\data_jeffy\programming\build\codelet-0.1.4.1\download\codelet-0.1.4.1-all.jar;
${jar_base_dir}templatefeather-0.1.1.2-all.jar;
${jar_base_dir}commons-io-2.4.jar;
${jar_base_dir}guava-16.0.1.jar;
${jar_base_dir}jdk_751__tools__contains_com_sun.jar"
>
<sourcepath>
<pathelement path="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src"/>
</sourcepath>
<!-- Custom taglets-->
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletTaglet"
path="${taglet_jar}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletDotOutTaglet"
path="${taglet_jar}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletAndOutTaglet"
path="${taglet_jar}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.FileTextletTaglet"
path="${taglet_jar}"/>
</javadoc>
</target>
结果如下:
[javadoc] javadoc: error - In doclet class com.sun.tools.doclets.standard.Standard,
method start has thrown an exception java.lang.reflect.InvocationTargetException
[javadoc] java.lang.NoClassDefFoundError: com/github/xbn/io/SimpleDebuggable
完整输出:
[C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet]ant docx
Buildfile: C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\build.xml
docx:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source files for package com.github.aliteralmind.codelet...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.alter...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.simplesig...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.taglet...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.type...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.util...
[javadoc] Constructing Javadoc information...
[javadoc] 1 error
[javadoc] javadoc: error - In doclet class com.sun.tools.doclets.standard.Standard, method start has thrown an exception java.lang.reflect.InvocationTargetException
[javadoc] java.lang.NoClassDefFoundError: com/github/xbn/io/SimpleDebuggable
[javadoc] at java.lang.ClassLoader.defineClass1(Native Method)
[javadoc] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
[javadoc] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[javadoc] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
[javadoc] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[javadoc] at java.security.AccessController.doPrivileged(Native Method)
[javadoc] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[javadoc] at com.github.aliteralmind.codelet.CodeletBootstrap.wasLoaded(Unknown Source)
[javadoc] at com.github.aliteralmind.codelet.CodeletBootstrap.loadConfiguration(Unknown Source)
[javadoc] at com.github.aliteralmind.codelet.CodeletBootstrap.<clinit>(Unknown Source)
[javadoc] at com.github.aliteralmind.codelet.taglet.CodeletTaglet.<clinit>(Unknown Source)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:606)
[javadoc] at com.sun.tools.doclets.internal.toolkit.taglets.TagletManager.addCustomTag(TagletManager.java:219)
[javadoc] at com.sun.tools.doclets.internal.toolkit.Configuration.initTagletManager(Configuration.java:466)
[javadoc] at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:437)
[javadoc] at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:447)
[javadoc] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:120)
[javadoc] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:83)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:63)
[javadoc] at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:606)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160)
[javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397)
[javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:167)
[javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:59)
[javadoc] at com.sun.tools.javadoc.Main.main(Main.java:49)
[javadoc] Caused by: java.lang.ClassNotFoundException: com.github.xbn.io.SimpleDebuggable
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[javadoc] at java.security.AccessController.doPrivileged(Native Method)
[javadoc] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[javadoc] ... 37 more
BUILD SUCCESSFUL
Total time: 1 second
当您从类路径中完全删除jar文件时,它会按预期失败,并出现几百package com.github.xbn.... does not exist
和symbol not found
个错误,这意味着classpath元素显然是“正常”。那么为什么它不适用于taglet?
类路径上jar 不的输出:
[C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet]ant docx
Buildfile: C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\build.xml
docx:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source files for package com.github.aliteralmind.codelet...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.alter...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.simplesig...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.taglet...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.type...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.util...
[javadoc] Constructing Javadoc information...
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:18: error: package com.github.xbn.linefilter.alter does not exist
[javadoc] import com.github.xbn.linefilter.alter.TextLineAlterer;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:19: error: package com.github.xbn.linefilter does not exist
[javadoc] import com.github.xbn.linefilter.FilteredLineIterator;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:20: error: package com.github.xbn.analyze.alter does not exist
[javadoc] import com.github.xbn.analyze.alter.ExpirableElements;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:21: error: package com.github.xbn.analyze.alter does not exist
[javadoc] import com.github.xbn.analyze.alter.MultiAlterType;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:22: error: package com.github.xbn.array does not exist
[javadoc] import com.github.xbn.array.NullElement;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:23: error: package com.github.xbn.lang does not exist
[javadoc] import com.github.xbn.lang.IllegalArgumentStateException;
[javadoc] ^
继续(删除约1,500行):
[javadoc] import com.github.xbn.linefilter.FilteredLineIterator;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\util\zCodeletCustomizers.java:25: error: package com.github.xbn.analyze.alter does notexist
[javadoc] import com.github.xbn.analyze.alter.ExpirableElements;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\util\zCodeletCustomizers.java:26: error: package com.github.xbn.analyze.alter does notexist
[javadoc] import com.github.xbn.analyze.alter.MultiAlterType;
[javadoc] ^
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\util\zCodeletCustomizers.java:27: error: package com.github.xbn.array does not exist
[javadoc] 1 error
[javadoc] import com.github.xbn.array.NullElement;
[javadoc] 371 warnings
[javadoc] ^
接下来:最后,它给出的错误与jar 在类路径中的错误相同:
[javadoc] javadoc: error - In doclet class com.sun.tools.doclets.standard.Standard,
method start has thrown an exception java.lang.reflect.InvocationTargetException
[javadoc] java.lang.NoClassDefFoundError: com/github/xbn/io/SimpleDebuggable
[javadoc] at java.lang.ClassLoader.defineClass1(Native Method)
[javadoc] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
[javadoc] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[javadoc] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
[javadoc] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[javadoc] at java.security.AccessController.doPrivileged(Native Method)
[javadoc] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[javadoc] at com.github.aliteralmind.codelet.CodeletBootstrap.wasLoaded(Unknown Source)
[javadoc] at com.github.aliteralmind.codelet.CodeletBootstrap.loadConfiguration(Unknown Source)
[javadoc] at com.github.aliteralmind.codelet.CodeletBootstrap.<clinit>(Unknown Source)
[javadoc] at com.github.aliteralmind.codelet.taglet.CodeletTaglet.<clinit>(Unknown Source)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:606)
[javadoc] at com.sun.tools.doclets.internal.toolkit.taglets.TagletManager.addCustomTag(TagletManager.java:219)
[javadoc] at com.sun.tools.doclets.internal.toolkit.Configuration.initTagletManager(Configuration.java:466)
[javadoc] at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:437)
[javadoc] at com.sun.tools.doclets.internal.toolkit.Configuration.setOptions(Configuration.java:447)
[javadoc] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:120)
[javadoc] at com.sun.tools.doclets.internal.toolkit.AbstractDoclet.start(AbstractDoclet.java:83)
[javadoc] at com.sun.tools.doclets.formats.html.HtmlDoclet.start(HtmlDoclet.java:63)
[javadoc] at com.sun.tools.doclets.standard.Standard.start(Standard.java:39)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[javadoc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
[javadoc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[javadoc] at java.lang.reflect.Method.invoke(Method.java:606)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.invoke(DocletInvoker.java:280)
[javadoc] at com.sun.tools.javadoc.DocletInvoker.start(DocletInvoker.java:160)
[javadoc] at com.sun.tools.javadoc.Start.parseAndExecute(Start.java:397)
[javadoc] at com.sun.tools.javadoc.Start.begin(Start.java:167)
[javadoc] at com.sun.tools.javadoc.Main.execute(Main.java:59)
[javadoc] at com.sun.tools.javadoc.Main.main(Main.java:49)
[javadoc] Caused by: java.lang.ClassNotFoundException: com.github.xbn.io.SimpleDebuggable
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
[javadoc] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
[javadoc] at java.security.AccessController.doPrivileged(Native Method)
[javadoc] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[javadoc] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[javadoc] ... 37 more
BUILD SUCCESSFUL
Total time: 1 second
在原始(上面)目标中,taglet的路径指向jar文件。对于下面的内容,我已经从jar中提取了taglet类文件并将其解压缩到一个目录中(只提取了这四个taglet类,其他所有内容都保存在jar中),并将taglet路径更改为根目录。
<property name="jar_base_dir" value="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\z_build\jar_dependencies\"/>
<property name="taglet_base_dir" value="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\bin\com\github\aliteralmind\codelet\taglet"/>
<javadoc
packagenames="com.github.aliteralmind.codelet,com.github.aliteralmind.codelet.alter,com.github.aliteralmind.codelet.simplesig,com.github.aliteralmind.codelet.taglet,com.github.aliteralmind.codelet.type,com.github.aliteralmind.codelet.util"
defaultexcludes="yes"
destdir="C:\data_jeffy\programming\build\codelet-0.1.4.1\documentation\javadoc"
splitindex="true"
additionalparam="-J-Dcodelet_config_dir=${dir_sandbox}${codelet.config.dir}${fs}"
classpath="${jar_base_dir}xbnjava-0.1.4.2-all.jar;
C:\data_jeffy\programming\build\codelet-0.1.4.1\download\codelet-0.1.4.1-all.jar;
${jar_base_dir}templatefeather-0.1.1.2-all.jar;
${jar_base_dir}commons-io-2.4.jar;
${jar_base_dir}guava-16.0.1.jar;
${jar_base_dir}jdk_751__tools__contains_com_sun.jar"
>
<sourcepath>
<pathelement path="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src"/>
</sourcepath>
<!-- Custom taglets-->
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletTaglet"
path="${taglet_base_dir}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletDotOutTaglet"
path="${taglet_base_dir}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletAndOutTaglet"
path="${taglet_base_dir}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.FileTextletTaglet"
path="${taglet_base_dir}"/>
</javadoc>
现在NoClassDefFoundError
没有发生。相反,它是
javadoc: error - Error - Exception java.lang.ClassNotFoundException
thrown while trying to register Taglet com.github.aliteralmind.codelet.taglet.CodeletTaglet...
现在的问题是,似乎JavaDoc正在“吞噬”这个错误。我不知道如何看到java.lang.ClassNotFoundException
的痕迹。
完整输出:
docb:
[javadoc] Generating Javadoc
[javadoc] Javadoc execution
[javadoc] Loading source files for package com.github.aliteralmind.codelet...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.alter...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.simplesig...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.taglet...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.type...
[javadoc] Loading source files for package com.github.aliteralmind.codelet.util...
[javadoc] Constructing Javadoc information...
[javadoc] javadoc: error - Error - Exception java.lang.ClassNotFoundException
thrown while trying to register Taglet com.github.aliteralmind.codelet.taglet.CodeletTaglet...
[javadoc] javadoc: error - Error - Exception java.lang.ClassNotFoundException
thrown while trying to register Taglet com.github.aliteralmind.codelet.taglet.CodeletDotOutTaglet...
[javadoc] javadoc: error - Error - Exception java.lang.ClassNotFoundException
thrown while trying to register Taglet com.github.aliteralmind.codelet.taglet.CodeletAndOutTaglet...
[javadoc] Standard Doclet version 1.7.0_72
[javadoc] javadoc: error - Error - Exception java.lang.ClassNotFoundException thrown while trying to register Taglet com.github.aliteralmind.codelet.taglet.FileTextletTaglet...
[javadoc] Building tree for all the packages and classes...
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\BasicCustomizers.java:90:
warning - @.codelet is an unknown tag.
...lots of lines deleted...
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\util\JavaDocUtil.java:185:
warning - @.codelet.and.out is an unknown tag.
[javadoc] C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src\com\github\aliteralmind\codelet\util\JavaDocUtil.java:185:
warning - @.codelet.and.out is an unknown tag.
[javadoc] Building index for all the packages and classes...
[javadoc] Building index for all classes...
[javadoc] Generating C:\data_jeffy\programming\build\codelet-0.1.4.1\documentation\javadoc\help-doc.html...
[javadoc] 4 errors
[javadoc] 57 warnings
BUILD SUCCESSFUL
Total time: 2 seconds
再次使用详细输出:NoClassDefFoundError
is not a ClassNotFoundException
答案 0 :(得分:3)
问题是taglet路径。必须将类路径冗余地传递到主JavaDoc任务和每个自定义标记。每个标记都必须具有不同的ClassLoader
,因此需要重复的类路径。
蚂蚁documentation for the taglet's "path" attribute没有明确说这是一个类路径,这让我很困惑:
指定taglet类的搜索路径的路径(例如/ home / taglets)。路径也可以由嵌套元素
指定
工作目标:
<target name="docc" description="Generates javadoc documentation.">
<property name="jar_base_dir" value="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\z_build\jar_dependencies\"/>
<property name="taglet_base_dir" value="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\bin\"/>
<property name="javadoc_classpath"
value="${jar_base_dir}xbnjava-0.1.4.2-all.jar;C:\data_jeffy\programming\build\codelet-0.1.4.1\download\codelet-0.1.4.1-all.jar;${jar_base_dir}templatefeather-0.1.1.2-all.jar;${jar_base_dir}commons-io-2.4.jar;${jar_base_dir}guava-16.0.1.jar;${jar_base_dir}jdk_751__tools__contains_com_sun.jar;${jar_base_dir}commons-lang3-3.3.2.jar"/>
<javadoc
packagenames="com.github.aliteralmind.codelet,com.github.aliteralmind.codelet.alter,com.github.aliteralmind.codelet.simplesig,com.github.aliteralmind.codelet.taglet,com.github.aliteralmind.codelet.type,com.github.aliteralmind.codelet.util"
defaultexcludes="yes"
destdir="C:\data_jeffy\programming\build\codelet-0.1.4.1\documentation\javadoc"
splitindex="true"
additionalparam="-J-Dcodelet_config_dir=${dir_sandbox}${codelet.config.dir}${fs}"
classpath="${javadoc_classpath}"
>
<sourcepath>
<pathelement path="C:\data_jeffy\programming\sandbox\z__for_git_commit_only\codelet\src"/>
</sourcepath>
<!-- Custom taglets-->
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletTaglet"
path="${javadoc_classpath}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletDotOutTaglet"
path="${javadoc_classpath}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletAndOutTaglet"
path="${javadoc_classpath}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.FileTextletTaglet"
path="${javadoc_classpath}"/>
</javadoc>
</target>
更便携的替代方案:
<target name="docd" description="Generates javadoc documentation.">
<property name="sandbox_grandparent" value="C:/data_jeffy/programming/"/>
<property name="sandbox_parent" value="${sandbox_grandparent}sandbox/z__for_git_commit_only/"/>
<property name="sandbox" value="${sandbox_parent}codelet/"/>
<path id="project_classpath2">
<pathelement location="${sandbox_parent}codelet/bin/"/>
<pathelement location="${sandbox_grandparent}/build/codelet-0.1.4.1/download/codelet-0.1.4.1-all.jar"/>
<fileset dir="${sandbox}z_build/jar_dependencies/" includes="*.jar"/>
</path>
<pathconvert pathsep=";" property="javadoc_classpath" refid="project_classpath2"/>
<javadoc
packagenames="com.github.aliteralmind.codelet.*"
defaultexcludes="yes"
destdir="${sandbox_grandparent}/build/codelet-0.1.4.1/documentation/javadoc"
splitindex="true"
additionalparam="-J-Dcodelet_config_dir=${dir_sandbox}${codelet.config.dir}${fs}"
classpathref="project_classpath2"
>
<sourcepath>
<pathelement path="${sandbox}src"/>
</sourcepath>
<!-- Custom taglets-->
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletTaglet"
path="${javadoc_classpath}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletDotOutTaglet"
path="${javadoc_classpath}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.CodeletAndOutTaglet"
path="${javadoc_classpath}"/>
<taglet name="com.github.aliteralmind.codelet.taglet.FileTextletTaglet"
path="${javadoc_classpath}"/>
</javadoc>
</target>