Package org.apache.maven.werkz

Examples of org.apache.maven.werkz.Session


        // TODO: shouldn't this be a stack too? Then session attribute not needed
        transientMapper = new GoalToJellyScriptHousingMapper();

        // Create the Jelly session
        Session session = new JellySession( baseContext.getXMLOutput() );
        session.setAttribute( BASE_CONTEXT, baseContext );
        session.setAttribute( PLUGIN_MANAGER, this );
        session.setAttribute( GOAL_MAPPER, transientMapper );

        // add the global session to the pluginContext so that it can be used by tags
        baseContext.setVariable( GLOBAL_SESSION_KEY, session );

        // Execution of the Jelly scripts:
View Full Code Here


    public Session createSession()
    {
        /* TODO: this is for compatibility - do we want the user to request a new session instead?
         eg force=true on the tag
         not great to tie variables to session if we are creating a new one */
        Session session = (Session) getContext().getVariable( PluginManager.GLOBAL_SESSION_KEY );
        Session newSession = new JellySession( ( (MavenJellyContext) getContext() ).getXMLOutput() );
        for ( Iterator i = session.getAttributes().keySet().iterator(); i.hasNext(); )
        {
            String key = (String) i.next();
            newSession.setAttribute( key, session.getAttribute( key ) );
        }

        return newSession;
    }
View Full Code Here

        invokeBody( output );

        try
        {
            // Lazy goal loading
            Session session = createSession();
            MavenJellyContext baseContext = (MavenJellyContext) session.getAttribute( PluginManager.BASE_CONTEXT );
            GoalToJellyScriptHousingMapper mapper = (GoalToJellyScriptHousingMapper) session
                .getAttribute( PluginManager.GOAL_MAPPER );
            PluginManager pluginManager = (PluginManager) session.getAttribute( PluginManager.PLUGIN_MANAGER );

            Set pluginSet;
            try
            {
                pluginSet = pluginManager.prepAttainGoal( getName(), baseContext, mapper );
View Full Code Here

    public void doTag( final XMLOutput output )
        throws JellyTagException
    {
        AttainTag attainTag = (AttainTag) findAncestorWithClass( AttainTag.class );

        Session session = null;

        if ( this.session != null )
        {
            session = this.session;
        }
View Full Code Here

    {
        try
        {
            buildGraph();
            sortedGoals.clear();
            Session session = new Session();
            ProjectGoal g = getExistingGoal( project );
            g.attain( session );
        }
        catch ( CyclicGoalChainException e )
        {
View Full Code Here

    {
        try
        {
            buildGraph();
            sortedGoals.clear();
            Session session = new Session();
            doItAll.attain( session );
            return getProjects( sortedGoals, sourceBuild );
        }
        catch ( CyclicGoalChainException e )
        {
View Full Code Here

    {
        try
        {
            buildGraph();
            sortedGoals.clear();
            Session session = new Session();
            ProjectGoal g = getExistingGoal( project );
            g.attain( session );
        }
        catch ( CyclicGoalChainException e )
        {
View Full Code Here

    {
        try
        {
            buildGraph();
            sortedGoals.clear();
            Session session = new Session();
            doItAll.attain( session );
            return getProjects( sortedGoals, sourceBuild );
        }
        catch ( CyclicGoalChainException e )
        {
View Full Code Here

    public Session createSession()
    {
        /* TODO: this is for compatibility - do we want the user to request a new session instead?
         eg force=true on the tag
         not great to tie variables to session if we are creating a new one */
        Session session = (Session) getContext().getVariable( PluginManager.GLOBAL_SESSION_KEY );
        Session newSession = new JellySession( ( (MavenJellyContext) getContext() ).getXMLOutput() );
        for ( Iterator i = session.getAttributes().keySet().iterator(); i.hasNext(); )
        {
            String key = (String) i.next();
            newSession.setAttribute( key, session.getAttribute( key ) );
        }

        return newSession;
    }
View Full Code Here

        invokeBody( output );

        try
        {
            // Lazy goal loading
            Session session = createSession();
            MavenJellyContext baseContext = (MavenJellyContext) session.getAttribute( PluginManager.BASE_CONTEXT );
            GoalToJellyScriptHousingMapper mapper = (GoalToJellyScriptHousingMapper) session
                .getAttribute( PluginManager.GOAL_MAPPER );
            PluginManager pluginManager = (PluginManager) session.getAttribute( PluginManager.PLUGIN_MANAGER );

            Set pluginSet;
            try
            {
                pluginSet = pluginManager.prepAttainGoal( getName(), baseContext, mapper );
View Full Code Here

TOP

Related Classes of org.apache.maven.werkz.Session

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.