maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kenney Westerhof <>
Subject Re: Plugin testing (WAS: MNG-2571 - weird exception using the embedder)
Date Wed, 04 Oct 2006 07:33:19 GMT

Vincent Siveton wrote:
> Hi Kenney and others,
> Background:
> I added more tests for the antlr plugin. One of them is to call "mvn
> site" to generate reports. Because I was unable to play with
> maven-embedder and to specify the correct classloader for the archive
> and it's dependencies (doxia classes problems!), I decided to call
> directly maven in the command line. I am not plainly satisfied of this
> approach and I worked on it yesterday after Stephane's thread.
> So, Kenney told us about maven-it-plugin (I was not aware with it). I
> defined it to call it\pom.xml in integration-test phase. This pom.xml
> has in the <reporting/> section
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-antlr-plugin</artifactId>
>        <version>2.0-beta-2-SNAPSHOT</version>
>        ...
>      </plugin>
> If this plugin is not deployed first in the local repository, tests fail...

Hm, could be a regression of

I think that's why the invoker plugin was created - it uses some staging mechanism to
deploy the artifact, backing up what's already there, and undeploying later, I think.

I'm still trying to figure out what the invoker plugin does, and if it should
replace the it plugin, or if they should be merged. I think we need to combine efforts;
first there was no embedder and code from the it plugin was moved to the embedder,
the it plugin updated to use the embedder. Now there's the invoker plugin that
(I think) has the same purpose as the it plugin..

Btw I noticed that the invoker plugin is rather slow, when running the integration
tests for the assembly plugin so it might take another approach (Runtime.exec mvn maybe?),
but I haven't looked at the code too closely yet.. :)

> To run it sucessfully, I installed in pre-integration-test phase a new
> IT artifact of maven-antlr-plugin with version 2.0-beta-2-it-SNAPSHOT.
> Basically, it is maven-antlr-plugin-2.0-beta-2-SNAPSHOT.jar deployed
> as maven-antlr-plugin-2.0-beta-2-it-SNAPSHOT.jar [1]
> In the it\pom.xml [2], I now call
>      <plugin>
>        <groupId>org.apache.maven.plugins</groupId>
>        <artifactId>maven-antlr-plugin</artifactId>
>        <version>2.0-beta-2-it-SNAPSHOT</version> <<<< IT-SNAPSHOT
>        ...
>      </plugin>
> All works a treat now and I could process more tests in the
> post-integration-test phase :o)

Great ;)

> My question is: Is there another way to test a current plugin version
> with new mojos?

If by 'current' you mean the one being built, I think the issue I mentioned
above answers this question. I'd rather see MNG-870 fixed (again) then to use some
staging mechanism, which seems less stable and might only work for a single plugin
artifact, but I'm not sure..

-- Kenney
> Thanks,
> Vincent
> [1]
> [2]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message