You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by we...@apache.org on 2002/06/24 06:43:46 UTC

cvs commit: jakarta-commons-sandbox/./jelly/src/java/org/apache/commons/jelly/tags/werkz GoalTag.java ProjectTag.java

werken      2002/06/23 21:43:45

  Modified:    ./jelly  project.xml
               ./jelly/src/java/org/apache/commons/jelly/tags/werkz
                        GoalTag.java ProjectTag.java
  Log:
  Allowing for descriptions and default targets.
  
  Revision  Changes    Path
  1.25      +1 -1      jakarta-commons-sandbox/./jelly/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/./jelly/project.xml,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- project.xml	23 Jun 2002 01:29:34 -0000	1.24
  +++ project.xml	24 Jun 2002 04:43:45 -0000	1.25
  @@ -145,7 +145,7 @@
       <dependency>
         <id>werkz</id>
         <type>required</type>
  -      <version>1.0-dev.20020613.091536</version>
  +      <version>1.0-beta-2</version>
       </dependency>
       
       <!-- 
  
  
  
  1.3       +8 -1      jakarta-commons-sandbox/./jelly/src/java/org/apache/commons/jelly/tags/werkz/GoalTag.java
  
  Index: GoalTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/./jelly/src/java/org/apache/commons/jelly/tags/werkz/GoalTag.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- GoalTag.java	12 Jun 2002 17:09:41 -0000	1.2
  +++ GoalTag.java	24 Jun 2002 04:43:45 -0000	1.3
  @@ -89,6 +89,8 @@
       private String name;
   
       private String prereqs;
  +
  +    private String description;
       
       public GoalTag() {
       }
  @@ -108,6 +110,7 @@
           Goal goal = getProject().getGoal( getName(),
                                             true );
   
  +        goal.setDescription( this.description );
           addPrereqs( goal );
   
           Action action = new DefaultAction() {
  @@ -144,6 +147,10 @@
   
       public String getPrereqs() {
           return this.prereqs;
  +    }
  +
  +    public void setDescription(String description) {
  +        this.description = description;
       }
           
   
  
  
  
  1.11      +9 -12     jakarta-commons-sandbox/./jelly/src/java/org/apache/commons/jelly/tags/werkz/ProjectTag.java
  
  Index: ProjectTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/./jelly/src/java/org/apache/commons/jelly/tags/werkz/ProjectTag.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- ProjectTag.java	18 Jun 2002 18:36:43 -0000	1.10
  +++ ProjectTag.java	24 Jun 2002 04:43:45 -0000	1.11
  @@ -79,6 +79,8 @@
   
       /** the project */
       private Project project;
  +
  +    private String defaultGoalName;
           
       public ProjectTag() {
           super( true );
  @@ -110,23 +112,18 @@
        */
       public void doTag(XMLOutput output) throws Exception {       
           // force project to be lazily constructed        
  -        getProject(); 
  +
  +        getProject().setDefaultGoalName( this.defaultGoalName );
   
           org.apache.tools.ant.Project antProject = AntTagLibrary.getProject( context );
  -        
  +
           // allow access to Ant methods via the project class
           context.setVariable( "project", antProject );
  -
  -/*
  -        antProject.getBuildListeners().clear();
  -
  -        antProject.addBuildListener( new JellyBuildListener( output ) );
  -        PrintStream demuxOut = new PrintStream(new DemuxOutputStream(antProject, false));
  -        PrintStream demuxErr = new PrintStream(new DemuxOutputStream(antProject, true));
  -        System.setOut( demuxOut );
  -        System.setErr( demuxErr );
  -*/
           
           getBody().run(context, output);
  +    }
  +
  +    public void setDefault(String defaultGoalName) {
  +        this.defaultGoalName = defaultGoalName;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>