Uploaded image for project: 'Maven Plugin Tools'
  1. Maven Plugin Tools
  2. MPLUGIN-322

The javadoc for the @Parameter annotation should clearly state that those are only evaluated on fields of a Mojo

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.5
    • Fix Version/s: 3.5.1
    • Labels:
      None

      Description

      As it is not obvious that @Parameter annotations must only be used on fields of a Mojo class (see http://maven.40175.n5.nabble.com/why-the-defaultValue-is-not-being-injected-in-Parameter-inside-a-complex-parameter-bean-td5835732.html) this should be explicitly stated. I would propose to change the javadoc in http://svn.apache.org/viewvc/maven/plugin-tools/trunk/maven-plugin-annotations/src/main/java/org/apache/maven/plugins/annotations/Parameter.java?revision=1757927&view=markup#l29 from

      Used to configure your Mojo parameters to be injected by
      <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
      <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.

      to

      Used to configure your Mojo parameters to be injected by
      <a href="/ref/current/maven-core/apidocs/org/apache/maven/plugin/MavenPluginManager.html">
      <code>MavenPluginManager.getConfiguredMojo(...)</code></a>.
      Although nested bean injection is supported by that method, this annotation is only effective on fields of the Mojo class itself and not on fields of any bean classes being used as Mojo parameter.

        Attachments

          Activity

            People

            • Assignee:
              hboutemy Hervé Boutemy
              Reporter:
              kwin Konrad Windszus
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: