Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyTagException


        }
        try {
            HandlerStack handler = new HandlerStack(new ContentHandler ());
            getXML (new XMLOutput(handler.contentHandler()));
        } catch (SAXException e) {
            throw new JellyTagException(e.getException());
        }
    }
View Full Code Here


        {
            addPrereqs( goal );
        }
        catch ( CyclicGoalChainException e )
        {
            throw new JellyTagException( e );
        }

        Action action;

        action = getAction();
View Full Code Here

        throws JellyTagException
    {
        WerkzProject project = getProject();
        if ( project == null )
        {
            throw new JellyTagException( "Must use this tag inside a <maven:project> tag" );
        }

        // #### allow lazy creation of callbacks before the goal is defined...
        Goal goal = project.getGoal( name, true );
        if ( goal == null )
        {
            throw new JellyTagException( "No such target name: " + name );
        }
        return goal;
    }
View Full Code Here

        WerkzProject project = getProject();

        if ( project == null )
        {
            throw new JellyTagException( "No Project available" );
        }

        invokeBody( output );

        try
        {
            project.attainGoal( getName(), session );
        }
        catch ( UnattainableGoalException e )
        {
            Throwable root = e.getRootCause();

            if ( root != null )
            {
                if ( root instanceof JellyTagException )
                {
                    throw (JellyTagException) root;
                }
                if ( root instanceof UnattainableGoalException )
                {
                    throw new JellyTagException( e );
                }
            }
            else
            {
                e.fillInStackTrace();
                throw new JellyTagException( e );
            }
        }
        catch ( NoActionDefinitionException e )
        {
            throw new JellyTagException( e );
        }
        catch ( NoSuchGoalException e )
        {
            throw new JellyTagException( e );
        }
    }
View Full Code Here

        {
            log.error( "Plugin '" + plugin + "' in project '" + project + "' is not available" );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "Error loading plugin", e );
        }
    }
View Full Code Here

        {
            getContext().setVariable( var, MavenUtils.makeAbsolutePath( basedir, path ) );
        }
        catch ( IOException e )
        {
            throw new JellyTagException( "Unable to resolve directory", e );
        }
    }
View Full Code Here

        {
            context.setVariable( var, MavenUtils.getProject( projectDescriptor, getMavenContext(), useInheritance ) );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "error getting project", e );
        }
    }
View Full Code Here

        {
            sortedProjects = getSortedProjects();
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "Error getting projects", e );
        }

        log.info( "Our processing order:" );

        for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
        {
            Project p = (Project) i.next();
            log.info( p.getName() );
        }

        ArrayList reactorProjects = new ArrayList();

        Runtime r = Runtime.getRuntime();
        for ( Iterator i = sortedProjects.iterator(); i.hasNext(); )
        {
            // The basedir needs to be set for the project
            // We just need the descriptor.

            Project project = (Project) i.next();
            beforeProject( project );

            final long mb = 1024 * 1024;
            log.info( "+----------------------------------------" );
            log.info( "| " + getBanner() + " " + project.getName() );
            log.info( "| Memory: " + ( ( r.totalMemory() - r.freeMemory() ) / mb ) + "M/" + ( r.totalMemory() / mb )
                + "M" );
            log.info( "+----------------------------------------" );

            // We only try to attain goals if they have been set. The reactor
            // might be in use to collect project information for the purpose
            // of, say, generating a sites from a set of components.
            List goalList = null;
            if ( getGoals() != null )
            {
                goalList = MavenUtils.getGoalListFromCsv( getGoals() );
            }

            beforeLaunchGoals( project );

            try
            {
                if ( !collectOnly )
                {
                    getMavenContext().getMavenSession().attainGoals( project, goalList );
                }
            }
            catch ( Exception e )
            {
                onException( project, e );
                // TODO: there is a risk that continuing may leave the project in an inconsistent state.
                //  -- attainGoals needs to split fatal from non-fatal exceptions and we only ignore non-fatal
                if ( !isIgnoreFailures() )
                {
                    throw new JellyTagException( "Reactor subproject failure occurred", e );
                }
            }

            afterLaunchGoals( project );
            afterProject( project );
View Full Code Here

        {
            result = computePath();
        }
        catch ( IOException e )
        {
            throw new JellyTagException( "Unable to create relative path", e );
        }
        getContext().setVariable( var, result );
    }
View Full Code Here

            }
            getContext().setVariable( var, canonicalPath );
        }
        catch ( IOException e )
        {
            throw new JellyTagException( "Unable to resolve directory", e );
        }
    }
View Full Code Here

TOP

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

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.