Java源码示例:org.codehaus.plexus.context.Context

示例1
/**
 * {@inheritDoc}
 */
public void contextualize(Context context) throws ContextException {
	container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
	if (container.hasComponent(SettingsDecrypter.class)) {
		try {
			settingsDecrypter = container.lookup(SettingsDecrypter.class);
		} catch (ComponentLookupException e) {
			getLog().warn("Failed to lookup build in maven component session decrypter.", e);
		}
	}
}
 
示例2
/**
 * Gets the list of watchers from the given Plexus context.
 *
 * @param context the Plexus context
 * @return the list of watcher, empty if none. Modifying the resulting list, updates the stored list.
 */
static synchronized List<Watcher> get(Context context) {
    List<Watcher> watchers;
    if (context.contains(WATCHERS_KEY)) {
        try {
            watchers = (List<Watcher>) context.get(WATCHERS_KEY);
        } catch (ContextException e) {
            throw new IllegalStateException("Cannot extract the watcher from the context", e);
        }
    } else {
        watchers = new ArrayList<>();
        context.put(WATCHERS_KEY, watchers);
    }
    return watchers;
}
 
示例3
@Override
public void contextualize(Context context) throws ContextException {
    plexusContainer = ((PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY));
}
 
示例4
/**
 * {@inheritDoc}
 */
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例5
@Override
public void contextualize(Context context) throws ContextException {
  container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例6
/**
 * {@inheritDoc}
 */
public void contextualize( Context context )
    throws ContextException
{
    container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
示例7
/**
 * {@inheritDoc}
 */
public void contextualize( final Context context )
        throws ContextException
{
    container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
示例8
@Override
public void contextualize(Context context) throws ContextException {
    authConfigFactory = new AuthConfigFactory((PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY));
}
 
示例9
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例10
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
}
 
示例11
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例12
public void contextualize(Context context) throws ContextException {
    plexusContainer = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例13
/**
 * Retrieves the Plexus container.
 *
 * @param context the context
 * @throws ContextException if the container cannot be retrieved.
 */
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例14
/**
 * Retrieves the Plexus container.
 *
 * @param context the context
 * @throws ContextException if the container cannot be retrieved.
 */
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}
 
示例15
/**
 * Creates a 'watching' pipeline.
 * @param context the Plexus context
 * @param baseDir the project's base directory
 * @param mojo the 'run' mojo
 * @param pomFileMonitoring flag enabling or disabling the pom file monitoring
 * @return the created pipeline
 */
public static Pipeline watchers(Context context, File baseDir, Mojo mojo, boolean pomFileMonitoring) {
    return new Pipeline(mojo, baseDir, Watchers.all(context), pomFileMonitoring);
}
 
示例16
/**
 * Registers a watcher.
 *
 * @param context the Plexus context
 * @param watcher the watcher to add
 */
public static synchronized void add(Context context, Watcher watcher) {
    get(context).add(watcher);
}
 
示例17
/**
 * Gets a copy of the list of watchers from the given Plexus context.
 *
 * @param context the Plexus context
 * @return a copy of the watcher list, empty if none.
 */
public static synchronized List<Watcher> all(Context context) {
    return new ArrayList<>(get(context));
}
 
示例18
/**
 * Retrieves the Plexus container.
 * @param context the context
 * @throws ContextException if the container cannot be retrieved.
 */
@Override
public void contextualize(Context context) throws ContextException {
    container = (PlexusContainer) context.get(PlexusConstants.PLEXUS_KEY);
}