> -----Original Message----- > From: Jason van Zyl [mailto:[EMAIL PROTECTED] > Sent: 26 June 2003 04:07 > To: Maven Developers List > Subject: Re: Standard method for retrieving plugin properties in plugins > > On Wed, 2003-06-25 at 20:47, Jason van Zyl wrote: > > Hi, > > > > Just glancing around the plugins I see a few different ways that people > > are using to reference plugin properties that belong to the plugin in > > question. For example inside the java plugin there are references like: > > > > ${maven.compile.target} > > ${context.getVariable('maven.compile.fork'} > > > > and in some other plugins: > > > > ${pom.getPluginContext('maven-foo-plugin').getVariable('bar')} > > > > Which is only really needed if you're trying to get hold of a property > > for in another plugin. > > > > This is something else I would like to standardize and with the current > > refactoring something like: > > > > ${plugin.getProperty('maven.compile.target')} > > > > would work or we could simply do the > > > > ${maven.compile.target} > > > > which is not clear as to where the property comes is used in some > > places.
Why is not clear? Each plugin has its context, right? So it can only come from the plugin context, no? I view it as a short form of ${plugin.getProperty(... But it's much shorter to read and write which leads to clearer code. > > > > I am in favour in the first form as it's perfectly clear where the value > > comes from and is what I would like to use in the doco. > > Another thing would probably be nice to standardize is the inter-plugin > property retrieval. Bob's thought is a tag that we could use, something > like: > > <plugin-property plugin="xdoc" name="maven.dest.dir" value="dest.dir"/> > > so that would extract the 'maven.dest.dir' property from the xdoc plugin > and place the value in 'dest.dir' for use in the current context. > > The other we could try because jexl is basically velocity is place some > maps in the context so we could do something like: > > ${plugins.xdoc.maven.dest.dir} > > Any preferences? The first form is more explicit but it forces you to go through an extra step of storing the property in yet another property... I like the second form personally although I agree it is less understandable than the first. Thus, I would think the first is probably the best to avoid namespace confusion. -Vincent > > -- > jvz. > > Jason van Zyl > [EMAIL PROTECTED] > http://tambora.zenplex.org > > In short, man creates for himself a new religion of a rational > and technical order to justify his work and to be justified in it. > > -- Jacques Ellul, The Technological Society > > > --------------------------------------------------------------------- > 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]