protected Set<Plugin> getBoundPlugins( LifecycleExecutor life, MavenProject project, String thePhases )
        throws PluginNotFoundException, LifecycleExecutionException, IllegalAccessException
    {

        Set<Plugin> allPlugins = new HashSet<Plugin>();

        // lookup the bindings for all the passed in phases
        String[] lifecyclePhases = thePhases.split( "," );
        for ( int i = 0; i < lifecyclePhases.length; i++ )
        {
            String lifecyclePhase = lifecyclePhases[i];
            if ( StringUtils.isNotEmpty( lifecyclePhase ) )
            {
                try
                {
                    Lifecycle lifecycle = getLifecycleForPhase( lifecyclePhase );
                    allPlugins.addAll( getAllPlugins( project, lifecycle ) );
                }
                catch ( BuildFailureException e )
                {
                    // i'm going to swallow this because the
                    // user may have declared a phase that
                    // doesn't exist for every module.
                }
            }
        }
        return allPlugins;
    }
protected Set < Plugin > getBoundPlugins ( LifecycleExecutor life , MavenProject project , String thePhases ) throws PluginNotFoundException , LifecycleExecutionException , IllegalAccessException { Set < Plugin > allPlugins = new HashSet < Plugin > ( ) ; String [ ] lifecyclePhases = thePhases . split ( "," ) ; for ( int i = 0 ; i < lifecyclePhases . length ; i ++ ) { String lifecyclePhase = lifecyclePhases [ i ] ; if ( StringUtils . isNotEmpty ( lifecyclePhase ) ) { try { Lifecycle lifecycle = getLifecycleForPhase ( lifecyclePhase ) ; allPlugins . addAll ( getAllPlugins ( project , lifecycle ) ) ; } catch ( BuildFailureException e ) { } } } return allPlugins ; }
Gets the plugins that are bound to the defined phases. This does not find plugins bound in the pom to a phase
later than the plugin is executing.

@param life the life
@param project the project
@param thePhases the the phases
@return the bound plugins
@throws PluginNotFoundException the plugin not found exception
@throws LifecycleExecutionException the lifecycle execution exception
@throws IllegalAccessException the illegal access exception