You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by 陈思淼 <ch...@gmail.com> on 2008/10/13 18:14:12 UTC

question about the pluxes components.xml?

 <component>
      <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
      <role-hint>war</role-hint>
      <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>

what's the role-hint meaning? can anybody give some document ion to
describe the components.xml?

Re: question about the pluxes components.xml?

Posted by Heinrich Nirschl <he...@gmail.com>.
2008/10/13 陈思淼 <ch...@gmail.com>:
> I am better familiar with spring-framework, is the role-hint the same as the
> spring "bean id" which the container to locate the bean when needed, and the
> pluxes more specific becourse it group by interface type and use role-hint
> to describe eche one?
>

role and role-hint together more or less correspond to what spring
calls the bean id.

Re: question about the pluxes components.xml?

Posted by Simone Gianni <si...@apache.org>.
Hi 陈思淼,
yes, exactly, Spring is an IOC container , and it is an evolution of
previous ones like Avalon/Plexus. We could say that if you name all your
spring beans com.yourcompany.package.InterfaceName#hint you are doing
the same.

Simone

陈思淼 wrote:
> I am better familiar with spring-framework, is the role-hint the same as the
> spring "bean id" which the container to locate the bean when needed, and the
> pluxes more specific becourse it group by interface type and use role-hint
> to describe eche one?
>
> 2008/10/14 Simone Gianni <si...@apache.org>
>
>   
>> Hi 陈思淼,
>> in Avalon like IOC containers (like plexus), there are two concepts :
>> the role interface and the hint. Basically, you can have a
>> my.company.logging.Logger interface, and then in your system load more
>> than one class ("actor") implementing that interface (having the Logging
>> "role" ... in Avalon terminology) and configure each one with a
>> role-hint, for example "file", "console" etc.. Then, e component that
>> wants to log, can ask the container to obtain a Logger with role-hint
>> "file" if logging to a file is desired.
>>
>> For LifecycleMapping is the same, you can have more than one "actor"
>> having the rolw LifecycleMapping, each with its hint (jar, war, pom
>> etc..), when Maven needs to build a project, it uses the content of the
>> <packaging> element as the hint to obtain the correct LifecycleMapping.
>> If you need to add your own lifecycle (packaging), you will define a new
>> hint, and then use it in the <packaging> element of your POMs.
>>
>> Hope this helps,
>> Simone
>>
>> 陈思淼 wrote:
>>     
>>>  <component>
>>>       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
>>>       <role-hint>war</role-hint>
>>>
>>>       
>> <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
>>     
>>> what's the role-hint meaning? can anybody give some document ion to
>>> describe the components.xml?
>>>
>>>
>>>       
>> --
>> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
>> MALE human being programming a computer   http://www.simonegianni.it/
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
>> For additional commands, e-mail: users-help@maven.apache.org
>>
>>
>>     


-- 
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
MALE human being programming a computer   http://www.simonegianni.it/


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


Re: question about the pluxes components.xml?

Posted by 陈思淼 <ch...@gmail.com>.
I am better familiar with spring-framework, is the role-hint the same as the
spring "bean id" which the container to locate the bean when needed, and the
pluxes more specific becourse it group by interface type and use role-hint
to describe eche one?

2008/10/14 Simone Gianni <si...@apache.org>

> Hi 陈思淼,
> in Avalon like IOC containers (like plexus), there are two concepts :
> the role interface and the hint. Basically, you can have a
> my.company.logging.Logger interface, and then in your system load more
> than one class ("actor") implementing that interface (having the Logging
> "role" ... in Avalon terminology) and configure each one with a
> role-hint, for example "file", "console" etc.. Then, e component that
> wants to log, can ask the container to obtain a Logger with role-hint
> "file" if logging to a file is desired.
>
> For LifecycleMapping is the same, you can have more than one "actor"
> having the rolw LifecycleMapping, each with its hint (jar, war, pom
> etc..), when Maven needs to build a project, it uses the content of the
> <packaging> element as the hint to obtain the correct LifecycleMapping.
> If you need to add your own lifecycle (packaging), you will define a new
> hint, and then use it in the <packaging> element of your POMs.
>
> Hope this helps,
> Simone
>
> 陈思淼 wrote:
> >  <component>
> >       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
> >       <role-hint>war</role-hint>
> >
> <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
> >
> > what's the role-hint meaning? can anybody give some document ion to
> > describe the components.xml?
> >
> >
>
>
> --
> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
> MALE human being programming a computer   http://www.simonegianni.it/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: question about the pluxes components.xml?

Posted by Simone Gianni <si...@apache.org>.
Hi 陈思淼,
in Avalon like IOC containers (like plexus), there are two concepts :
the role interface and the hint. Basically, you can have a
my.company.logging.Logger interface, and then in your system load more
than one class ("actor") implementing that interface (having the Logging
"role" ... in Avalon terminology) and configure each one with a
role-hint, for example "file", "console" etc.. Then, e component that
wants to log, can ask the container to obtain a Logger with role-hint
"file" if logging to a file is desired.

For LifecycleMapping is the same, you can have more than one "actor"
having the rolw LifecycleMapping, each with its hint (jar, war, pom
etc..), when Maven needs to build a project, it uses the content of the
<packaging> element as the hint to obtain the correct LifecycleMapping.
If you need to add your own lifecycle (packaging), you will define a new
hint, and then use it in the <packaging> element of your POMs.

Hope this helps,
Simone

陈思淼 wrote:
>  <component>
>       <role>org.apache.maven.lifecycle.mapping.LifecycleMapping</role>
>       <role-hint>war</role-hint>
>       <implementation>org.apache.maven.lifecycle.mapping.DefaultLifecycleMapping</implementation>
>
> what's the role-hint meaning? can anybody give some document ion to
> describe the components.xml?
>
>   


-- 
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
MALE human being programming a computer   http://www.simonegianni.it/


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