Skip to content

[MNG-5001] @readonly Mojo parameter annotation doesn't work any more #7147

@jira-importer

Description

@jira-importer

Jochen Ehret opened MNG-5001 and commented

In Maven 2.2.1, the @readonly annotation works as described: You can't configure a Mojo parameter in the pom <configuration> section. If you do, the build will fail:

[INFO] Error configuring: test:test-plugin. Reason: ERROR: Cannot override read-only parameter: testParameter in goal: test:dumpParameter

In Maven 3.0.2, the @readonly seems to have no effect:

[INFO] --- test-plugin:0.0.1-SNAPSHOT:dumpParameter (test-exec) @ test-project ---
testParameter: readonly parameter configured in pom

You can reproduce the behaviour with the attached example project. Log outputs for Maven 2.2.1 and 3.0.2 are also attached.


Affects: 3.0-alpha-1, 3.0.2

Attachments:

Issue Links:

  • MJAR-264 finalName property can be set and is not immutable
    ("fixes")

  • MNG-5463 warn if maven-site-plugin's reportPlugins is configured in POM
    ("fixes")

  • MNG-5440 default-value on mojo parameter of type collection or array effectively make parameter read-only

  • MNG-5222 Maven 3 no longer logs warnings about deprecated plugin parameters.

  • MNG-7464 Warn about using read-only parameters for Mojo in configuration

  • MNG-5476 [REGRESSION] @required parameter not being enforced for arrays

Remote Links:

5 votes, 12 watchers

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority:majorMajor loss of function

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions