Its true, I did a debug in maven code and found that it is not supported.

So the solution was to call the bean setters from the setters of the mojo.

A good thing is that at least the mojo.xml being generated by takari
lifecicle plugin is considering them and it is also being read by m2e at
eclipse IDE, so I can select the inner parameters using crtrl+space.

anyway, thank you Anton and Karl...

Cristiano

2015-05-23 5:33 GMT-03:00 Anton Tanasenko <[email protected]>:

> Hi,
>
> @Parameter annotations are only supported in the mojo itself, not in any
> nested parameter beans.
>
> 2015-05-23 11:22 GMT+03:00 Karl Heinz Marbaise <[email protected]>:
>
> > Hi,
> >
> > On 5/23/15 12:32 AM, Cristiano Gavião wrote:
> >
> >> Hello,
> >>
> >> I'm facing a problem and would like a help to figure it out.
> >>
> >> I'm developing a mojo (maven 3.3) that contains the following:
> >>
> >> @Parameter(required=true)
> >>      private ManifestConfiguration manifest;
> >>
> >> and in the bean (in the same package) I have:
> >>
> >> @Parameter(defaultValue = "${project.name}")
> >>      private String name;
> >>
> >> What is happen is that the default value is not being injected into the
> >> name field, when executing the mojo I'm getting null for it.
> >>
> >
> > has the tag name being set in the project where you executing the plugin?
> >
> >
> > <project>
> >  ..
> >  <name>WhatEver</name>
> >  ..
> > </project>
> >
> >
> >> The strange is that for other values that I've set in a test POM they
> are
> >> being injected properly.
> >>
> >> Is this supposed to work, right?
> >>
> >
> > May be you can show the code or having it on github or bitbuchet so we
> can
> > take a look...
> >
> >
> >> thanks,
> >>
> >> Cristiano
> >>
> >>
> > Kind regards
> > Karl Heinz Marbaise
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [email protected]
> > For additional commands, e-mail: [email protected]
> >
> >
>
>
> --
> Regards,
> Anton.
>



-- 
"Tudo vale a pena se a alma não é pequena..."

Reply via email to