You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Benjamin Bentmann (JIRA)" <ji...@codehaus.org> on 2011/02/12 17:17:22 UTC

[jira] Closed: (MNG-5013) Allow to condense configuation of plugin parameter beans that commonly require only one value

     [ http://jira.codehaus.org/browse/MNG-5013?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Benjamin Bentmann closed MNG-5013.
----------------------------------

       Resolution: Fixed
    Fix Version/s: 3.0.3
         Assignee: Benjamin Bentmann

Done in [r1070102|http://svn.apache.org/viewvc?view=revision&revision=1070102].

The feature is generally only available on the discretion of the plugin author who needs to implement how the scalar value maps to the overall bean data. To do so, the bean class in question can be equipped with a method named {{set()}} like this:
{code:java}
public class Resource
{

    private File directory;

    public void set( File directory )
    {
        this.directory = directory;
    }

...
}
{code}

> Allow to condense configuation of plugin parameter beans that commonly require only one value
> ---------------------------------------------------------------------------------------------
>
>                 Key: MNG-5013
>                 URL: http://jira.codehaus.org/browse/MNG-5013
>             Project: Maven 2 & 3
>          Issue Type: Improvement
>          Components: Plugins and Lifecycle, POM
>    Affects Versions: 3.0.2
>            Reporter: Benjamin Bentmann
>            Assignee: Benjamin Bentmann
>            Priority: Minor
>             Fix For: 3.0.3
>
>
> Let's take this example configuration snippet:
> {code:xml}
> <resources>
>   <resource>
>     <directory>src/foo</directory>
>     <filtering>true</filtering>
>   </resource>
>   <resource>src/bar</resource>
> </resources>
> {code}
> Apparently, the last {{<resource>}} element is meant as a shorthand form for {{<resource><directory>src/bar</directory></resource>}}.
> Not only does support for this notation save users a few bits of (sometimes hated) XML but it also provides plugin authors with a smooth upgrade path say when a parameter was initially typed as {{File[]}} but later needs to be extended into {{Bean[]}}.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira