Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyContext


            if ( output != null ) {
                log( "Sending output to: " + output );
            }
           
            Script script = compileScript();
            JellyContext context = getJellyContext();
            context.setVariable( "project", project );
            script.run( context, getXMLOutput() );
            getXMLOutput().close();
        }
        catch (Exception e) {
            throw new BuildException(e, location);
View Full Code Here


        if (context == null) {
            // take off the name off the URL
            String text = getUrl().toString();
            int idx = text.lastIndexOf('/');
            text = text.substring(0, idx + 1);
            JellyContext parentContext =  new JellyContext(getRootContext(), new URL(text));
            context = new AntJellyContext(project, parentContext);
           
            // register the Ant tag library
            context.registerTagLibrary( "jelly:ant", new AntTagLibrary(project) );
        }
View Full Code Here

            log.debug("Invoking dynamic tag with attributes: " + attributes);
        }
        attributes.put("org.apache.commons.jelly.body", getBody());
       
        // create new context based on current attributes
        JellyContext newJellyContext = context.newJellyContext(attributes);
        getTemplate().run(newJellyContext, output);
    }
View Full Code Here

     * to evaluate the script.
     *
     * @since 1.164
     */
    public static JellyContext getCurrentJellyContext() {
        JellyContext context = ExpressionFactory2.CURRENT_CONTEXT.get();
        assert context!=null;
        return context;
    }
View Full Code Here

TOP

Related Classes of org.apache.commons.jelly.JellyContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.