org.codehaus.mojo.tools.context
Class BuildAdvisor

java.lang.Object
  extended by org.codehaus.mojo.tools.context.BuildAdvisor
All Implemented Interfaces:
org.codehaus.plexus.logging.LogEnabled, org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable

public class BuildAdvisor
extends Object
implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable, org.codehaus.plexus.logging.LogEnabled

BuildAdvisor is a simple object storage/retrieval mechanism typically used to share state between cooperating plugins. Currently implemented as a temp file which will be converted into a MavenSession implementation with Maven 3.0. No support for delete.


Field Summary
static String ROLE
          Defines the Plexus ROLE, which is a standard plexus setup requirement
static String ROLE_HINT
          Defines the Plexus ROLE_HINT which allows plexus to chose one implementation of a component vs another implementation
 
Constructor Summary
BuildAdvisor()
          Method called during plexus container initialization
 
Method Summary
 void contextualize(org.codehaus.plexus.context.Context mycontext)
          Standard plexus mechanism to retrieve the invoking Plexus container calling BuildAdvisor
 void enableLogging(org.codehaus.plexus.logging.Logger mylogger)
          Standard plexus mechanism to enable logging
protected  org.codehaus.plexus.logging.Logger getLogger()
          Standard plexus mechanism to get the logging object
 boolean isProjectBuildSkipped(org.apache.maven.execution.MavenSession session)
          Helper function to check if the project build is to be skipped
 Object retrieve(org.apache.maven.execution.MavenSession session, String key)
          Retrieve an object that was stored previously into BuildAdvisor
 void skipProjectBuild(org.apache.maven.execution.MavenSession session)
          Helper function to store the need to skip the build this time around
 void store(org.apache.maven.execution.MavenSession session, String key, Object val)
          Store an object which can be read back by a pluggin later
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ROLE

public static final String ROLE
Defines the Plexus ROLE, which is a standard plexus setup requirement


ROLE_HINT

public static final String ROLE_HINT
Defines the Plexus ROLE_HINT which allows plexus to chose one implementation of a component vs another implementation

See Also:
Constant Field Values
Constructor Detail

BuildAdvisor

public BuildAdvisor()
Method called during plexus container initialization

Method Detail

skipProjectBuild

public void skipProjectBuild(org.apache.maven.execution.MavenSession session)
Helper function to store the need to skip the build this time around


isProjectBuildSkipped

public boolean isProjectBuildSkipped(org.apache.maven.execution.MavenSession session)
Helper function to check if the project build is to be skipped


store

public void store(org.apache.maven.execution.MavenSession session,
                  String key,
                  Object val)
Store an object which can be read back by a pluggin later


retrieve

public Object retrieve(org.apache.maven.execution.MavenSession session,
                       String key)
Retrieve an object that was stored previously into BuildAdvisor


contextualize

public void contextualize(org.codehaus.plexus.context.Context mycontext)
                   throws org.codehaus.plexus.context.ContextException
Standard plexus mechanism to retrieve the invoking Plexus container calling BuildAdvisor

Specified by:
contextualize in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
Throws:
org.codehaus.plexus.context.ContextException

enableLogging

public void enableLogging(org.codehaus.plexus.logging.Logger mylogger)
Standard plexus mechanism to enable logging

Specified by:
enableLogging in interface org.codehaus.plexus.logging.LogEnabled

getLogger

protected org.codehaus.plexus.logging.Logger getLogger()
Standard plexus mechanism to get the logging object



Copyright © 2005-2008 Codehaus. All Rights Reserved.