there's a converter for (1), IIRC. So:

<configuration>
 <foo>
   <bar>
     <baz name="..." />
   </bar>
 </foo>
</configuration>

Should work with:
/** @parameter */
private Xpp3Dom foo;

(2) Not beyond the above, no.

On 20/05/06, Rinku <[EMAIL PROTECTED]> wrote:
Hi Brett,

I still have a few questions on your suggestion:

1) How can I pass and set value to an Xpp3Dom field in a Mojo? Is that a
CData section in the Mojo <configuration>. M2/Plexus currently expects
the class that implements and maps to Mojo's <configuration> to be a
POJO with no-arg construction. I am not sure if this will map to
Xpp3Dom.

2) I am assuming this is not yet available in Mojo API yet, right?

Thanks again,

Rahul



----- Original Message -----
From: "Brett Porter" <[EMAIL PROTECTED]>
To: "Maven Users List" <[email protected]>
Sent: Sunday, May 21, 2006 3:46 AM
Subject: Re: How to configure a Plexus Component from pom.xml


I think if you want to dynamically control the implementation or
configuration of a component from the POM, you'll need to pass the
configuration in to the mojo as a separate field (Xpp3Dom), then setup
the mojo to get the container instance and look it up/configure it
manually.

This would be a good enhancement to the mojo API though, eg:
/** @component configuration="databaseConfig" */
Component component;

/** @parameter */
Xpp3Dom databaseConfig;

- Brett

On 19/05/06, Rinku <[EMAIL PROTECTED]> wrote:
> Hi,
>
> Here's my use case. I have created:
> 1)  a Plexus Database Component, which expects some configuration bits
> to run (connection url, username, password etc)
> 2)  a Maven Database Plugin which uses the DatabaseComponent to allow
> a
> Maven Project to setup a database instance.
>
> So far so good; but now I am not sure how to configure the Plexus
> component I created in (1) from pom.xml? I guess I will have to push
> the
> configuration via the Database Plugin's <configuration> element in
> pom.xml - but I don't know how? Appreciate any pointers.
>
> TIA!
>
> Cheers,
> Rahul
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


--
Apache Maven - http://maven.apache.org
"Better Builds with Maven" book - http://library.mergere.com/

---------------------------------------------------------------------
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]




--
Apache Maven - http://maven.apache.org
"Better Builds with Maven" book - http://library.mergere.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to