Re: [m2] Can anyone explain this code

2007-02-19 Thread franz see
> e ); >>>> } >>>> } >>>> ... >>>> >>>> If I didn't miss anything this code make the value of any parameter >>>> expression starting with "plugin" to be null for sure, which

Re: [m2] Can anyone explain this code

2007-02-19 Thread franz see
t;>} >>>>>... >>>>> >>>>>If I didn't miss anything this code make the value of any parameter >>>>>expression starting with "plugin" to be null for sure, which will cause &

Re: [m2] Can anyone explain this code

2007-02-19 Thread Jiaqi Guo
Hi Franz, I seemed to miss this mail until just now. Sorry for late response. I was trying to get some information of the plugin itself (A PluginDescriptor object). In Maven1 this is feasible if Jelly script refers something like "${plugin.get...}" so I guessed there should be similar thing i

Re: [m2] Can anyone explain this code

2007-02-14 Thread franz see
ameterException in >>> org.apache.maven.plugin.DefaultPluginManager.checkRequiredParameters(DefaultPluginManager.java:809). >>> >>> Same thing happens to "settings" and "project". >>> >>> Is this a bug of maven-2.0.4? Is there any way to get pluginDescriptor

Re: [m2] Can anyone explain this code

2007-02-13 Thread Wayne Fay
Thanks for your contribution, Jiaqi! Wayne On 2/13/07, Jiaqi Guo <[EMAIL PROTECTED]> wrote: Thanks Wayne, Although I found workaround for the tool that I'm working on, the patch for PluginParameterExpression could be really simple: sh-3.1$ svn diff Index: maven-core/src/main/java/org/apache/m

Re: [m2] Can anyone explain this code

2007-02-13 Thread Jiaqi Guo
Thanks Wayne, Although I found workaround for the tool that I'm working on, the patch for PluginParameterExpression could be really simple: sh-3.1$ svn diff Index: maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java ===

Re: [m2] Can anyone explain this code

2007-02-13 Thread Wayne Fay
Without getting too far into the code myself, you seem to make some very good arguments about possible problems in this code. ;-) I have no idea if this PluginParameterExpressionEvaluator class (and the referenced code in Plexus) have proper unit tests etc, but it seems like you could make a grea

Re: [m2] Can anyone explain this code

2007-02-13 Thread Jiaqi Guo
In fact, the ReflectionValueExtractor.evaluate("lugin", pluginDescriptor) does return null. The first token in while loop is "lugin", which calls "getLugin()" of root object and returns null. I guess this is where the problem is. Maybe there should be another 'else if ( "plugin".equals( express

Re: [m2] Can anyone explain this code

2007-02-13 Thread Jiaqi Guo
Hi Franz, I tried to get PluginDescriptor within a mojo and got PluginParameterException, then I started looking at this code. Assume expression is string "plugin", pathSeparator is -1, the expression.substring(1) becomes "lugin". Did I miss anything here? And then looking at ReflectionValu

Re: [m2] Can anyone explain this code

2007-02-13 Thread franz see
tings" and "project". > > Is this a bug of maven-2.0.4? Is there any way to get pluginDescriptor > in Mojo? > > > > Regards > > -- > > > Jiaqi Guo > > http://www.cyclopsgroup.org > [EMAIL PROTECTED] > > > --

Re: Can anyone explain this code

2007-02-13 Thread Wayne Fay
Make sure you take a look at the relevant Plexus code before assuming there's a problem with this bit of Maven code: http://svn.plexus.codehaus.org/browse/~raw,r=1756/plexus/trunk/plexus-utils/src/main/java/org/codehaus/plexus/util/introspection/ReflectionValueExtractor.java http://svn.plexus.co

Can anyone explain this code

2007-02-12 Thread Jiaqi Guo
Hi there, I'm trying to find out the build-in variables for a maven2 plugin and found the following code in http://svn.apache.org/repos/asf/maven/components/tags/maven-2.0.4/maven-core/src/main/java/org/apache/maven/plugin/PluginParameterExpressionEvaluator.java line 217: ... else if (