maven-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject cvs commit: jakarta-turbine-maven/src/java/org/apache/maven/jelly MavenJellyContext.java
Date Mon, 02 Dec 2002 02:02:36 GMT
jvanzyl     2002/12/01 18:02:36

  Modified:    src/java/org/apache/maven/jelly MavenJellyContext.java
  Log:
  o setting up taglibs with the context class itself.
  
  Revision  Changes    Path
  1.12      +23 -7     jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java
  
  Index: MavenJellyContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-turbine-maven/src/java/org/apache/maven/jelly/MavenJellyContext.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- MavenJellyContext.java	2 Dec 2002 01:17:50 -0000	1.11
  +++ MavenJellyContext.java	2 Dec 2002 02:02:36 -0000	1.12
  @@ -59,10 +59,14 @@
   import org.apache.commons.jelly.JellyContext;
   import org.apache.commons.jelly.TagLibrary;
   import org.apache.commons.jelly.XMLOutput;
  +import org.apache.commons.jelly.tags.jeez.JeezTagLibrary;
  +import org.apache.commons.jelly.tags.ant.AntTagLibrary;
   import org.apache.commons.jelly.expression.Expression;
   import org.apache.commons.grant.GrantProject;
   import org.apache.maven.MavenConstants;
   import org.apache.maven.Maven;
  +import org.apache.maven.jelly.tags.MavenJeezTagLibrary;
  +import org.apache.maven.jelly.tags.project.MavenTagLibrary;
   import org.apache.maven.plugin.PluginManager;
   import org.apache.maven.verifier.ProjectVerifier;
   import org.apache.maven.project.Project;
  @@ -110,8 +114,7 @@
       public MavenJellyContext()
       {
           super();
  -        this.tagLibUris = new HashSet();
  -        this.lazyTagLibs = new HashSet();
  +        initializeContext();
       }
   
       /** Construct.
  @@ -121,8 +124,7 @@
       public MavenJellyContext( URL rootContext )
       {
           super( rootContext );
  -        this.tagLibUris = new HashSet();
  -        this.lazyTagLibs = new HashSet();
  +        initializeContext();
       }
   
       /** Construct.
  @@ -132,13 +134,27 @@
       public MavenJellyContext( MavenJellyContext parent )
       {
           super( parent );
  -        this.tagLibUris = new HashSet();
  -        this.lazyTagLibs = new HashSet();
  +        initializeContext();
       }
   
       // ----------------------------------------------------------------------
       // I N S T A N C E  M E T H O D S
       // ----------------------------------------------------------------------
  +
  +    /**
  +     * Initialize the context with any tag libs or other values we need.
  +     */
  +    private void initializeContext()
  +    {
  +        tagLibUris = new HashSet();
  +        lazyTagLibs = new HashSet();
  +
  +        JeezTagLibrary jeezTagLib = new MavenJeezTagLibrary();
  +
  +        registerTagLibrary( "jelly:jeez", jeezTagLib );
  +        registerTagLibrary( "", jeezTagLib );
  +        registerTagLibrary( "jelly:maven", new MavenTagLibrary() );
  +    }
   
       /** Create a child <code>JellyContext</code>.
        *
  
  
  

Mime
View raw message