[ 
https://issues.apache.org/jira/browse/HBASE-19663?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16827252#comment-16827252
 ] 

Sean Busbey commented on HBASE-19663:
-------------------------------------

I figured out what the problem is, but I'm not sure of the solution. 

the reference to the JSR305 annotation TypeQualifierNickname happens in the 
findbugs-annotations classes we reference (Nullable, NotNull, etc)

The difference here is one of error handling between the doclet from Yetus and 
the standard doclet. For the standard doclet, it looks like any missed 
annotation definition results in a warning. for the doclet from Yetus, if the 
classes we're documenting have an annotation that's missing it causes a 
warning. but if there is a class definition for an annotation we use, then that 
class must be fully referenceable.

So. If I modify the javadoc wrapper script that is created by the 
maven-javadoc-plugin to either remove the findbugs-annotations jar or add in 
the jsr305 jar, things work. Since we don't tell javadoc to link in the 
annotations from the findbugs-annotations package the resulting javadocs are 
even equivalent.

I'm not sure what the best answer is here. I suspect removing the 
findbugs-annotations jar from the classpath needed for javadoc generation will 
be difficult. Adding in jsr305 for just javadocs is pretty easy.

There's also not that many references, so maybe we could just get rid of this 
annotation use. I'm not sure what the story is for them in newer versions of 
spotbugs.
 
{code}
git grep "edu.umd.cs.findbugs.annotations" | wc -l
     134
{code}


> site build fails complaining "javadoc: error - class file for 
> javax.annotation.meta.TypeQualifierNickname not found"
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HBASE-19663
>                 URL: https://issues.apache.org/jira/browse/HBASE-19663
>             Project: HBase
>          Issue Type: Bug
>          Components: website
>            Reporter: stack
>            Assignee: stack
>            Priority: Critical
>             Fix For: 3.0.0
>
>         Attachments: script.sh
>
>
> Cryptic failure trying to build beta-1 RC. Fails like this:
> {code}
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 03:54 min
> [INFO] Finished at: 2017-12-29T01:13:15-08:00
> [INFO] Final Memory: 381M/9165M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.maven.plugins:maven-site-plugin:3.4:site (default-site) on project 
> hbase: Error generating maven-javadoc-plugin:2.10.3:aggregate:
> [ERROR] Exit code: 1 - warning: unknown enum constant When.ALWAYS
> [ERROR] reason: class file for javax.annotation.meta.When not found
> [ERROR] warning: unknown enum constant When.UNKNOWN
> [ERROR] warning: unknown enum constant When.MAYBE
> [ERROR] 
> /home/stack/hbase.git/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java:762:
>  warning - Tag @link: malformed: "#matchingRows(Cell, byte[]))"
> [ERROR] 
> /home/stack/hbase.git/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java:762:
>  warning - Tag @link: reference not found: #matchingRows(Cell, byte[]))
> [ERROR] 
> /home/stack/hbase.git/hbase-common/src/main/java/org/apache/hadoop/hbase/CellUtil.java:762:
>  warning - Tag @link: reference not found: #matchingRows(Cell, byte[]))
> [ERROR] javadoc: warning - Class javax.annotation.Nonnull not found.
> [ERROR] javadoc: error - class file for 
> javax.annotation.meta.TypeQualifierNickname not found
> [ERROR]
> [ERROR] Command line was: /home/stack/bin/jdk1.8.0_151/jre/../bin/javadoc 
> -J-Xmx2G @options @packages
> [ERROR]
> [ERROR] Refer to the generated Javadoc files in 
> '/home/stack/hbase.git/target/site/apidocs' dir.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
> {code}
> javax.annotation.meta.TypeQualifierNickname is out of jsr305 but we don't 
> include this anywhere according to mvn dependency.
> Happens building the User API both test and main.
> Excluding these lines gets us passing again:
> {code}
>   3511               <doclet>
>   3512                 
> org.apache.yetus.audience.tools.IncludePublicAnnotationsStandardDoclet
>   3513               </doclet>
>   3514               <docletArtifact>
>   3515                 <groupId>org.apache.yetus</groupId>
>   3516                 <artifactId>audience-annotations</artifactId>
>   3517                 <version>${audience-annotations.version}</version>
>   3518               </docletArtifact>
> + 3519               <useStandardDocletOptions>true</useStandardDocletOptions>
> {code}
> Tried upgrading to newer mvn site (ours is three years old) but that a 
> different set of problems.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to