You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tobias Oberlies (JIRA)" <ji...@apache.org> on 2015/04/10 13:47:12 UTC
[jira] [Commented] (MNG-5800) Cannot unset Mojo parameter so that
the default applies when parameter is set in the parent POM
[ https://issues.apache.org/jira/browse/MNG-5800?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14489469#comment-14489469 ]
Tobias Oberlies commented on MNG-5800:
--------------------------------------
In the {{combine.self="override"}} case, I can see in the debug after {{PROJECT BUILD PLAN}}} that the configuration {{<param combine.self="override"></param>}} suppresses the default values that are normally printed there. So to fix this issue, there probably needs to be a fix in the logic that computes the combined xml.
With the current behaviour, I can see another issue in the code that converts the XML values and sets them on the Mojo: For a parameter of type {{SimpleDateFormat}} with a {{setParam(String)}} method, the field is set to a non-null value, but the setter is never called.
> Cannot unset Mojo parameter so that the default applies when parameter is set in the parent POM
> -----------------------------------------------------------------------------------------------
>
> Key: MNG-5800
> URL: https://issues.apache.org/jira/browse/MNG-5800
> Project: Maven
> Issue Type: Bug
> Components: POM
> Affects Versions: 3.2.2
> Reporter: Tobias Oberlies
> Priority: Minor
>
> In case a Mojo parameter is configured in a parent POM, it seems that there is not way to unset it in a child POM. With "unsetting" I mean provide a POM configuration so that the default value applies, without having to explicitly know the default value.
> Steps to reproduce:
> # For a Mojo parameter with a default value, set an explicit value in the parent POM
> # In the child POM, try to reset the parameter either with
> {noformat}
> <configuration>
> <param></param>
> </configuration>
> {noformat}
> or
> {noformat}
> <configuration>
> <param combine.self="override"></param>
> </configuration>
> {noformat}
> Expected result: The parameter {{param}} is set to its default value.
> Actual result: In the first case, the configuration from the parent POM still applies. In the second case, the configuration value is set to {{null}} for a {{String}} parameter.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)