Maven Javadoc Plugin
  1. Maven Javadoc Plugin
  2. MJAVADOC-188

-top command line argument is passed even when java version is <1.6, generating a warning

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.5
    • Labels:
      None
    • Environment:
      jdk 1.5

      Description

      The -top argument is being passed when we're using a version smaller than 1.6.
      Then the following warning is generated:

      "[WARNING] -top option is not supported on Java version < 1.6. Ignore this option."
      

      This warning shouldn't be thrown since we're not setting the -top parameter in the POM, so there's no way to ignore it.
      On AbstractJavadocMojo.java, line 1492, the following method is called:

      addArgIfNotEmpty( arguments, "-top", JavadocUtil.quotedArgument( top ), false, false, SINCE_JAVADOC_1_6 );
      

      however, this method checks the version first, and then checks if the argument is null, like the following:

            if ( isJavaDocVersionAtLeast( requiredJavaVersion ) ) 
              {
                  addArgIfNotEmpty( arguments, key, value, repeatKey, splitValue );
              }
              else
              {
                  if ( getLog().isWarnEnabled() )
                  {
                      getLog().warn( key + " option is not supported on Java version < " + requiredJavaVersion
                                     + ". Ignore this option." );
                  }
              }
      }}
      

      Specifically for this command line argument, the method should check the version before calling addArgIfNotEmpty, thus removing the warning if we're not explicitly passing the argument in a jdk < 1.6

        Activity

        Cleber Zarate created issue -
        Siveton Vincent made changes -
        Field Original Value New Value
        Description The -top argument is being passed when we're using a version smaller than 1.6.
        Then the following warning is generated:
        "[WARNING] -top option is not supported on Java version < 1.6. Ignore this option."

        This warning shouldn't be thrown since we're not setting the -top parameter in the POM, so there's no way to ignore it.
        On AbstractJavadocMojo.java, line 1492, the following method is called:

        addArgIfNotEmpty( arguments, "-top", JavadocUtil.quotedArgument( top ), false, false, SINCE_JAVADOC_1_6 );

        however, this method checks the version first, and then checks if the argument is null, like the following:

              if ( isJavaDocVersionAtLeast( requiredJavaVersion ) )
                {
                    addArgIfNotEmpty( arguments, key, value, repeatKey, splitValue );
                }
                else
                {
                    if ( getLog().isWarnEnabled() )
                    {
                        getLog().warn( key + " option is not supported on Java version < " + requiredJavaVersion
                                       + ". Ignore this option." );
                    }
                }
        }}
        Specifically for this command line argument, the method should check the version before calling addArgIfNotEmpty, thus removing the warning if we're not explicitly passing the argument in a jdk < 1.6
        The -top argument is being passed when we're using a version smaller than 1.6.
        Then the following warning is generated:
        {noformat}
        "[WARNING] -top option is not supported on Java version < 1.6. Ignore this option."
        {noformat}

        This warning shouldn't be thrown since we're not setting the -top parameter in the POM, so there's no way to ignore it.
        On AbstractJavadocMojo.java, line 1492, the following method is called:
        {noformat}
        addArgIfNotEmpty( arguments, "-top", JavadocUtil.quotedArgument( top ), false, false, SINCE_JAVADOC_1_6 );
        {noformat}

        however, this method checks the version first, and then checks if the argument is null, like the following:
        {noformat}
              if ( isJavaDocVersionAtLeast( requiredJavaVersion ) )
                {
                    addArgIfNotEmpty( arguments, key, value, repeatKey, splitValue );
                }
                else
                {
                    if ( getLog().isWarnEnabled() )
                    {
                        getLog().warn( key + " option is not supported on Java version < " + requiredJavaVersion
                                       + ". Ignore this option." );
                    }
                }
        }}
        {noformat}

        Specifically for this command line argument, the method should check the version before calling addArgIfNotEmpty, thus removing the warning if we're not explicitly passing the argument in a jdk < 1.6
        Siveton Vincent made changes -
        Affects Version/s 2.4 [ 13630 ]
        Siveton Vincent made changes -
        Assignee Vincent Siveton [ siveton ]
        Fix Version/s 2.5 [ 14120 ]
        Status Open [ 1 ] Closed [ 6 ]
        Resolution Fixed [ 1 ]
        Mark Thomas made changes -
        Project Import Sun Apr 05 11:56:47 UTC 2015 [ 1428235007093 ]
        Mark Thomas made changes -
        Workflow jira [ 12722425 ] Default workflow, editable Closed status [ 12762454 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 00:11:46 UTC 2015 [ 1428279106587 ]
        Mark Thomas made changes -
        Workflow jira [ 12959958 ] Default workflow, editable Closed status [ 12996875 ]

          People

          • Assignee:
            Siveton Vincent
            Reporter:
            Cleber Zarate
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development