You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Alexis Midon <al...@gmail.com> on 2006/08/30 19:21:32 UTC

Extending a plugin and parameter inheritance

Hi all,

I'm developping a custom plugin, its main features already are already
implemented by the antrun plugin, my only wish is to add an aggregator like
behaviour.
To do so my pojo extends the AntRunMojo, my mojo does nothing except adding
the @aggregator annotation.

Unfortunately when I package the jar, the generated plugin descriptor has no
parameters. So at runtime a NullPointerException occurs complaining that
AntRunMojo attributes are not set!

Does anybody know how to solve this problem?
Is there a neat way to extend an existing plugin?

Thanks for your help,

Alexis

Re: Extending a plugin and parameter inheritance

Posted by Brett Porter <br...@apache.org>.
This is a known issue. You cannot extend a class for which you do not  
have the source too, as the annotations are read from the source, not  
the binary.

- Brett

On 31/08/2006, at 3:21 AM, Alexis Midon wrote:

> Hi all,
>
> I'm developping a custom plugin, its main features already are already
> implemented by the antrun plugin, my only wish is to add an  
> aggregator like
> behaviour.
> To do so my pojo extends the AntRunMojo, my mojo does nothing  
> except adding
> the @aggregator annotation.
>
> Unfortunately when I package the jar, the generated plugin  
> descriptor has no
> parameters. So at runtime a NullPointerException occurs complaining  
> that
> AntRunMojo attributes are not set!
>
> Does anybody know how to solve this problem?
> Is there a neat way to extend an existing plugin?
>
> Thanks for your help,
>
> Alexis

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org