I would like to determine whether the javadoc command that we issue from a makefile encounters any errors or warnings. Currently, I can see that we're encountering errors due to import statements that are not on the classpath that we specify to javadoc (but should be). I ultimately want to fix our javadoc invocation and content and then lock it down so that any error or warning will be caught by the makefile and stop the build. However, as far as I can tell, the documentation does not mention any return code values from the javadoc command. Note that we're using Java 7 and running javadoc from a command in a GNU makefile, not from Ant or Maven. What do you recommend that I do?
UPDATE: My command looks like this:
<path1>/javadoc -overview <path2>/overview.html -sourcepath <path3> <file1> <file2> <dir1> <dir2> -d <output_dir>
Constructing Javadoc information...
../../../<path>/<filename>.java:5: error: package javax.servlet.http does not exist
Even though javadoc 1.7 reports errors, it returns with a zero return value, so the build doesn't catch it. However, javadoc 1.8 returns with a nonzero return value, which the build does catch.