Javadoc:第三方库中的注释 [英] Javadoc: Annotations from third party libraries
问题描述
每当有人向相关文件提交任何更改时,我都试图编写一个SVN提交后钩子以在网页上生成javadoc.
I'm trying to write an SVN Post-Commit hook to generate javadoc on a webpage whenever someone submits any changes to relevant files.
我是钩子概念的新手,但我没想到在生成Javadoc时会遇到任何奇怪的错误.
I was new to the hook concept, but I didn't expect to run in any strange errors when generating the javadoc.
java.lang.ClassCastException: com.sun.tools.javadoc.ClassDocImpl cannot be cast to com.sun.javadoc.AnnotationTypeDoc
at com.sun.tools.javadoc.AnnotationDescImpl.annotationType(AnnotationDescImpl.java:46)
at com.sun.tools.doclets.internal.toolkit.util.Util.isDeprecated(Util.java:811)
at com.sun.tools.doclets.formats.html.AbstractIndexWriter.printComment(AbstractIndexWriter.java:186)
在StackOverFlow上进行了几次成功的搜索后,我发现它与第三方注释有关. (我使用了Play框架,并且使用了许多其他库)
After a few succesful searches on StackOverFlow I discovered it had something to do with third-party-annotations. (I make use of the Play framework and that uses a number of other libraries)
因此,我将所有内容都包含在脚本中:
So I included everything in a script:
#!/bin/sh
CLASSPATH="~/Play/play-1.1.1/;"
javadoc -d ~/svndoc/ -classpath $CLASSPATH -sourcepath ~/svntest/avon/trunk/ScoreDB/app @packages
但这会产生完全相同的错误.有时有10条警告,但大多数时候有27条.
But this generates the exact same errors. Sometimes there are 10 warnings, but most of the time there are 27 of them.
你们能帮我吗?
预先感谢, 碧玉
推荐答案
您的类路径看起来不正确.首先,其中不应包含;
(在Unix中,分隔符为:
,但最后不需要.).其次,您是否在此目录中确实有单独的类文件?如果有jar文件,则需要单独列出它们,或在其中放置*
(但请注意,bash不会对其进行扩展,因为您需要:
而不是它们之间的空格).
Your classpath looks wrong. First, there should be no ;
in it (in Unix, the separator is :
, but it is not needed at the end). Secondly, do you really have the individual class files in this directory? If there are jar files, you need to either list them individually, or put a *
there (but pay attention that bash does not expand it, since you would need :
instead of spaces between).
不过,我不知道这是否可以解决问题.
I have no idea if this would solve the problem, though.
这篇关于Javadoc:第三方库中的注释的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!