maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Siveton" <vincent.sive...@gmail.com>
Subject Re: Plugin testing (WAS: MNG-2571 - weird exception using the embedder)
Date Wed, 04 Oct 2006 12:10:16 GMT
Thanks Kenney, I reopen it.

My understanding is that we have several artifacts to test plugin/component.
- maven-plugin-testing-harness: Mojo unit testing in test phase
(deployed on snapshot-repository)
- maven-it-plugin: Integration test plugin for integration-test phase
(not deployed yet)
- maven-plugin-test-plugin: staging/unstaging plugin into local
repository for pre/post-integration-test (not deployed yet)

Another one is maven-invoker, a wrapper to invoke maven (not deployed yet)

Do I miss another test artifact? :D
If not, I will create "plugin developers centre" on the website, as
Brett suggested in the past.

Cheers,

Vincent

2006/10/4, Kenney Westerhof <kenney@apache.org>:
>
>
> 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 http://jira.codehaus.org/browse/MNG-870.
>
> 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] http://people.apache.org/~vsiveton/plugin-testing/pom.xml
> > [2] http://people.apache.org/~vsiveton/plugin-testing/it/pom.xml
> >
> > ---------------------------------------------------------------------
> > 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


Mime
View raw message