You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Kristian Rosenvold <kr...@gmail.com> on 2010/12/29 11:50:31 UTC

Surefire/Failsafe plugin code duplication

The surefire/failsafe plugins share a common module "surefire-common",
with an AbstractSurefireMojo and an interface that the specific
implementations need to implement (Surefire/Failsafe).

We had this discussion earlier, and because the mojo
annotations have to be in the same jar file as the plugin itself
all the @ annotations are duplicated across the two plugins.

There is a *lot* of javadoc and properties duplicated at the moment, and
unless someone has a better solution I'd be inclined to move all
the common ones to the base-class and shade the base class into the
jar files for both plugins.

WDYT ?

Kristian



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


Re: Surefire/Failsafe plugin code duplication

Posted by Brett Porter <br...@apache.org>.
On 29/12/2010, at 10:49 PM, Kristian Rosenvold wrote:

>> Why don't we just fix maven-plugin-plugin, or switch to annotations...
>> Anything else is just a stop gap
> 
> Hmm. Yes. Is there an issue for this and/or some good reason why this 
> hasn't been done ?
> 
> I also see that the significant bit (extracting documentation/attributes
> to base class), actually is the same in both cases, and shade vs
> plugin-plugin will only be a matter of a couple of lines in a pom.
> 
> Any takers for fixing the plugin-plugin ? I have about 50 other issues I
> want to fix in surefire before doing that.

Have you tried using this?

http://www.ops4j.org/projects/pax/construct/maven-inherit-plugin/

That might save implementing the same thing in plugin-plugin (though having the facility natively would be a good thing too...)

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter





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


Re: Surefire/Failsafe plugin code duplication

Posted by Kristian Rosenvold <kr...@gmail.com>.
> Why don't we just fix maven-plugin-plugin, or switch to annotations...
> Anything else is just a stop gap

Hmm. Yes. Is there an issue for this and/or some good reason why this 
hasn't been done ?

I also see that the significant bit (extracting documentation/attributes
to base class), actually is the same in both cases, and shade vs
plugin-plugin will only be a matter of a couple of lines in a pom.

Any takers for fixing the plugin-plugin ? I have about 50 other issues I
want to fix in surefire before doing that.

Kristian 


on., 29.12.2010 kl. 11.19 +0000, skrev Stephen Connolly:
> Why don't we just fix maven-plugin-plugin, or switch to annotations...
> Anything else is just a stop gap
> 
> - Stephen
> 
> ---
> Sent from my Android phone, so random spelling mistakes, random nonsense
> words and other nonsense are a direct result of using swype to type on the
> screen
> On 29 Dec 2010 10:51, "Kristian Rosenvold" <kr...@gmail.com>
> wrote:
> > The surefire/failsafe plugins share a common module "surefire-common",
> > with an AbstractSurefireMojo and an interface that the specific
> > implementations need to implement (Surefire/Failsafe).
> >
> > We had this discussion earlier, and because the mojo
> > annotations have to be in the same jar file as the plugin itself
> > all the @ annotations are duplicated across the two plugins.
> >
> > There is a *lot* of javadoc and properties duplicated at the moment, and
> > unless someone has a better solution I'd be inclined to move all
> > the common ones to the base-class and shade the base class into the
> > jar files for both plugins.
> >
> > WDYT ?
> >
> > Kristian
> >
> >
> >
> > ---------------------------------------------------------------------
> > 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: Surefire/Failsafe plugin code duplication

Posted by Stephen Connolly <st...@gmail.com>.
Why don't we just fix maven-plugin-plugin, or switch to annotations...
Anything else is just a stop gap

- Stephen

---
Sent from my Android phone, so random spelling mistakes, random nonsense
words and other nonsense are a direct result of using swype to type on the
screen
On 29 Dec 2010 10:51, "Kristian Rosenvold" <kr...@gmail.com>
wrote:
> The surefire/failsafe plugins share a common module "surefire-common",
> with an AbstractSurefireMojo and an interface that the specific
> implementations need to implement (Surefire/Failsafe).
>
> We had this discussion earlier, and because the mojo
> annotations have to be in the same jar file as the plugin itself
> all the @ annotations are duplicated across the two plugins.
>
> There is a *lot* of javadoc and properties duplicated at the moment, and
> unless someone has a better solution I'd be inclined to move all
> the common ones to the base-class and shade the base class into the
> jar files for both plugins.
>
> WDYT ?
>
> Kristian
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>