src/main/java/org/codehaus/plexus/archiver/AbstractArchiver.java
public void contextualize( final Context context )
        throws ContextException
    {
        final PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );

        try
        {
            archiverManager = (ArchiverManager) container.lookup( ArchiverManager.ROLE );
        }
        catch ( final ComponentLookupException e )
        {
            throw new ContextException( "Error retrieving ArchiverManager instance: " + e.getMessage(), e );
        }
    }
public void contextualize( final Context context )
        throws ContextException
    {
        final PlexusContainer container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );

        try
        {
            archiverManager = (ArchiverManager) container.lookup( ArchiverManager.ROLE );
        }
        catch ( final ComponentLookupException e )
        {
            throw new ContextException( "Error retrieving ArchiverManager instance: " + e.getMessage(), e );
        }
    }
public void contextualize ( final Context context ) throws ContextException { final PlexusContainer container = ( PlexusContainer ) context . get ( PlexusConstants . PLEXUS_KEY ) ; try { archiverManager = ( ArchiverManager ) container . lookup ( ArchiverManager . ROLE ) ; } catch ( final ComponentLookupException e ) { throw new ContextException ( "Error retrieving ArchiverManager instance: " + e . getMessage ( ) , e ) ; } }
Allows us to pull the ArchiverManager instance out of the container without causing a chicken-and-egg
instantiation/composition problem.
Allows us to pull the ArchiverManager instance out of the container without causing a chicken - and - egg instantiation / composition problem .