在NetBeans中,我在尝试为Maven项目生成JavaDoc时遇到以下错误.
Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:javadoc
(default-cli) on project Heur: An error has occurred in JavaDocs report generation:
Exit code: 1 - C:\Users\Admin\JavaProjects\Heur\src\main\java\com\heur\App.java:27:
error: malformed HTML
* @author MyName <myemail @ gmail.com>
我不明白错误,据我所知,@ author标签是正确的.这里报道的是完整性:
/**
*
* @author MyName <myemail @ gmail.com>
* @version 1.0.0
* @since 4-apr-2014
*/
解决方法:
你需要逃避<,@和>像这样:
{@literal <}myemail {@literal @} gmail.com{@literal >}
可能更清楚地更换<和>与(和)给你:
(myemail {@literal @} gmail.com)
编辑:
或者如您所建议的那样,只需将该标记标记为字面值即可
{@literal (myemail @ gmail.com)}