On 9/30/05, jan_bar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> what is the scope of variable in Jelly script? For instance, I want to skip
> JUnit tests in cacuts:test, is the following Jelly correct?
>
> <!-- skip JUnit tests during cactus test -->
> <preGoal name="cactus:test">
> <j:set var="maven.test.skip.old-value" value="${maven.test.skip}" />
> <j:set var="cactus.test.skip.old-value" value="${cactus.test.skip}" />
> <j:set var="maven.test.skip" value="true" />
> <j:set var="cactus.test.skip" value="false" />
> </preGoal>
>
> <postGoal name="cactus:test">
> <j:set var="maven.test.skip" value="${maven.test.skip.old-value}" />
> <j:set var="cactus.test.skip" value="${cactus.test.skip.old-value}" />
> </postGoal>
>
> Couple of questions:
> * do I need to store/restore the values of variables or, when the goal
> exits, all variables will be reverted to previous state?Variables are not automatically reverted after a goal to their previous state. > * should I delete the temp variables with <j:remove>? Only if you want to get rid of them. > * maybe <j:scope> will handle this better? Nope, the scope tag introduces a new scope for it's body only. This would be hard to write in xml and still have the goal tags in the right place. > > Thanks, Jan > > PS: Unfortunately, there is almost no documentation besides > http://jakarta.apache.org/commons/jelly/tags.html. > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > -- http://www.multitask.com.au/people/dion/ "You are going to let the fear of poverty govern your life and your reward will be that you will eat, but you will not live." - George Bernard Shaw --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
