You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Prins <mc...@gmail.com> on 2016/02/01 15:39:42 UTC
integration testing a plugin when using a forked lifecycle
I'm trying (but failing) to reliably test a reporting plugin that
requires some code analysis to be done to produce report input. (code
analysis produces xml that is xsl transformed to html)
Sometimes my test works, sometimes it doesn't; the test just uses the
org.apache.maven.it.Verifier#verifyErrorFreeLog() method.
It seems that in some cases the xml has not been (completely) written to
disk yet causing a plugin execution failure during the transform; and
basically I'm looking to prevent that from happening.
Any pointers are welcome.
My report plugin is decared as follows:
@Mojo(name = "scss-lint-report",
defaultPhase = LifecyclePhase.SITE,
requiresDependencyResolution =
ResolutionScope.COMPILE_PLUS_RUNTIME, threadSafe = false)
@Execute(goal = "scss-lint")
public class SCSSLintReportMojo extends AbstractMavenReport {
// some code here to call a POJO that does
// XSL transform produced by the scss-lint goal to produce
// the HTML page
}
Source code at:
https://github.com/GeoDienstenCentrum/sass-maven-plugin/blob/master/src/main/java/nl/geodienstencentrum/maven/plugin/sass/report/SCSSLintReportMojo.java
The scss-lint mojo executes a JRuby script to produce a checkstyle-like
xml report
Source code at:
https://github.com/GeoDienstenCentrum/sass-maven-plugin/blob/master/src/main/java/nl/geodienstencentrum/maven/plugin/sass/report/SCSSLintMojo.java
Source code for the test is available at:
https://github.com/GeoDienstenCentrum/sass-maven-plugin/blob/master/src/test/java/nl/geodienstencentrum/maven/plugin/sass/BourbonReportIntegrationTest.java#L78
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org