You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jan Bartel <ja...@mortbay.com> on 2006/01/26 19:11:35 UTC

[m2] Plugin inheritance

I think the answer to this question is likely to be no,
but I thought I'd ask anyway.

If I have 2 plugins A and B, is there anyway that Mojos
in plugin B can inherit from the Mojos in plugin A
*including the annotations for the configuration parameters* ?

thanks in advance
Jan

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


Re: [m2] Plugin inheritance

Posted by Brett Porter <br...@apache.org>.
It's much easier than that - the information is recorded in
META-INF/maven/plugin.xml.

The stumbling point so far is whether we want to support that.

I think we need to decide between the current angle of "mojo is a
wrapper around specialised tools" and "mojo is a tool itself".

- Brett

John Casey wrote:
> will commons-attributes also do something similar to this? Just
> wondering out loud...
> 
> -j
> 
> Rafal Krzewski wrote:
>> Brett Porter wrote:
>>> no, sorry. The annotations are read from source files, not binaries.
>>
>> It's possible to post process .class files with BCEL or ASM and add
>> custom attributes to the classfile elements (fields, methods). AspectJ
>> does that for one example. At runtime these attributes may be accessed
>> reflectively by parsing the classfiles.
>> Maybe it's kind of an overkill, but it could be fun :-) No, I am not
>> volunteering :-)
>>
>> R.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

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


Re: [m2] Plugin inheritance

Posted by John Casey <jd...@yahoo.com>.
will commons-attributes also do something similar to this? Just 
wondering out loud...

-j

Rafal Krzewski wrote:
> Brett Porter wrote:
>> no, sorry. The annotations are read from source files, not binaries.
> 
> It's possible to post process .class files with BCEL or ASM and add 
> custom attributes to the classfile elements (fields, methods). AspectJ 
> does that for one example. At runtime these attributes may be accessed 
> reflectively by parsing the classfiles.
> Maybe it's kind of an overkill, but it could be fun :-) No, I am not 
> volunteering :-)
> 
> R.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 
> 

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


Re: [m2] Plugin inheritance

Posted by Rafal Krzewski <Ra...@caltha.pl>.
Brett Porter wrote:
> no, sorry. The annotations are read from source files, not binaries.

It's possible to post process .class files with BCEL or ASM and add 
custom attributes to the classfile elements (fields, methods). AspectJ 
does that for one example. At runtime these attributes may be accessed 
reflectively by parsing the classfiles.
Maybe it's kind of an overkill, but it could be fun :-) No, I am not 
volunteering :-)

R.

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


Re: [m2] Plugin inheritance

Posted by Brett Porter <br...@apache.org>.
no, sorry. The annotations are read from source files, not binaries.

- Brett

Jan Bartel wrote:
> I think the answer to this question is likely to be no,
> but I thought I'd ask anyway.
> 
> If I have 2 plugins A and B, is there anyway that Mojos
> in plugin B can inherit from the Mojos in plugin A
> *including the annotations for the configuration parameters* ?
> 
> thanks in advance
> Jan
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 

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