Wont a goal recursively attaining itself eventually run out of memory?

We added a while tag to Jelly for this purpose a few days back....
--
dIon Gillard, Multitask Consulting
Work:      http://www.multitask.com.au
Developers: http://adslgateway.multitask.com.au/developers


[EMAIL PROTECTED] wrote on 11/10/2002 09:09:16 AM:

> smor        2002/10/10 16:09:16
> 
>   Modified:    src/plugins-build/console plugin.jelly
>   Log:
>   o Removed the jelly:werkz as the default xmlns
>   o Separated the start of the plugin and the runtime (console and 
> console:ask)
>   o Changed the message so that it displays the project info instead
> of Maven info,
>     in case we switch project.
>   o Set up a default answer (the last goal) to the question so that we 
can
>     simply press "Enter" to re-run it (instead of "!!").
>   o "quit" is implemented
> 
>   Revision  Changes    Path
>   1.3       +19 -14    jakarta-turbine-maven/src/plugins-
> build/console/plugin.jelly
> 
>   Index: plugin.jelly
>   ===================================================================
>   RCS file: /home/cvs/jakarta-turbine-maven/src/plugins-
> build/console/plugin.jelly,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -r1.2 -r1.3
>   --- plugin.jelly   6 Oct 2002 02:01:23 -0000   1.2
>   +++ plugin.jelly   10 Oct 2002 23:09:16 -0000   1.3
>   @@ -5,15 +5,17 @@
>      xmlns:jj="jelly:jeez" 
>      xmlns:i="jelly:interaction" 
>      xmlns:log="jelly:log"
>   -  xmlns:util="jelly:util"
>   -  xmlns="jelly:werkz">
>   +  xmlns:util="jelly:util">
> 
>      <goal name="console" description="Run the Maven console">
>        <attainGoal name="console:help"/>
>        <j:set var="lastGoal" value="console:help"/>
>   -    <j:forEach var="goal" begin="0" end="1000" step="1">
>   +    <attainGoal name="console:ask"/>
>   +  </goal>
>   +
>   +  <goal name="console:ask">
>          <!-- need a way to replace this with Maven.APP_VERSION -->
>   -      <i:ask question="maven 1.0-beta8>:" answer="goal"/>
>   +      <i:ask question="${pom.id} ${pom.currentVersion} >:" 
> answer="goal" default="${lastGoal}"/>
>          <j:choose>
>            <j:when test="${goal.indexOf('=') != '-1'}">
>              <util:tokenize var="propertyPieces" delim="=">${goal}
> </util:tokenize>
>   @@ -23,44 +25,47 @@
>            <j:when test="${goal=='help'}">
>              <attainGoal name="console:help"/>
>            </j:when>
>   -        <j:when test="${goal=='!!'}">
>   -          <attainGoal name="${lastGoal}"/>
>   -        </j:when>
>            <j:when test="${goal=='list'}">
>              <attainGoal name="console:listGoals"/>
>            </j:when>
>            <j:when test="${goal=='quit'}">
>   -          <j:set var="goal" value="1001"/>
>   +          <j:set var="followOn" value="false"/>
>            </j:when>
>            <j:otherwise>
>              <j:catch var="ex">
>                <j:set var="lastGoal" value="${goal}"/>
>                <attainGoal name="${goal}"/>
>   +            <j:set var="lastGoal" value="${goal}"/>
>              </j:catch>
>              <j:if test="${ex != null}">
>    ${ex}
>              </j:if>
>            </j:otherwise>
>          </j:choose>
>   -    </j:forEach>
>   +      <j:choose>
>   +        <j:when test="${followOn=='false'}">
>   +          <echo>Bye !</echo>
>   +        </j:when>
>   +        <j:otherwise>
>   +          <attainGoal name="console:ask"/>
>   +        </j:otherwise>
>   +      </j:choose>
>      </goal>
> 
>   -  <goal name="console:listGoals" description="Lists all available 
goals">
>   +  <goal name="console:listGoals" description="List all available 
goals">
>        <j:set var="proj" 
value="${org.apache.commons.jelly.werkz.Project}"/>
>        <j:forEach var="listGoal" items="${proj.getGoals()}">
>    ${listGoal.getName()}
>        </j:forEach>
>      </goal>
> 
>   -  <goal name="console:help" description="Prints the help message.">
>   +  <goal name="console:help" description="Print the help message.">
>    The following commands are available:
> 
>        list - list all available goals
>        help - this message
>        &lt;goalname&gt; - attain a goal
>   -    !! - attain the last goal
>   -
>   -    coming soon - quit ;-)
>   +    quit - quits the console
> 
>      </goal>
>    </jj:project>
> 
> 
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:turbine-maven-dev-
> [EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:turbine-maven-dev-
> [EMAIL PROTECTED]>
> 

Reply via email to