maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Raynsford <org.apache.maven.u...@io7m.com>
Subject Re: Writing own plugin: The parameter annotation - does it work?
Date Mon, 16 Apr 2018 09:20:39 GMT
On 2018-04-16T09:26:08 +0200
<g.hohl@aurenz.de> wrote:
>
> Until then proper Maven Plug-in testing is not possible using JUnit - especially not
if it is in the IDE (Eclipse+M2E) and not during the Maven build.
> 

I came to the same conclusion (at least with the plain testing
harness). I switched to takari-plugin-testing, which seems to have been
written at least in part as a reaction to the fact that nothing else
worked properly.

I have a very small project that can serve as an example of how to use
it:

  https://github.com/io7m/minisite

Take a look at the com.io7m.minisite.tests module. Primarily the
MinSiteMojoTest class, and the takari plugin execution in the tests
module pom. I can attest that it does work from inside the IDE, but you
may need to run an initial build to run the plugin's testProperties
goal (Eclipse & M2E may be able to do this for you these days, I'm not
sure).

-- 
Mark Raynsford | http://www.io7m.com


Mime
View raw message