Package org.codehaus.plexus.context

Examples of org.codehaus.plexus.context.Context


        processCoreComponentConfiguration( "component-factory-manager", configurator, c );

        if ( componentFactoryManager instanceof Contextualizable )
        {
            Context context = getContext();

            context.put( PlexusConstants.PLEXUS_KEY, this );

            ( (Contextualizable) componentFactoryManager ).contextualize( getContext() );
        }

        // Component factory manager
View Full Code Here


    public void execute( Object object, ComponentManager manager )
        throws PhaseExecutionException
    {
        if ( object instanceof Contextualizable )
        {
            Context context = manager.getContainer().getContext();

            try
            {
                ( (Contextualizable) object ).contextualize( context );
            }
View Full Code Here

        processCoreComponentConfiguration( "component-factory-manager", configurator, c );

        if ( componentFactoryManager instanceof Contextualizable )
        {
            Context context = getContext();

            context.put( PlexusConstants.PLEXUS_KEY, this );

            ( (Contextualizable) componentFactoryManager ).contextualize( getContext() );
        }

        // Component factory manager
View Full Code Here

    public void execute( Object object, ComponentManager manager, ClassRealm lookupRealm )
        throws PhaseExecutionException
    {
        if ( object instanceof Contextualizable )
        {
            Context context = manager.getContainer().getContext();

            ClassRealm origRealm = manager.getContainer().setLookupRealm( lookupRealm );

            try
            {
View Full Code Here

    }

    private static Context getContextComponent( final ContainerConfiguration configuration )
    {
        final Map<?, ?> contextData = configuration.getContext();
        final Context contextComponent = configuration.getContextComponent();
        if ( null == contextComponent )
        {
            return new DefaultContext( contextData );
        }
        if ( null != contextData )
        {
            for ( final Entry<?, ?> entry : contextData.entrySet() )
            {
                contextComponent.put( entry.getKey(), entry.getValue() );
            }
        }
        return contextComponent;
    }
View Full Code Here

  private MojoInfo mojoInfo;
 
  private void setupContainer () {
   
    // Context Setup
    Context context = new DefaultContext();
    context.put("basedir", getBaseDir());
    customizeContext(context);
   
    if (!context.contains("plexus.home")) {
      File plexusHome = new File (getBaseDir(), "target/plexus-home");
      if (!plexusHome.isDirectory()) {
        plexusHome.mkdirs();
      }
      context.put("plexus.home", plexusHome.getAbsoluteFile());
    }
   
    log.debug("Setting up context:" + context.toString());
   
    // Configuration
    ContainerConfiguration containerConfiguration = new DefaultContainerConfiguration()
      .setName("test").setContext(context.getContextData());
   
    // String custom configuration
    containerConfiguration.setContainerConfiguration(getConfigurationName());
       
    customizeContainerConfiguration( containerConfiguration );
View Full Code Here

    protected GitHubClient createClient() {
      try
      {
        DefaultPlexusContainer container = new DefaultPlexusContainer();
        Context context = container.getContext();
        context.put( PlexusConstants.PLEXUS_KEY, container );
        super.contextualize(context );
      }
      catch ( PlexusContainerException pce )
      {
        pce.printStackTrace( System.err );
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.context.Context

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.