[
https://issues.apache.org/jira/browse/MNG-5001?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17112878#comment-17112878
]
Herve Boutemy commented on MNG-5001:
------------------------------------
using this feature in the wild, I went into an issue when building our website:
{noformat}[INFO] --------------------< org.apache.maven:maven-site
>---------------------
[INFO] Building Apache Maven Site 1.0
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources
(copy-filtered-resources) @ maven-site ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO]
[INFO] --- maven-site-plugin:3.9.0:site (default-site) @ maven-site ---
[INFO] configuring report plugin
org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0
[ERROR] Invalid plugin configuration: Cannot override read-only parameter:
'inputEncoding' in goal 'index'
[ERROR] Invalid plugin configuration: Cannot override read-only parameter:
'outputEncoding' in goal 'index'
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.210 s
[INFO] Finished at: 2020-05-21T09:42:26+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.9.0:site (default-site) on project
maven-site: failed to get report for
org.apache.maven.plugins:maven-project-info-reports-plugin: The parameters
'inputEncoding', 'outputEncoding' for goal
org.apache.maven.plugins:maven-project-info-reports-plugin:3.0.0:index are
missing, read-only or invalid -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal
org.apache.maven.plugins:maven-site-plugin:3.9.0:site (default-site) on project
maven-site: failed to get report for
org.apache.maven.plugins:maven-project-info-reports-plugin
[...]
{noformat}
I still don't know how these parameters are found as overridden from default...
> @readonly Mojo parameter annotation doesn't work any more
> ---------------------------------------------------------
>
> Key: MNG-5001
> URL: https://issues.apache.org/jira/browse/MNG-5001
> Project: Maven
> Issue Type: Bug
> Components: Plugin API
> Affects Versions: 3.0-alpha-1, 3.0.2
> Reporter: Jochen Ehret
> Assignee: Sylwester Lachiewicz
> Priority: Major
> Fix For: 3.7.0-candidate
>
> Attachments: log-maven-2.2.1.txt, log-maven-3.0.2.txt, pom.xml,
> readonlytest.zip
>
> Time Spent: 10m
> Remaining Estimate: 0h
>
> 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:
> {noformat}[INFO] Error configuring: test:test-plugin. Reason: ERROR: Cannot
> override read-only parameter: testParameter in goal:
> test:dumpParameter{noformat}
> In Maven 3.0.2, the @readonly seems to have no effect:
> {noformat}[INFO] --- test-plugin:0.0.1-SNAPSHOT:dumpParameter (test-exec) @
> test-project ---
> testParameter: readonly parameter configured in pom{noformat}
> You can reproduce the behaviour with the attached example project. Log
> outputs for Maven 2.2.1 and 3.0.2 are also attached.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)