Hi Jesse,

> It would be best if plugins have some intelligence that they really
> ought not to operate on particular types of POMs, however until that
> day arrives...

well, Maven plugins don't have be smart enough to detect the kind of
packaging used. In fact, the more I think about it, the more I come to the
conclusion that making a plugin's behavior depend on the project's
packaging is a bad idea; this would turn the project's packaging into a
(non-obvious) flag. 

What would solve the problem nicely, though, is better communication
between the maven-surefire-plugin and the maven-surefire-report-plugin: All
that is required is for the former to generate its surefire-reports even if
no unit tests were found. Then the maven-surefire-report-plugin could
decide, based on the presence or absence of the surefire-reports whether to
add its "Surefire Report" or not. (When the packaging is "pom"
surefire:test is not bound to the lifecycle; no surefire-reports and thus
no "Surefire Report" will be generated.)

> I define a property like maven.surefire.skip to be true
> in the parent pom, and then false in the leaf nodes. A corresponding
> reference to this property must be placed into the super/aggregator
> POM's plugin configuration sections (both in pluginManagement and also
> reporting) for the skip configuration option. We do this for all of
> our report plugins, but I find it most useful for PMD, Checkstyle,
> Javadoc, and GWT's SOYC.

Thanks. That sounds like a good workaround in the meantime.

Best wishes,

Andreas Sewe

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to