Skip to content

[MPLUGIN-419] Allow @Parameter on setters methods #726

@jira-importer

Description

@jira-importer

Slawomir Jaranowski opened MPLUGIN-419 and commented

We needn't filed for Mojo parameters.

When setters method exist it is called first by Maven.

We can declare Mojo as:

@Mojo( name = "my-mojo" )
public class MyMojo extends AbstractMojo
{
    @Parameter
    private String param;

    public void execute()
    {
    }
}

In some case will be useful to have possibility to declare as:

@Mojo( name = "my-mojo" )
public class MyMojo extends AbstractMojo
{
    @Parameter
    public void setParam(String param)
    {
        // do something with param
    }

    public void execute()
    {
    }
}

eg, useful:

  • normalization
  • validation
  • split one input value to more items, the same or other type

Issue Links:

  • MPLUGIN-438 Parameter description should be taken from annotated item

Remote Links:

Metadata

Metadata

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions