You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Andrew Williams <an...@handyande.co.uk> on 2007/03/04 12:18:50 UTC

Maven's ArtifactMetadataSource's bad role-hint

Are there an objections, or reasons not to change the role-hint of  
MavenMetadataSource
in maven-project from "maven" to "default".

The latest plexus code (will shortly...) be more strict on hints and  
no longer allow components
to grab "whatever is configured", if a hint exists it must be  
honoured (but "default" is the, erm, default).
This means that if switched to "default" then plugins could continue  
to use it as now  without stating
which hint they want.

Andy

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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Andrew Williams <an...@handyande.co.uk>.
OK, that is done.
The change should not affect anything not using plexus-container- 
default < alpha-19-SNAPSHOT, which includes the core maven build atm,  
as I have not upgraded it. Want more testing done first :)

Andy

On 5 Mar 2007, at 01:56, Brett Porter wrote:

> I agree - it's going to enable plugins that reference it  
> successfully by role alone now to continue working.
>
> However, something may reference it directly by the maven role- 
> hint: I suggest a subclass with not modifications except the  
> alternate role-hint be made (and deprecated) for that case.
>
> - Brett
>
> On 04/03/2007, at 3:18 AM, Andrew Williams wrote:
>
>> Are there an objections, or reasons not to change the role-hint of  
>> MavenMetadataSource
>> in maven-project from "maven" to "default".
>>
>> The latest plexus code (will shortly...) be more strict on hints  
>> and no longer allow components
>> to grab "whatever is configured", if a hint exists it must be  
>> honoured (but "default" is the, erm, default).
>> This means that if switched to "default" then plugins could  
>> continue to use it as now  without stating
>> which hint they want.
>>
>> Andy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Brett Porter <br...@apache.org>.
Oh yeah, that works too :) I use CDC so much that I forget (but even  
then, you can merge in the extra def).

- Brett

On 04/03/2007, at 5:58 PM, Andrew Williams wrote:

> I had a more cunning plan...
> I can just advertise it over both hints in the components.xml
> (works in the tests I have done here :) ).
>
> Andy
>
> On 5 Mar 2007, at 01:56, Brett Porter wrote:
>
>> I agree - it's going to enable plugins that reference it  
>> successfully by role alone now to continue working.
>>
>> However, something may reference it directly by the maven role- 
>> hint: I suggest a subclass with not modifications except the  
>> alternate role-hint be made (and deprecated) for that case.
>>
>> - Brett
>>
>> On 04/03/2007, at 3:18 AM, Andrew Williams wrote:
>>
>>> Are there an objections, or reasons not to change the role-hint  
>>> of MavenMetadataSource
>>> in maven-project from "maven" to "default".
>>>
>>> The latest plexus code (will shortly...) be more strict on hints  
>>> and no longer allow components
>>> to grab "whatever is configured", if a hint exists it must be  
>>> honoured (but "default" is the, erm, default).
>>> This means that if switched to "default" then plugins could  
>>> continue to use it as now  without stating
>>> which hint they want.
>>>
>>> Andy
>>>
>>> -------------------------------------------------------------------- 
>>> -
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org


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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Andrew Williams <an...@handyande.co.uk>.
I had a more cunning plan...
I can just advertise it over both hints in the components.xml
(works in the tests I have done here :) ).

Andy

On 5 Mar 2007, at 01:56, Brett Porter wrote:

> I agree - it's going to enable plugins that reference it  
> successfully by role alone now to continue working.
>
> However, something may reference it directly by the maven role- 
> hint: I suggest a subclass with not modifications except the  
> alternate role-hint be made (and deprecated) for that case.
>
> - Brett
>
> On 04/03/2007, at 3:18 AM, Andrew Williams wrote:
>
>> Are there an objections, or reasons not to change the role-hint of  
>> MavenMetadataSource
>> in maven-project from "maven" to "default".
>>
>> The latest plexus code (will shortly...) be more strict on hints  
>> and no longer allow components
>> to grab "whatever is configured", if a hint exists it must be  
>> honoured (but "default" is the, erm, default).
>> This means that if switched to "default" then plugins could  
>> continue to use it as now  without stating
>> which hint they want.
>>
>> Andy
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Brett Porter <br...@apache.org>.
I agree - it's going to enable plugins that reference it successfully  
by role alone now to continue working.

However, something may reference it directly by the maven role-hint:  
I suggest a subclass with not modifications except the alternate role- 
hint be made (and deprecated) for that case.

- Brett

On 04/03/2007, at 3:18 AM, Andrew Williams wrote:

> Are there an objections, or reasons not to change the role-hint of  
> MavenMetadataSource
> in maven-project from "maven" to "default".
>
> The latest plexus code (will shortly...) be more strict on hints  
> and no longer allow components
> to grab "whatever is configured", if a hint exists it must be  
> honoured (but "default" is the, erm, default).
> This means that if switched to "default" then plugins could  
> continue to use it as now  without stating
> which hint they want.
>
> Andy
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org


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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Andrew Williams <an...@handyande.co.uk>.
Yes, it does add "default". I think Jason was referring to the use of  
CDC irrespective if whether hints were in or not.
After all, CDC does not need a hint at all, and the container will  
fill the blanks at runtime.

Andy

On 5 Mar 2007, at 08:56, Trygve Laugstøl wrote:

> Jason van Zyl wrote:
>> On 4 Mar 07, at 3:18 AM 4 Mar 07, Andrew Williams wrote:
>>> Are there an objections, or reasons not to change the role-hint  
>>> of MavenMetadataSource
>>> in maven-project from "maven" to "default".
>>>
>> I think that's fine, but we should also annotating all the plexus  
>> components and I think we can make this work with the bootstrap in  
>> much the same way we get modello to work. This will save much  
>> aggravation, it will then all be generated and adjustments to the  
>> CDC where required will make this much less painful.
>
> I'd rather not change all the source code. IMO the container should  
> just add "default" as the role hint. As far as I can this will be  
> required to keep compatibility with existing components.
>
> --
> Trygve
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Trygve Laugstøl <tr...@apache.org>.
Jason van Zyl wrote:
> 
> On 4 Mar 07, at 3:18 AM 4 Mar 07, Andrew Williams wrote:
> 
>> Are there an objections, or reasons not to change the role-hint of 
>> MavenMetadataSource
>> in maven-project from "maven" to "default".
>>
> 
> I think that's fine, but we should also annotating all the plexus 
> components and I think we can make this work with the bootstrap in much 
> the same way we get modello to work. This will save much aggravation, it 
> will then all be generated and adjustments to the CDC where required 
> will make this much less painful.

I'd rather not change all the source code. IMO the container should just 
add "default" as the role hint. As far as I can this will be required to 
keep compatibility with existing components.

--
Trygve

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


Re: Maven's ArtifactMetadataSource's bad role-hint

Posted by Jason van Zyl <ja...@maven.org>.
On 4 Mar 07, at 3:18 AM 4 Mar 07, Andrew Williams wrote:

> Are there an objections, or reasons not to change the role-hint of  
> MavenMetadataSource
> in maven-project from "maven" to "default".
>

I think that's fine, but we should also annotating all the plexus  
components and I think we can make this work with the bootstrap in  
much the same way we get modello to work. This will save much  
aggravation, it will then all be generated and adjustments to the CDC  
where required will make this much less painful.

> The latest plexus code (will shortly...) be more strict on hints  
> and no longer allow components
> to grab "whatever is configured", if a hint exists it must be  
> honoured (but "default" is the, erm, default).
> This means that if switched to "default" then plugins could  
> continue to use it as now  without stating
> which hint they want.

Cool.

Jason.

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


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