dion        2002/10/05 19:01:23

  Modified:    src/plugins-build/console plugin.jelly
  Log:
  experimental change to allow setting of properties
  
  Revision  Changes    Path
  1.2       +45 -42    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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- plugin.jelly      4 Oct 2002 05:51:32 -0000       1.1
  +++ plugin.jelly      6 Oct 2002 02:01:23 -0000       1.2
  @@ -4,52 +4,55 @@
     xmlns:j="jelly:core" 
     xmlns:jj="jelly:jeez" 
     xmlns:i="jelly:interaction" 
  +  xmlns:log="jelly:log"
  +  xmlns:util="jelly:util"
     xmlns="jelly:werkz">
   
  -    <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">
  -            <!-- need a way to replace this with Maven.APP_VERSION -->
  -            <i:ask question="maven 1.0-beta8>:" answer="goal"/>
  -            <j:choose>
  -                <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:when>
  -                <j:otherwise>
  -                    <j:catch var="ex">
  -                        <j:set var="lastGoal" value="${goal}"/>
  -                        <attainGoal name="${goal}"/>
  -                    </j:catch>
  -                    <j:if test="${ex != null}">
  +  <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">
  +      <!-- need a way to replace this with Maven.APP_VERSION -->
  +      <i:ask question="maven 1.0-beta8>:" answer="goal"/>
  +      <j:choose>
  +        <j:when test="${goal.indexOf('=') != '-1'}">
  +          <util:tokenize var="propertyPieces" delim="=">${goal}</util:tokenize>
  +          <log:info>Setting property ${propertyPieces[0]} to 
${propertyPieces[1]}</log:info>
  +          <j:set var="${propertyPieces[0]}" value="${propertyPieces[1]}" />
  +        </j:when>
  +        <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:when>
  +        <j:otherwise>
  +          <j:catch var="ex">
  +            <j:set var="lastGoal" value="${goal}"/>
  +            <attainGoal name="${goal}"/>
  +          </j:catch>
  +          <j:if test="${ex != null}">
   ${ex}
  -                    </j:if>
  -                </j:otherwise>
  -            </j:choose>
  -        </j:forEach>
  -
  -    </goal>
  -
  -    <goal name="console:listGoals"
  -        description="Lists all available goals">
  -            <j:set var="proj" value="${org.apache.commons.jelly.werkz.Project}"/>
  -            <j:forEach var="listGoal" items="${proj.getGoals()}">
  +          </j:if>
  +        </j:otherwise>
  +      </j:choose>
  +    </j:forEach>
  +  </goal>
  +
  +  <goal name="console:listGoals" description="Lists 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>
  +    </j:forEach>
  +  </goal>
   
  -    <goal name="console:help"
  -        description="Prints the help message.">
  +  <goal name="console:help" description="Prints the help message.">
   The following commands are available:
   
       list - list all available goals
  @@ -59,5 +62,5 @@
   
       coming soon - quit ;-)
   
  -        </goal>
  +  </goal>
   </jj:project>
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to