Package org.codehaus.plexus.component.repository

Examples of org.codehaus.plexus.component.repository.ComponentRepository


    implements ContainerInitializationPhase
{
    public void execute( ContainerInitializationContext context )
        throws ContainerInitializationException
    {
        ComponentRepository repository = getComponentRepository( context );

        LifecycleHandlerManager lifecycleHandlerManager = getLifecycleHandlerManager( context );

        ComponentRegistry componentRegistry = new DefaultComponentRegistry( context.getContainer(),
            repository,
View Full Code Here


    }

    private ComponentRepository getComponentRepository( ContainerInitializationContext context )
        throws ContainerInitializationException
    {
        ComponentRepository repository = context.getContainerConfiguration().getComponentRepository();

        // Add the components defined in the container xml configuration
        try
        {
            PlexusConfiguration configuration = context.getContainerXmlConfiguration();

            PlexusConfiguration[] componentConfigurations = configuration.getChild( "components" ).getChildren( "component" );
            for ( PlexusConfiguration componentConfiguration : componentConfigurations )
            {
                ComponentDescriptor<?> componentDescriptor = PlexusTools.buildComponentDescriptor( componentConfiguration, context.getContainer().getContainerRealm() );
                componentDescriptor.setRealm( context.getContainer().getContainerRealm() );
                repository.addComponentDescriptor( componentDescriptor );
            }
        }
        catch ( PlexusConfigurationException e )
        {
            throw new ContainerInitializationException( "Error initializing component repository: " + "Cannot unmarshall component descriptor: ", e );
View Full Code Here

public class InitializeComponentRegistryPhase implements ContainerInitializationPhase
{
    public void execute( ContainerInitializationContext context )
        throws ContainerInitializationException
    {
        ComponentRepository repository = getComponentRepository( context );

        LifecycleHandlerManager lifecycleHandlerManager = getLifecycleHandlerManager( context );

        ComponentRegistry componentRegistry = new DefaultComponentRegistry( context.getContainer(),
            repository,
View Full Code Here

    }

    private ComponentRepository getComponentRepository( ContainerInitializationContext context )
        throws ContainerInitializationException
    {
        ComponentRepository repository = context.getContainerConfiguration().getComponentRepository();

        // Add the components defined in the container xml configuration
        try
        {
            PlexusConfiguration configuration = context.getContainerXmlConfiguration();

            PlexusConfiguration[] componentConfigurations = configuration.getChild( "components" ).getChildren( "component" );
            for ( PlexusConfiguration componentConfiguration : componentConfigurations )
            {
                ComponentDescriptor<?> componentDescriptor = PlexusTools.buildComponentDescriptor( componentConfiguration );
                componentDescriptor.setRealm( context.getContainer().getContainerRealm() );
                repository.addComponentDescriptor( componentDescriptor );
            }
        }
        catch ( PlexusConfigurationException e )
        {
            throw new ContainerInitializationException( "Error initializing component repository: " +
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.component.repository.ComponentRepository

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.