Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Failing to generate JavaDoc in a Maven project for the @author value with NetBeans

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
 */
like image 681
mat_boy Avatar asked Mar 19 '23 23:03

mat_boy


1 Answers

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)}
like image 89
Nick Holt Avatar answered Apr 15 '23 02:04

Nick Holt