On Thu, 2003-06-26 at 17:46, Brett Porter wrote:
> I thought Vincent was saying that he thought <plugin-property
> plugin="xdoc" name="maven.dest.dir" value="dest.dir"/> was better to
> avoid namespace confusion?
There will no longer be any namespace confusion as what's in a plugin is
completely separate. You could have the same property in many plugins
now and the value for the particular plugin will stay attached to the
plugin it belongs too. There are now separate classloaders for the
plugins as well.
> In that case I agree, because I'm not sure how Velocity is going to tell
> between plugins, antlr and "src.dir", without thinking it needs to do
> getSrc().getDir()
It can't which is why I am in favour of using standard Java naming
conventions for properties. This also makes sense name space wise if you
compare:
${plugins.antlr.srcDir}
as opposed to
${plugins.antlr.src.dir}
This is what I've started working toward.
> , but it might work. IT also rules out having "." in a
> plugin name - not a big deal, but worth checking.
We will need a standard naming convention for plugins too. Definitely no
"."s allowed and I haven't tried yet but I'm pretty sure I'm going to
run into a problem with the few plugins that have hyphens because jexl
is going to try and substract.
> As an aside, how do you assign to the variable, or is that not allowed
> outside of the plugin?
In the cases where this needs to be done you could grab hold of the Map
which contains the plugins properties. So, for example, if you wanted to
change the srcDir in the antlr plugin you would use:
${plugins.antlr.put( "srcDir", "/path" )}
I agree this is not the most element solution but a tag could be made
too if desired. But in most cases where you just want to read the
property
${plugins.antlr.srcDir}
is clear I believe.
> Cheers,
> Brett
>
> Jason van Zyl wrote:
> > On Thu, 2003-06-26 at 01:34, Vincent Massol wrote:
> >
> >
> >
> >>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.
> >
> >
> > Ok, so you are in favour of the ${foo} form for both. Cool, I'll keep
> > track. After thinking about it I think I like that too.
> >
> > ${maven.compile.target}
> >
> > ${plugins.antlr.src.dir}
> >
> > If I can get this to work this is what you would prefer, yes?
> >
> >
--
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]