Package org.apache.commons.jelly

Examples of org.apache.commons.jelly.JellyTagException


                    getContext().setVariable( MavenConstants.FAILED_PROJECTS, c );
                }
                return;
            }

            throw new JellyTagException( e );
        }
    }
View Full Code Here


    {
        WerkzProject project = getProject();

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

        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 );
            }
            catch ( Exception e )
            {
                throw new JellyTagException( e );
            }
            project.attainGoal( getName(), session );
            pluginManager.addDelayedPops( pluginSet );
        }
        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 );
                }
            }
            e.fillInStackTrace();
            throw new JellyTagException( e );
        }
        catch ( NoActionDefinitionException e )
        {
            throw new JellyTagException( e );
        }
        catch ( NoSuchGoalException e )
        {
            throw new JellyTagException( e );
        }
    }
View Full Code Here

        checkAttribute( user, "user" );

        user = user.trim();
        if ( "".equals( user ) || UserCheck.NO_VALUE.equals( user ) )
        {
            throw new JellyTagException( UserCheck.ERROR );
        }
    }
View Full Code Here

        {
            manager.installPlugin( file, null, cache );
        }
        catch ( Exception e )
        {
            throw new JellyTagException( "error installing plugin", e );
        }
    }
View Full Code Here

            fos.flush();
            fos.close();
        }
        catch ( IOException e )
        {
            throw new JellyTagException( e );
        }
    }
View Full Code Here

    {
        Project project = AntTagLibrary.getProject( getContext() );

        if ( project == null )
        {
            throw new JellyTagException( "cannot find ant project" );
        }

        checkAttribute( getId(), "id" );
        checkAttribute( getRefid(), "refid" );

        Path path = (Path) project.getReferences().get( getId() );
        if ( path == null )
        {
            throw new JellyTagException( "cannot find the path to add to specified by 'id': " + getId() );
        }
        Path addPath = (Path) project.getReferences().get( getRefid() );
        if ( addPath == null )
        {
            throw new JellyTagException( "cannot find the path to add specified by 'refid': " + getRefid() );
        }
        path.append( addPath );
    }
View Full Code Here

                Object xpathContext = getXPathContext();
                if (! xpath.booleanValueOf(xpathContext)) {
                    fail( getBodyText(), "evaluating xpath: "+ xpath );
                }
            } catch (JaxenException anException) {
                throw new JellyTagException("Error evaluating xpath", anException);
            }

        }

    }
View Full Code Here

        };

        // lets find the test suite
        TestSuite suite = getSuite();
        if ( suite == null ) {
            throw new JellyTagException( "Could not find a TestSuite to add this test to. This tag should be inside a <test:suite> tag" );
        }
        suite.addTest(testCase);
    }
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

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.