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-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to