Uploaded image for project: 'Maven Javadoc Plugin'
  1. Maven Javadoc Plugin
  2. MJAVADOC-799

Remove inconsistent `AbstractFixJavadocMojo#defaultVersion` default value

    XMLWordPrintableJSON

Details

    • Task
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 3.7.0
    • 3.8.0
    • fix
    • None

    Description

      The defaultVersion parameter of the javadoc:fix has an inconsistent / incorrect default value (though I am not sure what the 'correct' value would be).

      Inconsistencies

      • The Javadoc says "By default, it is $Id:$"
      • The actual and documented (on the Mojo help) default is $Id: $Id
      • The field in the code has the initial value $Id: $, with a space (using Unicode escapes)
        This value seems to have no effect because @Parameter#defaultValue overwrites the initial field value.

      Maybe it would therefore be easiest to:

      • Remove the "By default, it is ..." sentence from the Javadoc
        It is redundant because the Mojo help documents the @Parameter#defaultValue.
      • Remove the initial field value
      • Optionally remove the DEFAULT_VERSION_VALUE field and directly inline the value
      • Optionally change the default to the intended default value (whatever that is)

      Historical background

      It seems originally the default value was supposed to be $Id$, but that was apparently causing issues with SVN, so commit 0cecfaa tried to fix this by using the field initializer and Unicode escapes instead of default-value=. But this caused the first inconsistency because the Javadoc said $Id:$ (without space) but the value was $Id: $ (with space).

      Later commit 3dcd209 refactored the code to use @Parameter and added a defaultValue, but that is $Id: $Id (with duplicate "Id").

      Attachments

        Issue Links

          Activity

            People

              michael-o Michael Osipov
              Marcono1234 Marcono1234
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: