On 11-Aug-09, at 1:27 AM, Jochen Wiedmann wrote:

On Tue, Aug 11, 2009 at 6:01 AM, Jason van Zyl<[email protected]> wrote:
Look at the enforcer plugin. As each rule is a component that gets
configured.

Thanks once more. I have checked the sources of the enforcer and it
sounds *exactly* like what I am looking for. However, I haven't got
the slightest idea how it works.


Brian semi-abused the configuration mechanism to achieve what he wanted. But he did get it to work :-) We'll devise something that uses the components for 3.x but what's happening is that configuration elements translate into classes in the same package as the plugin itself. Plexus uses an XStream-like mechanism to instantiate the objects and populate their values. May not work internally exactly as you imagined but it does work and is effective.

I can see that the enforcer-rules module is using the
plexus-maven-plugin, but that doesn't detect any components. (And
rightly so, because there aren't any annotations I am aware of.)

What magic translates

           <configuration>
             <rules>
               <requireMavenVersion>

to "create me an instance of RequireMavenVersion"?


Thanks,

Jochen


--
Base64 decoding, 300% faster than sun.misc.BASE64Decoder:
http://archive.netbsd.se/?ml=commons-dev&a=2008-05&t=7522166

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------

To do two things at once is to do neither.

 -—Publilius Syrus, Roman slave, first century B.C.


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to