Examples of PlexusConfiguration


Examples of org.codehaus.plexus.configuration.PlexusConfiguration

    {
        PlexusConfiguration[] children = source.getChildren();

        for ( int i = 0; i < children.length; i++ )
        {
            PlexusConfiguration child = children[i];

            int count = child.getChildCount();

            if ( count > 0 )
            {
                // ----------------------------------------------------------------------
                // If we have a child with children itself then we must make a configuration
                // with the name of the child, add that child to the processed configuration
                // and walk the child.
                //
                // <configuration>
                //   <child>
                //     <entity>
                //       <foo>bar</foo>
                //     </entity>
                //   </child>
                // </configuration>
                //
                // ----------------------------------------------------------------------

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

                copyAttributes( child, processedChild );

                processed.addChild( processedChild );

                walk( child, processedChild, variables );
            }
            else
            {
                String elementName = child.getName();

                // ----------------------------------------------------------------------
                // Check to see if this element name matches the id of any of our
                // source resource handlers.
                // ----------------------------------------------------------------------
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

            for ( int i = 0; i < configurations.length; i++ )
            {
                File configurationFile = (File) files.get( i );

                PlexusConfiguration configuration = PlexusTools.buildConfiguration( configurationFile.getAbsolutePath(), new FileReader( configurationFile ) );

                configurations[i] = configuration;
            }

            return configurations;
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

    public boolean isSupported( final String useCaseId )
    {
        if ( useCaseConfigs != null )
        {
            PlexusConfiguration config = useCaseConfigs.getChild( useCaseId, false );

            if ( config != null && config.getChild( UNSUPPORTED_ELEMENT, false ) != null )
            {
                logger.info( "Test case '" + useCaseId + "' is marked as unsupported by this wagon." );
                return false;
            }
        }
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

    public boolean configureWagonForTest( final Wagon wagon, final String useCaseId )
        throws ComponentConfigurationException
    {
        if ( useCaseConfigs != null )
        {
            PlexusConfiguration config = useCaseConfigs.getChild( useCaseId, false );

            if ( config != null )
            {
                if ( config.getChild( UNSUPPORTED_ELEMENT, false ) != null )
                {
                    logger.error( "Test case '" + useCaseId + "' is marked as unsupported by this wagon." );
                    return false;
                }
                else
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

                }
            }

            // add configuration data
            if (shouldConfigure(descriptor )) {
                PlexusConfiguration configuration = descriptor.getConfiguration();
                if (configuration != null) {
                    for (String name : configuration.getAttributeNames()) {
                        String value;
                        try {
                            value = configuration.getAttribute(name);
                        } catch (PlexusConfigurationException e) {
                            throw new ComponentInstantiationException("Error getting value for attribute " + name, e);
                        }
                        name = fromXML(name);
                        recipe.setProperty(name, value);
                    }
                    for (PlexusConfiguration child : configuration.getChildren()) {
                        String name = child.getName();
                        name = fromXML(name);
                        if ( child.getChildCount() > 0 )
                        {
                            recipe.setProperty( name, new PlexusConfigurationRecipe( child ) );
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

        }

        MapConverter converter = new MapConverter();
        ConverterLookup converterLookup = new DefaultConverterLookup();
        DefaultExpressionEvaluator expressionEvaluator = new DefaultExpressionEvaluator();
        PlexusConfiguration configuration = container.getConfigurationSource().getConfiguration( descriptor );

        if ( configuration != null )
        {
            try
            {
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

        throws ContainerInitializationException
    {
        // 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() );
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

        if ( configurationReader != null )
        {
            // User userConfiguration

            PlexusConfiguration userConfiguration = PlexusTools.buildConfiguration( "<User Specified Configuration Reader>", getInterpolationConfigurationReader( configurationReader ) );

            // Merger of bootstrapConfiguration and user userConfiguration

            configuration = PlexusConfigurationMerger.merge( userConfiguration, configuration );
        }
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

    {
        try
        {
            XmlPlexusConfigurationReader reader = new XmlPlexusConfigurationReader();
           
            PlexusConfiguration result = reader.read( configuration );

            return result;
        }
        catch ( PlexusConfigurationException e )
        {
View Full Code Here

Examples of org.codehaus.plexus.configuration.PlexusConfiguration

        PlexusConfiguration[] requirements = configuration.getChild( "requirements" ).getChildren( "requirement" );

        for ( int i = 0; i < requirements.length; i++ )
        {
            PlexusConfiguration requirement = requirements[i];

            ComponentRequirement cr;

            PlexusConfiguration[] hints = requirement.getChild( "role-hints" ).getChildren( "role-hint" );
            if ( hints != null && hints.length > 0 )
            {
                cr = new ComponentRequirementList();

                List<String> hintList = new LinkedList<String>();
                for ( PlexusConfiguration hint : hints )
                {
                    hintList.add( hint.getValue() );
                }

                ( (ComponentRequirementList) cr ).setRoleHints( hintList );
            }
            else
            {
                cr = new ComponentRequirement();

                cr.setRoleHint( requirement.getChild( "role-hint" ).getValue() );
            }

            cr.setRole( requirement.getChild( "role" ).getValue() );

            cr.setFieldName( requirement.getChild( "field-name" ).getValue() );

            cd.addRequirement( cr );
        }

        return cd;
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.