Examples of WerkzProject


Examples of org.apache.maven.werkz.WerkzProject

        {
            // we may be invoked inside a child script, so lets try find the parent project
            project = (WerkzProject) context.findVariable( "org.apache.commons.jelly.werkz.Project" );
            if ( project == null )
            {
                project = new WerkzProject();
                context.setVariable( "org.apache.commons.jelly.werkz.Project", project );
            }
        }
        return project;
    }
View Full Code Here

Examples of org.apache.maven.werkz.WerkzProject

            goals.add( "build:end" );
        }

        transientMapper.merge( mapper );

        WerkzProject werkzProject = new WerkzProject();
        baseContext.setWerkzProject( werkzProject );

        Set pluginSet = new HashSet();
        // poor mans stack - only pop when you finish the same frame that the plugin was lazily init in
        Set oldDelayedPops = new HashSet( delayedPops );
        delayedPops.clear();

        Thread.currentThread().setContextClassLoader( null );

        try
        {
            runScript( driverHousing, baseContext );
            transientMapper.addResolvedPlugins( Collections.singletonList( driverHousing ) );

            // Dependencies must be processed after the driver is run for compatibility
            // FIXME: From attainGoals angle, how does it know the project needs to
            //        to be verified, or that the project object hasn't been used before
            project.verifyDependencies();
            processDependencies( project );

            for ( Iterator j = projectHousings.iterator(); j.hasNext(); )
            {
                JellyScriptHousing housing = (JellyScriptHousing) j.next();
                runScript( housing, baseContext );
            }
            transientMapper.addResolvedPlugins( projectHousings );

            // Plugin Jelly scripts
            for ( Iterator i = goals.iterator(); i.hasNext(); )
            {
                String goalName = (String) i.next();

                pluginSet.addAll( prepAttainGoal( goalName, baseContext, transientMapper ) );
            }

            // Plugin Jelly scripts
            for ( Iterator i = goals.iterator(); i.hasNext(); )
            {
                String goalName = (String) i.next();
                LOGGER.debug( "attaining goal " + goalName );
                try
                {
                    Goal goal = werkzProject.getGoal( goalName );
                    if ( ( goal == null ) || ( goal.getAction() == null ) )
                    {
                        throw new NoSuchGoalException( goalName );
                    }
                    goal.attain( session );
View Full Code Here

Examples of org.apache.maven.werkz.WerkzProject

     throws a JellyExceptoin if the goal could not be found
     */
    protected Goal getGoal( String name )
        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

Examples of org.apache.maven.werkz.WerkzProject

    /**
     * @return the goal manager instance
     */
    protected WerkzProject getProject()
    {
        WerkzProject answer = null;
        ProjectTag tag = (ProjectTag) findAncestorWithClass( ProjectTag.class );
        if ( tag != null )
        {
            answer = tag.getProject();
        }
View Full Code Here

Examples of org.apache.maven.werkz.WerkzProject

        else
        {
            session = attainTag.getSession();
        }

        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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.