You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Manfred Moser <ma...@mosabuam.com> on 2012/08/18 00:45:05 UTC

Re: In plugin dev, how do you spec the containing and child elements for multi-valued param?

the child element gets its name automatically and it is derived off the
collection name. And yes.. afaik it just removes the s.

So it wont work for things like

<mice>
 <mouse></mouse>
</mice>

;-)


On Fri, August 17, 2012 3:29 pm, Anders Hammar wrote:
> I *think* it doesn't matter what you call the child element. But I
> could be wrong.
>
> /Anders
>
> On Sat, Aug 18, 2012 at 12:15 AM, KARR, DAVID <dk...@att.com> wrote:
>> I'm reading the "Maven Complete Reference" doc from Sonatype.  In the
>> section on "Multi-valued Mojo Parameters", it has the example of an
>> "excludes" property, where you specify an "excludes" container element
>> with child "exclude" elements.  What I don't understand is how it knows
>> to expect the "exclude" child element.  It's only specifying the name of
>> the container element, not the child element.  Is it really just
>> removing the last character from the container element name, to get the
>> expected name for the child element?
>>
>> ---------------------------------------------------------------------
>> 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: In plugin dev, how do you spec the containing and child elements for multi-valued param?

Posted by "KARR, DAVID" <dk...@att.com>.
> -----Original Message-----
> From: anders.g.hammar@gmail.com [mailto:anders.g.hammar@gmail.com] On
> Behalf Of Anders Hammar
> Sent: Friday, August 17, 2012 3:52 PM
> To: Maven Users List; manfred@mosabuam.com
> Subject: Re: In plugin dev, how do you spec the containing and child
> elements for multi-valued param?
> 
> Well, now you forced me look into this and I think was right. My tests
> shows it doesn't matter:
> 
>           <includes>
>             <anders>**/Bar.java</anders>
>             <anders>**/Bar*.java</anders>
>           </includes>
> 
> Works just fine. It could be that "anders" is some exception, but I
> doubt it...:-)

Cute.  It also doesn't appear to care if you name each child element with a different name (as long as the start & end tags match).  I just verified that with a test.

> On Sat, Aug 18, 2012 at 12:45 AM, Manfred Moser <ma...@mosabuam.com>
> wrote:
> > the child element gets its name automatically and it is derived off
> the
> > collection name. And yes.. afaik it just removes the s.
> >
> > So it wont work for things like
> >
> > <mice>
> >  <mouse></mouse>
> > </mice>
> >
> > ;-)
> >
> >
> > On Fri, August 17, 2012 3:29 pm, Anders Hammar wrote:
> >> I *think* it doesn't matter what you call the child element. But I
> >> could be wrong.
> >>
> >> /Anders
> >>
> >> On Sat, Aug 18, 2012 at 12:15 AM, KARR, DAVID <dk...@att.com>
> wrote:
> >>> I'm reading the "Maven Complete Reference" doc from Sonatype.  In
> the
> >>> section on "Multi-valued Mojo Parameters", it has the example of an
> >>> "excludes" property, where you specify an "excludes" container
> element
> >>> with child "exclude" elements.  What I don't understand is how it
> knows
> >>> to expect the "exclude" child element.  It's only specifying the
> name of
> >>> the container element, not the child element.  Is it really just
> >>> removing the last character from the container element name, to get
> the
> >>> expected name for the child element?
> >>>
> >>> -------------------------------------------------------------------
> --
> >>> 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
> >
> 
> ---------------------------------------------------------------------
> 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: In plugin dev, how do you spec the containing and child elements for multi-valued param?

Posted by Manfred Moser <ma...@mosabuam.com>.
Wow... thats news to me. Thanks for checking that out. Sure is weird eh
because I remember we had some problems with that in the android maven
plugin. Now I will have to check that out ;-)

On Fri, August 17, 2012 3:51 pm, Anders Hammar wrote:
> Well, now you forced me look into this and I think was right. My tests
> shows it doesn't matter:
>
>           <includes>
>             <anders>**/Bar.java</anders>
>             <anders>**/Bar*.java</anders>
>           </includes>
>
> Works just fine. It could be that "anders" is some exception, but I
> doubt it...:-)
>
> /Anders
>
> On Sat, Aug 18, 2012 at 12:45 AM, Manfred Moser <ma...@mosabuam.com>
> wrote:
>> the child element gets its name automatically and it is derived off the
>> collection name. And yes.. afaik it just removes the s.
>>
>> So it wont work for things like
>>
>> <mice>
>>  <mouse></mouse>
>> </mice>
>>
>> ;-)
>>
>>
>> On Fri, August 17, 2012 3:29 pm, Anders Hammar wrote:
>>> I *think* it doesn't matter what you call the child element. But I
>>> could be wrong.
>>>
>>> /Anders
>>>
>>> On Sat, Aug 18, 2012 at 12:15 AM, KARR, DAVID <dk...@att.com> wrote:
>>>> I'm reading the "Maven Complete Reference" doc from Sonatype.  In the
>>>> section on "Multi-valued Mojo Parameters", it has the example of an
>>>> "excludes" property, where you specify an "excludes" container element
>>>> with child "exclude" elements.  What I don't understand is how it
>>>> knows
>>>> to expect the "exclude" child element.  It's only specifying the name
>>>> of
>>>> the container element, not the child element.  Is it really just
>>>> removing the last character from the container element name, to get
>>>> the
>>>> expected name for the child element?
>>>>
>>>> ---------------------------------------------------------------------
>>>> 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
>>
>


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


Re: In plugin dev, how do you spec the containing and child elements for multi-valued param?

Posted by Anders Hammar <an...@hammar.net>.
Well, now you forced me look into this and I think was right. My tests
shows it doesn't matter:

          <includes>
            <anders>**/Bar.java</anders>
            <anders>**/Bar*.java</anders>
          </includes>

Works just fine. It could be that "anders" is some exception, but I
doubt it...:-)

/Anders

On Sat, Aug 18, 2012 at 12:45 AM, Manfred Moser <ma...@mosabuam.com> wrote:
> the child element gets its name automatically and it is derived off the
> collection name. And yes.. afaik it just removes the s.
>
> So it wont work for things like
>
> <mice>
>  <mouse></mouse>
> </mice>
>
> ;-)
>
>
> On Fri, August 17, 2012 3:29 pm, Anders Hammar wrote:
>> I *think* it doesn't matter what you call the child element. But I
>> could be wrong.
>>
>> /Anders
>>
>> On Sat, Aug 18, 2012 at 12:15 AM, KARR, DAVID <dk...@att.com> wrote:
>>> I'm reading the "Maven Complete Reference" doc from Sonatype.  In the
>>> section on "Multi-valued Mojo Parameters", it has the example of an
>>> "excludes" property, where you specify an "excludes" container element
>>> with child "exclude" elements.  What I don't understand is how it knows
>>> to expect the "exclude" child element.  It's only specifying the name of
>>> the container element, not the child element.  Is it really just
>>> removing the last character from the container element name, to get the
>>> expected name for the child element?
>>>
>>> ---------------------------------------------------------------------
>>> 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
>

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