You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by js...@apache.org on 2002/06/12 00:59:22 UTC

cvs commit: jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly jelly.properties

jstrachan    2002/06/11 15:59:22

  Modified:    jelly/src/java/org/apache/commons/jelly/tags/werkz
                        PreTargetTag.java TargetTag.java
               jelly/src/test/org/apache/commons/jelly/werkz example.jelly
               jelly/src/java/org/apache/commons/jelly/tags/ant
                        AntTagLibrary.java
               jelly/src/java/org/apache/commons/jelly jelly.properties
  Log:
  got the basic Werkz example working now. Need to add dependencies to <target> and then experiment with local build.jelly and a ${maven.home}/mediator.jelly
  
  also when called from the <java> task, rather than the <jelly> task, the Ant tag library doesn't work properly yet.
  
  Revision  Changes    Path
  1.2       +0 -4      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PreTargetTag.java
  
  Index: PreTargetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/PreTargetTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- PreTargetTag.java	11 Jun 2002 21:41:11 -0000	1.1
  +++ PreTargetTag.java	11 Jun 2002 22:59:22 -0000	1.2
  @@ -92,13 +92,9 @@
           getGoal(getName()).addPreGoalCallback(
               new PreGoalCallback() {
                   public void firePreGoal(Goal goal) throws Exception {
  -                    System.out.println( "Calling pre target: " + getName() );
  -                    
                       // lets run the body
                       log.info( "Running pre target: " + getName() );
                       getBody().run( context, output);               
  -                                             
  -                    System.out.println( "Called pre target: " + getName() );
                   }                
               }
           );            
  
  
  
  1.2       +11 -11    jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/TargetTag.java
  
  Index: TargetTag.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/werkz/TargetTag.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TargetTag.java	11 Jun 2002 21:41:11 -0000	1.1
  +++ TargetTag.java	11 Jun 2002 22:59:22 -0000	1.2
  @@ -98,18 +98,18 @@
        */
       public void doTag(final XMLOutput output) throws Exception {
           
  -        // lets register a new goal...
  -        
  -        getProject().addGoal(
  -            new DefaultGoal(name) {
  -                public void performAction() throws Exception {
  -                    System.out.println( "Running target: " + name );
  -                    // lets run the body
  -                    log.info( "Running target: " + name );
  -                    getBody().run( context, output);                                        
  -                }                
  +        // lets register a new goal...        
  +		DefaultGoal goal = new DefaultGoal(name) {
  +			public void performAction() throws Exception {
  +				// lets run the body
  +				log.info("Running target: " + name);
  +				getBody().run(context, output);
  +			}
  +            public boolean requiresAction() {
  +                return true;
               }
  -        );            
  +		};
  +        getProject().addGoal(goal);
       }
   
   
  
  
  
  1.2       +1 -4      jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/werkz/example.jelly
  
  Index: example.jelly
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/test/org/apache/commons/jelly/werkz/example.jelly,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- example.jelly	11 Jun 2002 21:41:11 -0000	1.1
  +++ example.jelly	11 Jun 2002 22:59:22 -0000	1.2
  @@ -4,24 +4,21 @@
   
     <!-- the following could be in the mediator of Maven -->
     <werkz:target name="init">
  -    target: init
     	<echo message="Initializing the project!"/>
     </werkz:target>
     		
     <werkz:target name="compile">
  -    target: compile
     	<echo message="About to compile the project!"/>
     </werkz:target>
   
     <werkz:target name="test">
  -  	target: test
     	<echo message="About to run the tests!"/>
     </werkz:target>
   
   
    <!-- define some callbacks in the projects build.jelly -->
    <werkz:preTarget name="compile">
  - 	<echo message="I'm a callback: doing something before I compile"/> 	  		
  + 	<echo message="I am a callback: doing something before I compile"/> 	  		
    </werkz:preTarget>
   
   
  
  
  
  1.5       +2 -0      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/AntTagLibrary.java
  
  Index: AntTagLibrary.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/tags/ant/AntTagLibrary.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- AntTagLibrary.java	5 Jun 2002 07:12:58 -0000	1.4
  +++ AntTagLibrary.java	11 Jun 2002 22:59:22 -0000	1.5
  @@ -137,6 +137,8 @@
       }        
           
       public AntTagLibrary() {
  +        // need to spoof an Ant project
  +        this.project = new Project();
       }
   
       public AntTagLibrary(Project project) {
  
  
  
  1.11      +1 -0      jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/jelly.properties
  
  Index: jelly.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons-sandbox/jelly/src/java/org/apache/commons/jelly/jelly.properties,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- jelly.properties	11 Jun 2002 21:41:11 -0000	1.10
  +++ jelly.properties	11 Jun 2002 22:59:22 -0000	1.11
  @@ -4,6 +4,7 @@
   xml         = org.apache.commons.jelly.tags.xml.XMLTagLibrary
   sql         = org.apache.commons.jelly.tags.sql.SqlTagLibrary
   jsl			= org.apache.commons.jelly.tags.jsl.JSLTagLibrary
  +ant			= org.apache.commons.jelly.tags.ant.AntTagLibrary
   werkz		= org.apache.commons.jelly.tags.werkz.WerkzTagLibrary
   
   # optional taglibs
  
  
  

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