You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Donszelmann Mark <ma...@gmail.com> on 2009/09/30 22:53:06 UTC

Writing Plugin Tests

Hi

is the Maven Plugin Harness the thing to use to write plugin tests, or  
is there something
newer / better around nowadays.

I looked in the Maven manual which has a chapter on writing Plugins,  
but not on writing tests
for it.

Regards
Mark Donszelmann


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


Re: Writing Plugin Tests

Posted by John Casey <jd...@commonjava.org>.
I've been using the invoker:install goal to do that. It's in the run-its 
profile of those two plugins...

Donszelmann Mark wrote:
> Hi John,
> 
> will this also allow me to publish the maven-plugin under test in a 
> separate local repo, not influenced by others...
> 
> Regards
> Mark
> 
> On Oct 1, 2009, at 3:17 PM, John Casey wrote:
> 
>> Many of the plugin integration tests are using the invoker plugin, but 
>> I've actually started converting these to use the maven-verifier + 
>> junit when I work on a plugin. I find the combination to be much 
>> easier to manage, since assertions and such all happen within the 
>> junit code, and you have more options when it comes to running 
>> multiple builds or running a build without a POM at all, if necessary. 
>> Incidentally, this is how the Maven core ITs run, and I've adapted the 
>> approach used in my conversions from that.
>>
>> If you want an example, I'd suggest looking at either the 
>> maven-remote-resources-plugin or maven-repository-plugin.
>>
>> -j
>>
>> Stephen Connolly wrote:
>>> in a lot of cases the invoker plugin is simpler
>>> Sent from my [rhymes with tryPod] ;-)
>>> On 30 Sep 2009, at 21:53, Donszelmann Mark 
>>> <ma...@gmail.com> wrote:
>>>> Hi
>>>>
>>>> is the Maven Plugin Harness the thing to use to write plugin tests, 
>>>> or is there something
>>>> newer / better around nowadays.
>>>>
>>>> I looked in the Maven manual which has a chapter on writing Plugins, 
>>>> but not on writing tests
>>>> for it.
>>>>
>>>> Regards
>>>> Mark Donszelmann
>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
> 
> 
> ---------------------------------------------------------------------
> 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: Writing Plugin Tests

Posted by Donszelmann Mark <ma...@gmail.com>.
Hi John,

will this also allow me to publish the maven-plugin under test in a  
separate local repo, not influenced by others...

Regards
Mark

On Oct 1, 2009, at 3:17 PM, John Casey wrote:

> Many of the plugin integration tests are using the invoker plugin,  
> but I've actually started converting these to use the maven-verifier  
> + junit when I work on a plugin. I find the combination to be much  
> easier to manage, since assertions and such all happen within the  
> junit code, and you have more options when it comes to running  
> multiple builds or running a build without a POM at all, if  
> necessary. Incidentally, this is how the Maven core ITs run, and  
> I've adapted the approach used in my conversions from that.
>
> If you want an example, I'd suggest looking at either the maven- 
> remote-resources-plugin or maven-repository-plugin.
>
> -j
>
> Stephen Connolly wrote:
>> in a lot of cases the invoker plugin is simpler
>> Sent from my [rhymes with tryPod] ;-)
>> On 30 Sep 2009, at 21:53, Donszelmann Mark <mark.donszelmann@gmail.com 
>> > wrote:
>>> Hi
>>>
>>> is the Maven Plugin Harness the thing to use to write plugin  
>>> tests, or is there something
>>> newer / better around nowadays.
>>>
>>> I looked in the Maven manual which has a chapter on writing  
>>> Plugins, but not on writing tests
>>> for it.
>>>
>>> Regards
>>> Mark Donszelmann
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>


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


Re: Writing Plugin Tests

Posted by John Casey <jd...@commonjava.org>.
Many of the plugin integration tests are using the invoker plugin, but 
I've actually started converting these to use the maven-verifier + junit 
when I work on a plugin. I find the combination to be much easier to 
manage, since assertions and such all happen within the junit code, and 
you have more options when it comes to running multiple builds or 
running a build without a POM at all, if necessary. Incidentally, this 
is how the Maven core ITs run, and I've adapted the approach used in my 
conversions from that.

If you want an example, I'd suggest looking at either the 
maven-remote-resources-plugin or maven-repository-plugin.

-j

Stephen Connolly wrote:
> in a lot of cases the invoker plugin is simpler
> 
> Sent from my [rhymes with tryPod] ;-)
> 
> On 30 Sep 2009, at 21:53, Donszelmann Mark <ma...@gmail.com> 
> wrote:
> 
>> Hi
>>
>> is the Maven Plugin Harness the thing to use to write plugin tests, or 
>> is there something
>> newer / better around nowadays.
>>
>> I looked in the Maven manual which has a chapter on writing Plugins, 
>> but not on writing tests
>> for it.
>>
>> Regards
>> Mark Donszelmann
>>
>>
>> ---------------------------------------------------------------------
>> 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: Writing Plugin Tests

Posted by Stephen Connolly <st...@gmail.com>.
in a lot of cases the invoker plugin is simpler

Sent from my [rhymes with tryPod] ;-)

On 30 Sep 2009, at 21:53, Donszelmann Mark  
<ma...@gmail.com> wrote:

> Hi
>
> is the Maven Plugin Harness the thing to use to write plugin tests,  
> or is there something
> newer / better around nowadays.
>
> I looked in the Maven manual which has a chapter on writing Plugins,  
> but not on writing tests
> for it.
>
> Regards
> Mark Donszelmann
>
>
> ---------------------------------------------------------------------
> 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