code: private Lifecycle getLifecycleForPhase( String phase )
          throws BuildFailureException, LifecycleExecutionException
      {
          Lifecycle lifecycle = (Lifecycle) getPhaseToLifecycleMap().get( phase );
  
          if ( lifecycle == null )
          {
              throw new BuildFailureException( "Unable to find lifecycle for phase '" + phase + "'" );
          }
          return lifecycle;
      }
docs: Gets the lifecycle for phase.
  
  @param phase the phase
  @return the lifecycle for phase
  @throws BuildFailureException the build failure exception
  @throws LifecycleExecutionException the lifecycle execution exception