In NetBeans I got the following error while trying to generate the JavaDocs for a Maven project.

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>

I don't understand the error, in my knowledge the @author tag is correct. It is reported here for completeness:

/**
 *
 * @author MyName <myemail @ gmail.com>
 * @version 1.0.0
 * @since 4-apr-2014
 */
有帮助吗?

解决方案

You'll need to escape the <, @ and > like this:

{@literal <}myemail {@literal @} gmail.com{@literal >}

Might be clearer to replace the < and > with ( and ) to give you:

(myemail {@literal @} gmail.com)

Edit:

Or as you suggested, just mark the lot as literal with

{@literal (myemail @ gmail.com)}
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top