You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by sebb <se...@gmail.com> on 2011/09/10 15:51:28 UTC

reports inheritance - parent can disinherit, can child refuse to inherit?

[This mainly applies to the project-info-reports plugin]

The reporting/plugins/plugin entries support the <inherited> element;
if set to false, child projects don't inherit the plugin settings,
i.e. the parent can disinherit the child.

Is the reverse also possible, i.e. given a parent pom, can a child
reporting plugin refuse to inherit from its parent?

For example, if the parent and most children need the same set of
reports, but one child does not need some of the reports.

This does not appear to be possible except by defining the required
set of reports in each project, parent included.
The parent config has to disinherit the children, otherwise they will
all get the full set of reports.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: reports inheritance - parent can disinherit, can child refuse to inherit?

Posted by sebb <se...@gmail.com>.
On 10 September 2011 15:39, Hervé BOUTEMY <he...@free.fr> wrote:
> no, the child can override, that's all

Don't understand what you mean by that.

> see MNG-2807 for the same about CI management, or MNG-3124 for mailing lists
>
> there is an inheritance configuration pattern to find then apply on many
> elements of the pom.
> If you have an idea about something easyto understand from a user
> perspective...

The parent can currently do the following to prevent all inheritance

  <reporting>
    <plugins>
        <plugin>
           <groupId>org.apache.maven.plugins</groupId>
           <artifactId>maven-project-info-reports-plugin</artifactId>
           <inherited>false</inherited>
           <reportSets>

However, that does not allow some reports to apply to the parent only;
it is all or nothing.

Although the <inherited> element is also allowed within a reportSet,
that does not seem to prevent the reports from being generated in
Maven 2.2.1.
[seems to work in M303, provided that the <id> is omiitted or has the
value "default" (which is the default) ]

There ought to be a way for the parent to specify its own private
reports separately from the reports that should be inherited.

If the reportSet/<inherited> element worked properly, that would solve
the issue for the parent.

Being able to configure the parent to pass on some reports but not
others would be helpful in many cases, but equally, its children
should be able to refuse reports specified by the parent.

Perhaps the combine.children/combine.self configuration attribute
could be extended to reportSet?

S
P.S.
Unfortunately, the word "inherited" is ambiguous; in this case it
means "will it be inherited", rather than the usual spoken meaning as
in "the child inherited from its parent".  It would perhaps have been
clearer if the element was called "inheritable"; the child version
could then be called "inherit".
But I think that would be too confusing now.

> Regards,
>
> Hervé
>
> Le samedi 10 septembre 2011, sebb a écrit :
>> [This mainly applies to the project-info-reports plugin]
>>
>> The reporting/plugins/plugin entries support the <inherited> element;
>> if set to false, child projects don't inherit the plugin settings,
>> i.e. the parent can disinherit the child.
>>
>> Is the reverse also possible, i.e. given a parent pom, can a child
>> reporting plugin refuse to inherit from its parent?
>>
>> For example, if the parent and most children need the same set of
>> reports, but one child does not need some of the reports.
>>
>> This does not appear to be possible except by defining the required
>> set of reports in each project, parent included.
>> The parent config has to disinherit the children, otherwise they will
>> all get the full set of reports.
>>
>> ---------------------------------------------------------------------
>> 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
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: reports inheritance - parent can disinherit, can child refuse to inherit?

Posted by Hervé BOUTEMY <he...@free.fr>.
no, the child can override, that's all

see MNG-2807 for the same about CI management, or MNG-3124 for mailing lists

there is an inheritance configuration pattern to find then apply on many 
elements of the pom.
If you have an idea about something easyto understand from a user 
perspective...

Regards,

Hervé

Le samedi 10 septembre 2011, sebb a écrit :
> [This mainly applies to the project-info-reports plugin]
> 
> The reporting/plugins/plugin entries support the <inherited> element;
> if set to false, child projects don't inherit the plugin settings,
> i.e. the parent can disinherit the child.
> 
> Is the reverse also possible, i.e. given a parent pom, can a child
> reporting plugin refuse to inherit from its parent?
> 
> For example, if the parent and most children need the same set of
> reports, but one child does not need some of the reports.
> 
> This does not appear to be possible except by defining the required
> set of reports in each project, parent included.
> The parent config has to disinherit the children, otherwise they will
> all get the full set of reports.
> 
> ---------------------------------------------------------------------
> 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