Package org.codehaus.plexus.configuration

Examples of org.codehaus.plexus.configuration.PlexusConfigurationException


            return result;
        }
        catch ( PlexusConfigurationException e )
        {
            throw new PlexusConfigurationException( "PlexusConfigurationException building configuration from: " + resourceName, e );
        }
        catch ( IOException e )
        {
            throw new PlexusConfigurationException( "IO error building configuration from: " + resourceName, e );
        }
    }
View Full Code Here


            return result;
        }
        catch ( PlexusConfigurationException e )
        {
            throw new PlexusConfigurationException( "PlexusConfigurationException building configuration from: " + resourceName, e );
        }
        catch ( IOException e )
        {
            throw new PlexusConfigurationException( "IO error building configuration from: " + resourceName, e );
        }
    }
View Full Code Here

        throws PlexusConfigurationException
    {
        String implementation = configuration.getChild( "implementation" ).getValue();
        if (implementation == null)
        {
            throw new PlexusConfigurationException( "implementation is null" );
        }

        ComponentDescriptor<?> cd;
        try
        {
            if ( realm != null )
            {
                Class<?> implementationClass = realm.loadClass( implementation );
                cd = new ComponentDescriptor(implementationClass, realm);
            }
            else
            {
                cd = new ComponentDescriptor();
                cd.setImplementation( implementation );
            }
        }
        catch ( Throwable e )
        {
            throw new PlexusConfigurationException("Can not load implementation class " + implementation +
                " from realm " + realm, e);
        }

        cd.setRole( configuration.getChild( "role" ).getValue() );
View Full Code Here

            return new XmlPlexusConfiguration( dom );
        }
        catch ( XmlPullParserException e )
        {
            throw new PlexusConfigurationException( "Failed to parse configuration resource!\nError was: \'"
                + e.getLocalizedMessage() + "\'", e );
        }
    }
View Full Code Here

                        continue;
                    }
                }
                catch ( PlexusConfigurationException e )
                {
                    throw new PlexusConfigurationException( "Cannot build component descriptor from resource found in:\n" + Arrays.asList( realm.getURLs() ), e );
                }

                componentDescriptor.setComponentType( "plexus" );

                componentDescriptor.setComponentSetDescriptor( componentSetDescriptor );
View Full Code Here

        {
            resources = realm.getResources( getComponentDescriptorLocation() );
        }
        catch ( IOException e )
        {
            throw new PlexusConfigurationException( "Unable to retrieve resources for: " + getComponentDescriptorLocation() + " in class realm: " + realm.getId() );
        }

        for ( URL url : Collections.list( resources ))
        {
            Reader reader = null;
           
            try
            {
                URLConnection conn = url.openConnection();

                conn.setUseCaches( false );

                conn.connect();

                reader = ReaderFactory.newXmlReader( conn.getInputStream() );

                InterpolationFilterReader interpolationFilterReader = new InterpolationFilterReader( reader, new ContextMapAdapter( context ) );

                ComponentSetDescriptor componentSetDescriptor = createComponentDescriptors( interpolationFilterReader, url.toString(), realm );

                componentSetDescriptors.add( componentSetDescriptor );
            }
            catch ( IOException ex )
            {
                throw new PlexusConfigurationException( "Error reading configuration " + url, ex );
            }
            finally
            {
                IOUtil.close( reader );
            }
View Full Code Here

        catch (Exception e)
        {
            if (e instanceof PlexusConfigurationException)
                throw (PlexusConfigurationException) e;

            throw new PlexusConfigurationException("Could not configure type.", e);
        }
    }
View Full Code Here

        catch (Exception e)
        {
            if ( e instanceof PlexusConfigurationException )
                throw (PlexusConfigurationException) e;

            throw new PlexusConfigurationException( "Could not configure type.", e );
        }
    }
View Full Code Here

        {
            return new XmlPlexusConfiguration( Xpp3DomBuilder.build( configuration ) );
        }
        catch ( IOException e )
        {
            throw new PlexusConfigurationException( "Error creating configuration", e );
        }
        catch ( XmlPullParserException e )
        {
            throw new PlexusConfigurationException( "Error creating configuration", e );
        }
    }
View Full Code Here

        {
            return new XmlPlexusConfiguration( Xpp3DomBuilder.build( configuration ) );
        }
        catch ( IOException e )
        {
            throw new PlexusConfigurationException( "Error creating configuration", e );
        }
        catch ( XmlPullParserException e )
        {
            throw new PlexusConfigurationException( "Error creating configuration", e );
        }
    }
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.configuration.PlexusConfigurationException

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.