Package org.apache.maven.util

Examples of org.apache.maven.util.InsertionOrderedSet


    Set resolveJellyScriptHousings( String goal )
        throws NoSuchGoalException
    {
        log.debug( "preparing goal: " + goal );

        Set pluginSet = new InsertionOrderedSet();

        Goal[] chain = getExecutionChain( goal, goalProject );
        log.debug( "execution chain: " + Arrays.asList( chain ).toString() );

        for ( int i = 0; i < chain.length; i++ )
        {
            Goal g = chain[i];
            Object plugin = goalPluginMap.get( g.getName() );
            if ( plugin == null )
            {
                throw new NoSuchGoalException( g.getName() );
            }
            pluginSet.add( plugin );
            Collection decorators = getPostGoalDecorators( g.getName() );
            if ( log.isDebugEnabled() && !decorators.isEmpty() )
            {
                log.debug( "goal " + g.getName() + " has postGoal decorators " + decorators );
            }
            pluginSet.addAll( decorators );
            decorators = getPreGoalDecorators( g.getName() );
            if ( log.isDebugEnabled() && !decorators.isEmpty() )
            {
                log.debug( "goal " + g.getName() + " has preGoal decorators " + decorators );
            }
            pluginSet.addAll( decorators );
        }

        // Done like this as the dynatag plugin dependencies must be first in the list
        InsertionOrderedSet newPluginSet = resolveDynaTagPlugins( pluginSet );
        if ( log.isDebugEnabled() && !newPluginSet.isEmpty() )
        {
            log.debug( "dynatag dependencies: " + newPluginSet );
        }
        newPluginSet.addAll( pluginSet );
        pluginSet = newPluginSet;

        // Here we make the resolved plugins field be the full set of plugins, and the plugins returned just the
        // additional ones resolved.
        // TODO: skip the remove step - don't add if it is already loaded
View Full Code Here


     */
    private InsertionOrderedSet resolveDynaTagPlugins( Set plugins )
    {
        // Important to return an insertion ordered set as the calling function is going to add to it and
        // depends on these remaining first
        InsertionOrderedSet resolvedDynaTagPlugins = new InsertionOrderedSet();

        for ( Iterator i = plugins.iterator(); i.hasNext(); )
        {
            JellyScriptHousing plugin = (JellyScriptHousing) i.next();
            Set dynaTagDeps = getPluginDynaTagDeps( plugin );

            for ( Iterator j = dynaTagDeps.iterator(); j.hasNext(); )
            {
                LinkedList dynaTagUris = new LinkedList();
                Set seen = new HashSet();

                Object next = j.next();
                dynaTagUris.add( next );

                while ( !dynaTagUris.isEmpty() )
                {
                    String dynaTagUri = (String) dynaTagUris.removeFirst();

                    if ( seen.contains( dynaTagUri ) )
                    {
                        continue;
                    }

                    seen.add( dynaTagUri );

                    Object dynaTagPluginHome = dynaTagPluginMap.get( dynaTagUri );
                    if ( dynaTagPluginHome == null )
                    {
                        // This is essentially allowed for bootstrap so
                        // plugins can import taglibs they don't use until later
                        log.warn( "Tag library requested that is not present: '" + dynaTagUri + "' in plugin: '"
                            + plugin.getName() + "'" );
                    }
                    else
                    {
                        Set set = getPluginDynaTagDeps( dynaTagPluginHome );
                        dynaTagUris.addAll( set );
                        resolvedDynaTagPlugins.add( dynaTagPluginHome );
                    }
                }
            }
        }
        return resolvedDynaTagPlugins;
View Full Code Here

    Set resolveJellyScriptHousings( String goal )
        throws NoSuchGoalException
    {
        LOGGER.debug( "preparing goal: " + goal );

        Set pluginSet = new InsertionOrderedSet();

        Goal[] chain = getExecutionChain( goal, goalProject );
        LOGGER.debug( "execution chain: " + Arrays.asList( chain ).toString() );

        for ( int i = 0; i < chain.length; i++ )
        {
            Goal g = chain[i];
            Object plugin = goalPluginMap.get( g.getName() );
            if ( plugin == null )
            {
                throw new NoSuchGoalException( g.getName() );
            }
            pluginSet.add( plugin );
            Collection decorators = getPostGoalDecorators( g.getName() );
            if ( LOGGER.isDebugEnabled() && !decorators.isEmpty() )
            {
                LOGGER.debug( "goal " + g.getName() + " has postGoal decorators " + decorators );
            }
            pluginSet.addAll( decorators );
            decorators = getPreGoalDecorators( g.getName() );
            if ( LOGGER.isDebugEnabled() && !decorators.isEmpty() )
            {
                LOGGER.debug( "goal " + g.getName() + " has preGoal decorators " + decorators );
            }
            pluginSet.addAll( decorators );
        }

        // Done like this as the dynatag plugin dependencies must be first in the list
        InsertionOrderedSet newPluginSet = resolveDynaTagPlugins( pluginSet );
        if ( LOGGER.isDebugEnabled() && !newPluginSet.isEmpty() )
        {
            LOGGER.debug( "dynatag dependencies: " + newPluginSet );
        }
        newPluginSet.addAll( pluginSet );
        pluginSet = newPluginSet;

        // Here we make the resolved plugins field be the full set of plugins, and the plugins returned just the
        // additional ones resolved.
        // TODO: skip the remove step - don't add if it is already loaded
View Full Code Here

     */
    private InsertionOrderedSet resolveDynaTagPlugins( Set plugins )
    {
        // Important to return an insertion ordered set as the calling function is going to add to it and
        // depends on these remaining first
        InsertionOrderedSet resolvedDynaTagPlugins = new InsertionOrderedSet();

        for ( Iterator i = plugins.iterator(); i.hasNext(); )
        {
            JellyScriptHousing plugin = (JellyScriptHousing) i.next();
            Set dynaTagDeps = getPluginDynaTagDeps( plugin );

            for ( Iterator j = dynaTagDeps.iterator(); j.hasNext(); )
            {
                LinkedList dynaTagUris = new LinkedList();
                Set seen = new HashSet();

                Object next = j.next();
                dynaTagUris.add( next );

                while ( !dynaTagUris.isEmpty() )
                {
                    String dynaTagUri = (String) dynaTagUris.removeFirst();

                    if ( seen.contains( dynaTagUri ) )
                    {
                        continue;
                    }

                    seen.add( dynaTagUri );

                    Object dynaTagPluginHome = dynaTagPluginMap.get( dynaTagUri );
                    if ( dynaTagPluginHome == null )
                    {
                        // This is essentially allowed for bootstrap so
                        // plugins can import taglibs they don't use until later
                        LOGGER.warn( "Tag library requested that is not present: '" + dynaTagUri + "' in plugin: '"
                            + plugin.getName() + "'" );
                    }
                    else
                    {
                        Set set = getPluginDynaTagDeps( dynaTagPluginHome );
                        dynaTagUris.addAll( set );
                        resolvedDynaTagPlugins.add( dynaTagPluginHome );
                    }
                }
            }
        }
        return resolvedDynaTagPlugins;
View Full Code Here

TOP

Related Classes of org.apache.maven.util.InsertionOrderedSet

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.