1 package org.apache.maven.jelly.tags.jeez;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 import org.apache.commons.jelly.JellyException;
22 import org.apache.commons.jelly.impl.TagScript;
23 import org.apache.maven.jelly.tags.werkz.MavenAttainGoalTag;
24 import org.apache.maven.jelly.tags.werkz.MavenGoalTag;
25 import org.xml.sax.Attributes;
26
27 /** Replacement for Jelly's <code>JeezTagLibrary</code>.
28 *
29 * @author <a href="mailto:bob@eng.werken.com">bob mcwhirter</a>
30 *
31 * @version $Id: MavenJeezTagLibrary.java 517014 2007-03-11 21:15:50Z ltheussl $
32 */
33 public class MavenJeezTagLibrary
34 extends JeezTagLibrary
35 {
36
37
38
39
40 /** Create a <code>TagScript</code> based upon an element's
41 * name and attributes.
42 *
43 * @param name The name.
44 * @param attrs The attributes.
45 * @return Generated <code>TagScript</code> from an elements
46 * name and attributes.
47 *
48 * @throws JellyException If an error occurs while attempting to
49 * create the script.
50 */
51
52 public TagScript createTagScript( String name, Attributes attrs )
53 throws JellyException
54 {
55 if ( "goal".equals( name ) )
56 {
57 return TagScript.newInstance( MavenGoalTag.class );
58 }
59 else if ( "attainGoal".equals( name ) )
60 {
61 return TagScript.newInstance( MavenAttainGoalTag.class );
62 }
63
64
65 return super.createTagScript( name, attrs );
66 }
67 }