-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
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:
- log-maven-2.2.1.txt (3.25 kB)
- log-maven-3.0.2.txt (5.28 kB)
- pom.xml (1.23 kB)
- readonlytest.zip (3.48 kB)
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