Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [m2e-users] Testing plugins under m2e

There is no decent incementalbuild framework for maven (and, by
extension, m2e) right now. 

The old plexus BuildContext is incomplete, it does not clean obsolete
output files in some cases and there is no way to write incremental
build behaviour unit tests. You should be able to write integration
tests, however. I personally use takari plugin testing harness [1], but
the old apache maven harness may work too.

The newer takari incrementalbuild library [2] is more complete, but it
is very difficult to use correctly. It does provide incremental
behaviour for both command line build and eclipse and there is support
for writing unit tests. There is a small standalone project that shows
how to use the library [3], which includes couple simple tests.

[1] https://github.com/takari/takari-plugin-testing-project
[2] https://github.com/takari/io.takari.incrementalbuild
[3] https://github.com/ifedorenko/incrementalbuild-tutorial

-- 
Regards,
Igor

On Mon, Oct 10, 2016, at 03:56 PM, Mike Samuel wrote:
> I was looking at
> http://www.eclipse.org/m2e/documentation/m2e-extension-development.html
> trying to figure out how to test M2E integration for my maven plugin.
> 
> All the links under "Testing m2e/antlr code generation support" are
> dead but I found
> https://github.com/tesla/m2eclipse-antlr/blob/master/org.sonatype.m2e.antlr.tests/src/org/sonatype/m2e/antlr/tests/AntlrGenerationTest.java
> 
> That refers to class AbstractMavenProjectTestCase
> which seems to be defined in
> https://github.com/tesla/m2e-core-tests/blob/master/pom.xml but I'm
> having a hard time tracking down artifacts that provide that class in
> maven central.
> 
> Any idea what dependencies I need?
> 
> Is there a better test case to use as a template for tests that do a
> build, change a file or files, and then observe the results of an
> incremental build with a BuildContext similar to that provided by m2e?
> _______________________________________________
> m2e-users mailing list
> m2e-users@xxxxxxxxxxx
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/m2e-users


Back to the top