You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Jesse Farinacci <ji...@gmail.com> on 2010/01/08 16:45:09 UTC
Re: Disabling Surefire Reports for aggregator projects (i.e., with
"pom" packaging)
Hi Andreas,
On Fri, Jan 8, 2010 at 10:09 AM, Andreas Sewe
<se...@st.informatik.tu-darmstadt.de> wrote:
>
> How can I disable these non-sensical reports for aggregator POMs while
> still benefitting from inheritance? (I don't want to configure the plugin
> manually in all my non-aggregator POMs.)
>
> Andreas Sewe
>
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... 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.
With this strategy I'm able to get a minimal amount of leaf-node
replication. I also think it makes my build process more flexible, as
an experienced person can -Dmaven.surefire.skip= on the command line.
-Jesse
--
There are 10 types of people in this world, those
that can read binary and those that can not.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Disabling Surefire Reports for aggregator projects (i.e., with "pom"
packaging)
Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Hi Paul,
> Don't let your anguish go unresolved! Log a ticket in JIRA to put your
> request on someone's radar.
I just noticed that this is already an open issue (since July 2008!):
<http://jira.codehaus.org/browse/SUREFIRE-505>. At any rate, I voted for
this issue and made the same comments regarding a possible solution that I
made in reply to Jesse's mail.
Best wishes,
Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Disabling Surefire Reports for aggregator projects (i.e., with
"pom" packaging)
Posted by Paul Benedict <pb...@apache.org>.
Don't let your anguish go unresolved! Log a ticket in JIRA to put your
request on someone's radar.
Paul
On Fri, Jan 8, 2010 at 9:45 AM, Jesse Farinacci <ji...@gmail.com> wrote:
> Hi Andreas,
>
> On Fri, Jan 8, 2010 at 10:09 AM, Andreas Sewe
> <se...@st.informatik.tu-darmstadt.de> wrote:
>>
>> How can I disable these non-sensical reports for aggregator POMs while
>> still benefitting from inheritance? (I don't want to configure the plugin
>> manually in all my non-aggregator POMs.)
>>
>> Andreas Sewe
>>
>
> 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... 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.
>
> With this strategy I'm able to get a minimal amount of leaf-node
> replication. I also think it makes my build process more flexible, as
> an experienced person can -Dmaven.surefire.skip= on the command line.
>
> -Jesse
>
> --
> There are 10 types of people in this world, those
> that can read binary and those that can not.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: Disabling Surefire Reports for aggregator projects (i.e., with "pom"
packaging)
Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
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: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org