You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Mark Hobson <ma...@gmail.com> on 2006/11/10 14:03:06 UTC
Re: MavenProjectBuilder injection in a Mojo
On 10/11/06, Sebastien Brunot <sb...@ilog.fr> wrote:
> what is the expression to use for injection of an
> org.apache.maven.project.DefaultMavenProjectBuilder instance as the
> value of a pojo parameter:
Use:
/**
* @parameter expression="${component.org.apache.maven.project.MavenProjectBuilder}"
* @required
* @readonly
*/
private MavenProjectBuilder projectBuilder;
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: MavenProjectBuilder injection in a Mojo
Posted by franz see <fr...@gmail.com>.
Good day to you, Mark,
Nice. Thanks for the link :-) Hmm..maybe I should try digging up plexus in
the future to understan that better :-)
Cheers,
Franz
Mark Hobson wrote:
>
> On 10/11/06, franz see <fr...@gmail.com> wrote:
>> Good day to you, Mark,
>>
>> Curious, which docs are you referring to?
>
> I was looking at:
>
> http://maven.apache.org/developers/mojo-api-specification.html#The
> Descriptor and Annotations
>
> See the third table in that section, the @component annotation:
>
> "Similar to @parameter
> expression="${component.yourpackage.YourComponentClass}""
>
>> AFAIK, @components and @parameter take their values from different
>> "sources".
>>
>> "@component" mojo parameters are injected values which comes from the
>> component.xml (or some other plexus component configuration).
>>
>> while
>>
>> "@parameter" mojo paramaters are injected values which comes from the
>> properites.
>>
>> Correct me if im wrong though. I have limited knowledge with Plexus.
>
> Sounds right if they do indeed come from different sources, although
> which components get put into the expression properties? Maybe a dev
> could advise when the different syntaxes should be used.
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/MavenProjectBuilder-injection-in-a-Mojo-tf2607549s177.html#a7288558
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: MavenProjectBuilder injection in a Mojo
Posted by Mark Hobson <ma...@gmail.com>.
On 10/11/06, franz see <fr...@gmail.com> wrote:
> Good day to you, Mark,
>
> Curious, which docs are you referring to?
I was looking at:
http://maven.apache.org/developers/mojo-api-specification.html#The
Descriptor and Annotations
See the third table in that section, the @component annotation:
"Similar to @parameter expression="${component.yourpackage.YourComponentClass}""
> AFAIK, @components and @parameter take their values from different
> "sources".
>
> "@component" mojo parameters are injected values which comes from the
> component.xml (or some other plexus component configuration).
>
> while
>
> "@parameter" mojo paramaters are injected values which comes from the
> properites.
>
> Correct me if im wrong though. I have limited knowledge with Plexus.
Sounds right if they do indeed come from different sources, although
which components get put into the expression properties? Maybe a dev
could advise when the different syntaxes should be used.
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: MavenProjectBuilder injection in a Mojo
Posted by franz see <fr...@gmail.com>.
Good day to you, Mark,
Curious, which docs are you referring to?
AFAIK, @components and @parameter take their values from different
"sources".
"@component" mojo parameters are injected values which comes from the
component.xml (or some other plexus component configuration).
while
"@parameter" mojo paramaters are injected values which comes from the
properites.
Correct me if im wrong though. I have limited knowledge with Plexus.
Thanks,
Franz
Mark Hobson wrote:
>
> On 10/11/06, Sebastien Brunot <sb...@ilog.fr> wrote:
>> I tried it the first time but it throws an exception and indicates it
>> can't find org.apache.maven.project.MavenProjectBuilder in "the
>> component repository".
>>
>> Using @component instead of @parameters raises no errors. I don't know
>> if it do the job yet...
>
> Strange, the docs seem to imply they are equivalent..?
>
> Mark
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>
>
--
View this message in context: http://www.nabble.com/MavenProjectBuilder-injection-in-a-Mojo-tf2607549s177.html#a7277455
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
Re: MavenProjectBuilder injection in a Mojo
Posted by Mark Hobson <ma...@gmail.com>.
On 10/11/06, Sebastien Brunot <sb...@ilog.fr> wrote:
> I tried it the first time but it throws an exception and indicates it
> can't find org.apache.maven.project.MavenProjectBuilder in "the
> component repository".
>
> Using @component instead of @parameters raises no errors. I don't know
> if it do the job yet...
Strange, the docs seem to imply they are equivalent..?
Mark
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org
RE: MavenProjectBuilder injection in a Mojo
Posted by Sebastien Brunot <sb...@ilog.fr>.
I tried it the first time but it throws an exception and indicates it
can't find org.apache.maven.project.MavenProjectBuilder in "the
component repository".
Using @component instead of @parameters raises no errors. I don't know
if it do the job yet...
Sebastien
-----Original Message-----
From: Mark Hobson [mailto:markhobson@gmail.com]
Sent: Friday, November 10, 2006 2:03 PM
To: Maven Users List
Subject: Re: MavenProjectBuilder injection in a Mojo
On 10/11/06, Sebastien Brunot <sb...@ilog.fr> wrote:
> what is the expression to use for injection of an
> org.apache.maven.project.DefaultMavenProjectBuilder instance as the
> value of a pojo parameter:
Use:
/**
* @parameter
expression="${component.org.apache.maven.project.MavenProjectBuilder}"
* @required
* @readonly
*/
private MavenProjectBuilder projectBuilder;
Mark
---------------------------------------------------------------------
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