[Moving from m2e-users to m2e-dev as suggested there.]

I've been updating a code-generation plugin to use BuildContext 
(http://wiki.eclipse.org/M2E_compatible_maven_plugins) instead of having a 
separate m2e connector (http://wiki.eclipse.org/M2E_compatible_maven_plugins).

How do I write integration tests for this Maven plugin? Basically I want to be 
able to test things like:
* I modified a grammar file in Eclipse. Did the code generation run? (It should 
have.)
* I modified an unrelated Java file in Eclipse. Did the code generation run? 
(It shouldn't have.)

With the m2e connector approach, I had a Tycho project with a class that 
extended org.eclipse.m2e.tests.common.AbstractMavenProjectTestCase. But with 
the BuildContext approach, I'm no longer using Tycho, since I'm just building a 
regular Maven plugin. How do I test that my plugin integrates properly with m2e?

Steve

On Oct 16, 2012, at 2:23 PM, Matthew Piggott <[email protected]> wrote:

>  I haven't worked actively on the new stuff, but I think you should be able 
> to model a separate maven module on a test bundle of a plugin using the 
> connector approach.
> 
> It would probably be best to move the conversation to m2e-dev
> 
> On 16 October 2012 16:09, Steven Bethard <[email protected]> wrote:
> On Oct 16, 2012, at 2:05 PM, Matthew Piggott <[email protected]> wrote:
> > The tests expect to be run inside an Eclipse instance.  For examples you 
> > could look at the tests in m2e source, or one of the connectors in 
> > m2e-extras ( https://github.com/sonatype/m2eclipse-extras/ ).
> 
> Yeah, the problem is that those are all based off of the m2e-connector 
> approach (http://wiki.eclipse.org/M2E/Extension_Development), not the new 
> BuildContext approach (http://wiki.eclipse.org/M2E_compatible_maven_plugins).
> 
> I already have a working m2e-connector approach based off the 
> m2eclipse-extras examples. I was just hoping to migrate to the BuildContext 
> approach because then there's only the Maven plugin to maintain, not both a 
> Maven plugin and an Eclipse plugin.
> 
> Steve

_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users

Reply via email to