You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Andreas Sewe <se...@st.informatik.tu-darmstadt.de> on 2009/06/18 12:38:27 UTC

Augmenting from parent POM

Hi,

is there any way to *augment* or selectively override some <developers>
entries inherited from the parent POM? In particular, I would really
like to keep all contact information (<name>, <email>, <organization>,
<timezone> and the URLs) in one place only, namely the parent POM, and
then augment the <developer> entry with, e.g., the <role> (if any) in
that particular project. Can this be done? (It seems like <id> provides
a suitable mechanism to reference those entries to be selectively
overridden, but I was only able to replace the parent POM's <developers>
as a whole.)

Best wishes,

Andreas Sewe

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


Re: Augmenting from parent POM

Posted by Andreas Sewe <se...@st.informatik.tu-darmstadt.de>.
Stephen Connolly wrote:
> it might be
> 
> <developers combine.children='append'>
> </developers>

Yes, it is, but I couldn't get it to work. The parent POM's <developers>
get always overwritten, attribute or not. :-(

FWIW, m2eclipse (rightly) complains that combine.children isn't defined
in the POM's XML schema. I wonder why it was left out. (Which is too
bad, as I wanted to know whether the attribute supports values other
than "append".)

That being said, it only solves the simplest case, namely adding a
<developer> to the <developers> found in the parent POM. What I would
really like to do is keep all contact information in the parent POM and
merge it into the child POM's <developers> if a given developer is
referred to there. This is best illustrated by an example/wishlist.

Parent POM:

<developers>
  <developer>
    <id>sewe</id>
    <name>Andreas Sewe</name>
    <email>sewe@st.informatik.tu-darmstadt.de</email>
    <!-- Much more contact information -->
  </developer>
</developers>

Child POM:

<developers>
  <developer>
    <!-- Something along the following lines, selecting the developer
         for this (child) project -->
    <id>sewe</id>
    <roles>
      <role>Benevolent Dictator</role>
    </roles>
  </developer>
</developers>

Desired effective child POM:

<developers>
  <developer>
    <id>sewe</id>
    <name>Andreas Sewe</name>
    <email>sewe@st.informatik.tu-darmstadt.de</email>
    <!-- Much more contact information -->
    <roles>
      <role>Benevolent Dictator</role>
    </roles>
  </developer>
</developers>

It would be really nice if something like this where possible.

Granted, for most OSS projects inheriting the complete list of
<developers> in all child POMs is probably fine, but in an academic
environment, where attribution is everything, you want to be a little
bit more precise about who developed what. I just don't want to repeat
myself over and over again, but rather keep the contact information only
in one place: the parent POM.

I hope this clarifies things and my use case.

Andreas Sewe

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


Re: Augmenting from parent POM

Posted by Stephen Connolly <st...@gmail.com>.
it might be

<developers combine.children='append'>
</developers>

2009/6/18 Stephen Connolly <st...@gmail.com>:
> there is a "magic" attribute that you add the the <developers> tag...
> not sure what it is called... I think it's
>
> <developers appendChildren="true">
>
> but I think you'll have to google for the exact attribute name
>
> 2009/6/18 Andreas Sewe <se...@st.informatik.tu-darmstadt.de>:
>> Hi,
>>
>> is there any way to *augment* or selectively override some <developers>
>> entries inherited from the parent POM? In particular, I would really
>> like to keep all contact information (<name>, <email>, <organization>,
>> <timezone> and the URLs) in one place only, namely the parent POM, and
>> then augment the <developer> entry with, e.g., the <role> (if any) in
>> that particular project. Can this be done? (It seems like <id> provides
>> a suitable mechanism to reference those entries to be selectively
>> overridden, but I was only able to replace the parent POM's <developers>
>> as a whole.)
>>
>> Best wishes,
>>
>> Andreas Sewe
>>
>> ---------------------------------------------------------------------
>> 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: Augmenting from parent POM

Posted by Stephen Connolly <st...@gmail.com>.
there is a "magic" attribute that you add the the <developers> tag...
not sure what it is called... I think it's

<developers appendChildren="true">

but I think you'll have to google for the exact attribute name

2009/6/18 Andreas Sewe <se...@st.informatik.tu-darmstadt.de>:
> Hi,
>
> is there any way to *augment* or selectively override some <developers>
> entries inherited from the parent POM? In particular, I would really
> like to keep all contact information (<name>, <email>, <organization>,
> <timezone> and the URLs) in one place only, namely the parent POM, and
> then augment the <developer> entry with, e.g., the <role> (if any) in
> that particular project. Can this be done? (It seems like <id> provides
> a suitable mechanism to reference those entries to be selectively
> overridden, but I was only able to replace the parent POM's <developers>
> as a whole.)
>
> Best wishes,
>
> Andreas Sewe
>
> ---------------------------------------------------------------------
> 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