smor        2002/07/13 14:12:10

  Modified:    .        maven.xml
  Log:
  Transformed the "ask" goal to make it an "interactive" goal.
  You should be able to type "maven interactive", and you'll be
  prompted for a goal to complete. Type it (defaults to "java:jar")
  and it'll try and complete it.
  Once it is over, it asks you for another goal to complete (the last
  one by default).
  
  This is a use case of the AskTag.
  It allows to load maven once and then complete as many goals as
  needed.
  
  Revision  Changes    Path
  1.16      +11 -5     jakarta-turbine-maven/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/maven.xml,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- maven.xml 13 Jul 2002 14:02:00 -0000      1.15
  +++ maven.xml 13 Jul 2002 21:12:10 -0000      1.16
  @@ -4,11 +4,17 @@
     
xmlns:interaction="jelly:org.apache.commons.jelly.tags.interaction.InteractionTagLibrary">
   
     <!-- A dumb "ask" goal, just to see if it works ! :)                    -->
  -  <goal name="ask">
  -    <interaction:ask question="What is your name ?" 
  -               answer="maven.ask.user.name" 
  -               default="default value"/>
  -    <echo>Welcome ${maven.ask.user.name} !</echo>
  +  <goal name="interactive">
  +
  +    <interaction:ask question="Which goal do you want to complete ?" 
  +               answer="maven.ask.goal.name" 
  +               default="${maven.ask.goal.name}"/>
  +
  +    <attainGoal name="${maven.ask.goal.name}"/>
  +
  +    <echo>Trying to attain goal "${maven.ask.goal.name}" !</echo>
  +    <attainGoal name="interactive"/>
  +    
     </goal>
   
     <!-- ================================================================== -->
  
  
  

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

Reply via email to