Examples of XmlPlexusConfiguration


Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

                //   </child>
                // </configuration>
                //
                // ----------------------------------------------------------------------

                XmlPlexusConfiguration processedChild = new XmlPlexusConfiguration( child.getName() );

                copyAttributes( child, processedChild );

                processed.addChild( processedChild );
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

    protected void initializeConfiguration( ContainerConfiguration c )
        throws PlexusConfigurationException, ContextException, IOException
    {
        // We need an empty plexus configuration for merging. This is a function of removing the
        // plexus-boostrap.xml file.
        configuration = new XmlPlexusConfiguration( "plexus" );

        if ( configurationReader != null )
        {
            // User userConfiguration
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

    // components                         | user
    // -----------------------------------+-----------------------------------------------------------------

    public static PlexusConfiguration merge( PlexusConfiguration user, PlexusConfiguration system )
    {
        PlexusConfiguration mergedConfiguration = new XmlPlexusConfiguration( "plexus" );

        // ----------------------------------------------------------------------
        // Load on start
        // ----------------------------------------------------------------------

        PlexusConfiguration loadOnStart = user.getChild( "load-on-start" );

        if ( loadOnStart.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( loadOnStart );
        }

        // ----------------------------------------------------------------------
        // System properties
        // ----------------------------------------------------------------------

        PlexusConfiguration systemProperties = user.getChild( "system-properties" );

        if ( systemProperties.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( systemProperties );
        }

        // ----------------------------------------------------------------------
        // Configurations directory
        // ----------------------------------------------------------------------

        PlexusConfiguration[] configurationsDirectories = user.getChildren( "configurations-directory" );

        if ( configurationsDirectories.length != 0 )
        {
            for ( int i = 0; i < configurationsDirectories.length; i++ )
            {
                mergedConfiguration.addChild( configurationsDirectories[i] );
            }
        }

        // ----------------------------------------------------------------------
        // Logging
        // ----------------------------------------------------------------------

        PlexusConfiguration logging = user.getChild( "logging" );

        if ( logging.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( logging );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "logging" ) );
        }

        // ----------------------------------------------------------------------
        // Container initialization phases
        // ----------------------------------------------------------------------

        mergedConfiguration.addChild( system.getChild( "container-initialization") );

        mergedConfiguration.addChild( system.getChild( "component-lookup-manager") );

        // ----------------------------------------------------------------------
        // Component repository
        // ----------------------------------------------------------------------

        PlexusConfiguration componentRepository = user.getChild( "component-repository" );

        if ( componentRepository.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( componentRepository );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "component-repository" ) );
        }

        // ----------------------------------------------------------------------
        // Resources
        // ----------------------------------------------------------------------

        copyResources( system, mergedConfiguration );

        copyResources( user, mergedConfiguration );

        // ----------------------------------------------------------------------
        // Component manager manager
        // ----------------------------------------------------------------------

        PlexusConfiguration componentManagerManager =  user.getChild( "component-manager-manager" );

        if ( componentManagerManager.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( componentManagerManager );

            copyComponentManagers( system.getChild( "component-manager-manager" ), componentManagerManager );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "component-manager-manager" ) );
        }

        // ----------------------------------------------------------------------
        // Component discoverer manager
        // ----------------------------------------------------------------------

        PlexusConfiguration componentDiscovererManager =  user.getChild( "component-discoverer-manager" );

        if ( componentDiscovererManager.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( componentDiscovererManager );

            copyComponentDiscoverers( system.getChild( "component-discoverer-manager" ), componentDiscovererManager );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "component-discoverer-manager" ) );
        }

        // ----------------------------------------------------------------------
        // Component factory manager
        // ----------------------------------------------------------------------

        PlexusConfiguration componentFactoryManager =  user.getChild( "component-factory-manager" );

        if ( componentFactoryManager.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( componentFactoryManager );

            copyComponentFactories( system.getChild( "component-factory-manager" ), componentFactoryManager );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "component-factory-manager" ) );
        }

        // ----------------------------------------------------------------------
        // Lifecycle handler managers
        // ----------------------------------------------------------------------

        PlexusConfiguration lifecycleHandlerManager = user.getChild( "lifecycle-handler-manager" );

        if ( lifecycleHandlerManager.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( lifecycleHandlerManager );

            copyLifecycles( system.getChild( "lifecycle-handler-manager" ), lifecycleHandlerManager );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "lifecycle-handler-manager" ) );
        }

        // ----------------------------------------------------------------------
        // Component factory manager
        // ----------------------------------------------------------------------

        PlexusConfiguration componentComposerManager =  user.getChild( "component-composer-manager" );

        if ( componentComposerManager.getChildCount() != 0 )
        {
            mergedConfiguration.addChild( componentComposerManager );

            copyComponentComposers( system.getChild( "component-composer-manager" ), componentComposerManager );
        }
        else
        {
            mergedConfiguration.addChild( system.getChild( "component-composer-manager" ) );
        }

        // ----------------------------------------------------------------------
        // Components
        // ----------------------------------------------------------------------
        // We grab the system components first and then add the user defined
        // components so that user defined components will win. When component
        // descriptors are processed the last definition wins because the component
        // descriptors are stored in a Map in the component repository.
        // ----------------------------------------------------------------------

        PlexusConfiguration components = system.getChild( "components" );

        mergedConfiguration.addChild( components );

        copyComponents( user.getChild( "components" ), components );

        return mergedConfiguration;
    }
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

    protected void initializeConfiguration( ContainerConfiguration c )
    throws PlexusConfigurationException, ContextException, IOException
{
    // We need an empty plexus configuration for merging. This is a function of removing the
    // plexus-boostrap.xml file.
    configuration = new XmlPlexusConfiguration( "plexus" );

    if ( configurationReader != null )
    {
        // User userConfiguration
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

            PlexusConfiguration pomConfiguration;

            if ( dom == null )
            {
                pomConfiguration = new XmlPlexusConfiguration( "configuration" );
            }
            else
            {
                pomConfiguration = new XmlPlexusConfiguration( dom );
            }

            ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, mojoExecution );

            populatePluginFields( mojo, mojoDescriptor, pluginRealm, pomConfiguration, expressionEvaluator );
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

                    {
                        dom.removeChild( i );
                    }
                }

                XmlPlexusConfiguration config = new XmlPlexusConfiguration( dom );
                configProps.put( "aether.connector.wagon.config." + server.getId(), config );
            }

            configProps.put( "aether.connector.perms.fileMode." + server.getId(), server.getFilePermissions() );
            configProps.put( "aether.connector.perms.dirMode." + server.getId(), server.getDirectoryPermissions() );
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

            log.debug( "configureWagon server " + id );

            if ( id != null && id.equals( repositoryId ) && ( server.getConfiguration() != null ) )
            {
                final PlexusConfiguration plexusConf =
                    new XmlPlexusConfiguration( (Xpp3Dom) server.getConfiguration() );

                ComponentConfigurator componentConfigurator = null;
                try
                {
                    componentConfigurator =
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

            PlexusConfiguration pomConfiguration;

            if ( dom == null )
            {
                pomConfiguration = new XmlPlexusConfiguration( "configuration" );
            }
            else
            {
                pomConfiguration = new XmlPlexusConfiguration( dom );
            }

            ExpressionEvaluator expressionEvaluator = new PluginParameterExpressionEvaluator( session, mojoExecution );

            populatePluginFields( mojo, mojoDescriptor, pluginRealm, pomConfiguration, expressionEvaluator );
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

        if ( repositoryId == null || configuration == null )
        {
            throw new IllegalArgumentException( "arguments can't be null" );
        }

        final XmlPlexusConfiguration xmlConf = new XmlPlexusConfiguration( configuration );

        serverConfigurationMap.put( repositoryId, xmlConf );
    }
View Full Code Here

Examples of org.codehaus.plexus.configuration.xml.XmlPlexusConfiguration

                    {
                        dom.removeChild( i );
                    }
                }

                XmlPlexusConfiguration config = new XmlPlexusConfiguration( dom );
                configProps.put( "aether.connector.wagon.config." + server.getId(), config );
            }

            configProps.put( "aether.connector.perms.fileMode." + server.getId(), server.getFilePermissions() );
            configProps.put( "aether.connector.perms.dirMode." + server.getId(), server.getDirectoryPermissions() );
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.