I'm inclined to believe you, but before I go off and start submitting 
patches to Torque and Jetspeed, I want to be 100% sure.  Since these are 
relatively high visibility Apache projects, I find it very hard to believe 
that these plugins would never have been tested.  Based on list comments 
and my own tests, I can't see how these plugins EVER worked as intended 
(in the areas where these "if" tests are used.)  Every other plugin seems 
to use the "context.getVariable('a.dotted.expression') == 'true'" syntax, 
or "a_non_dotted_variable == 'true'".

Also, I've been unable to find any meaningful documentation that helps in 
understanding this, and it's proven impossible to run in my debugging 
environment to see just what is going on, nor have I been able to turn on 
the log4j statements buried in commons-jelly, so I haven't been able to 
follow the code as it executes.

So, to summarize:
1.  <j:if test="${a_non_dotted_variable == 'true'}"> does work.
2.  <j:if test="${a.dotted.expression == 'true'}"> doesn't work.
3.  <j:if test="${context.getVariable('a.dotted.expression') == 'true'}"> 
does work.

Does anyone have anything to add?  Any clue as to why this was done like 
this, or how it might have slipped by without exhibiting a problem for 
anyone else?  Is there actually a way to set things in the environment so 
that these constructs actually work?  I'm asking here because this list 
would be most familiar with common plugin coding problems.  I'll be off to 
the Torque and Jetspeed lists after this to effect repairs.

In case anyone was curious:

The Jetspeed plugin uses this construct in 2 ways:  to turn on debugging, 
and to control handling of environmental(PROD, TEST, QA) merges of 
property files.  The use of the construct means you can't turn on 
debugging, and the environmental portion of the merge process fails 
(silently.)

The Torque plugin uses the construct to control what parts of the 
generated OM code are zipped up in the om-zip goal.  The use of the 
construct means you can never actually get anything zipped.





Dion Gillard <[EMAIL PROTECTED]>
07/18/2004 11:46 AM
Please respond to "Maven Users List"

 
        To:     Maven Users List <[EMAIL PROTECTED]>
        cc: 
        Subject:        Re: Problems with if tests in plugins


On Fri, 16 Jul 2004 13:26:32 -0400, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> I've come across at least 2 plugins with the constructs I've documented
> (jetspeed and torque).  The question is, did they ever work as written? 
Is
> it possible that they were simply never tested?
> 
> Making the change you suggest works, as well as renaming
> maven.jetspeed.debug to maven_jetspeed_debug.  However, this isn't a
> workable solution because I didn't write the plugins in question.
> 
> Can anyone clarify the situation?  Did the original expression work in 
the
> past, and the plugin hasn't been updated?  Or is something else going on
> here?
AFAIK, using a.dotted.variable in a jelly if has never worked the way
you've shown.
-- 
http://www.multitask.com.au/people/dion/

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

Reply via email to