Re: MavenProjectBuilder injection in a Mojo
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MavenProjectBuilder injection in a Mojo
On 10/11/06, franz see <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MavenProjectBuilder injection in a Mojo
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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MavenProjectBuilder injection in a Mojo
On 10/11/06, Sebastien Brunot <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MavenProjectBuilder injection in a Mojo
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:[EMAIL PROTECTED] 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: MavenProjectBuilder injection in a Mojo
On 10/11/06, Sebastien Brunot <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: MavenProjectBuilder injection in a Mojo
A recent mail from franz see gives me the answers (use @component instead of @parameter). Sorry for the annoyance. Sebastien -Original Message- From: Sebastien Brunot [mailto:[EMAIL PROTECTED] Sent: Friday, November 10, 2006 1:58 PM To: Maven Users List Subject: MavenProjectBuilder injection in a Mojo Hi all, what is the expression to use for injection of an org.apache.maven.project.DefaultMavenProjectBuilder instance as the value of a pojo parameter: /** * A MavenProjectBuilder instance * * @parameter expression="" * @readonly * @required */ private MavenProjectBuilder projectBuilder; what should i set as expression ? Thanks for your help, Sebastien - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
MavenProjectBuilder injection in a Mojo
Hi all, what is the expression to use for injection of an org.apache.maven.project.DefaultMavenProjectBuilder instance as the value of a pojo parameter: /** * A MavenProjectBuilder instance * * @parameter expression="" * @readonly * @required */ private MavenProjectBuilder projectBuilder; what should i set as expression ? Thanks for your help, Sebastien