Package org.codehaus.plexus.logging

Examples of org.codehaus.plexus.logging.Logger


        request = new DefaultMavenExecutionRequest( localRepository, settings, eventDispatcher,
                                                    commandLine.getArgList(), userDir.getPath(), profileManager,
                                                    executionProperties, showErrors );

        // TODO [BP]: do we set one per mojo? where to do it?
        Logger logger = loggerManager.getLoggerForComponent( Mojo.ROLE );

        if ( logger != null )
        {
            request.addEventMonitor( new DefaultEventMonitor( logger ) );
        }
View Full Code Here


        request = new DefaultMavenExecutionRequest( localRepository, settings, eventDispatcher,
                                                    commandLine.getArgList(), userDir.getPath(), profileManager,
                                                    executionProperties, showErrors );

        // TODO [BP]: do we set one per mojo? where to do it?
        Logger logger = loggerManager.getLoggerForComponent( Mojo.ROLE );

        if ( logger != null )
        {
            request.addEventMonitor( new DefaultEventMonitor( logger ) );
        }
View Full Code Here

    }

    public void populatePluginDescriptor( MavenProject project, PluginDescriptor pluginDescriptor )
        throws ExtractionException, InvalidPluginDescriptorException
    {
        Logger logger = getLogger();

        logger.info( "Using " + mojoDescriptorExtractors.size() + " extractors." );

        for ( Iterator it = mojoDescriptorExtractors.entrySet().iterator(); it.hasNext(); )
        {
            Map.Entry entry = (Map.Entry) it.next();
            String language = (String) entry.getKey();
            MojoDescriptorExtractor extractor = (MojoDescriptorExtractor) entry.getValue();

            logger.info( "Applying extractor for language: " + language );

            List extractorDescriptors = extractor.execute( project, pluginDescriptor );

            logger.info( "Extractor for language: " + language + " found " + extractorDescriptors.size()
                + " mojo descriptors." );

            for ( Iterator descriptorIt = extractorDescriptors.iterator(); descriptorIt.hasNext(); )
            {
                MojoDescriptor descriptor = (MojoDescriptor) descriptorIt.next();

                logger.debug( "Adding mojo: " + descriptor + " to plugin descriptor." );

                descriptor.setPluginDescriptor( pluginDescriptor );

                pluginDescriptor.addMojo( descriptor );
            }
View Full Code Here

                    // doesn't try to do it again.
                    value = ReflectionValueExtractor.evaluate( realExpr, model, false );
                }
                catch ( Exception e )
                {
                    Logger logger = getLogger();
                    if ( logger != null )
                    {
                        logger.debug( "POM interpolation cannot proceed with expression: " + wholeExpr + ". Skipping...", e );
                    }
                }
            }

            if ( value == null )
View Full Code Here

        request = new DefaultMavenExecutionRequest( localRepository, settings, eventDispatcher,
                                                    commandLine.getArgList(), userDir.getPath(), profileManager,
                                                    executionProperties, showErrors );

        // TODO [BP]: do we set one per mojo? where to do it?
        Logger logger = loggerManager.getLoggerForComponent( Mojo.ROLE );

        if ( logger != null )
        {
            request.addEventMonitor( new DefaultEventMonitor( logger ) );
        }
View Full Code Here

        if ( src.indexOf( "${" ) < 0 )
        {
            return src;
        }
       
        Logger logger = getLogger();

        String result = src;
        synchronized( this )
        {
           
            for ( ValueSource vs : valueSources )
            {
                interpolator.addValueSource( vs );
            }
           
            for ( InterpolationPostProcessor postProcessor : postProcessors )
            {
                interpolator.addPostProcessor( postProcessor );
            }

            try
            {
                try
                {
                    result = interpolator.interpolate( result, recursionInterceptor );
                }
                catch( InterpolationException e )
                {
                    throw new ModelInterpolationException( e.getMessage(), e );
                }

                if ( debug )
                {
                    List<Object> feedback = interpolator.getFeedback();
                    if ( feedback != null && !feedback.isEmpty() )
                    {
                        logger.debug( "Maven encountered the following problems during initial POM interpolation:" );

                        Object last = null;
                        for ( Object next : feedback )
                        {
                            if ( next instanceof Throwable )
                            {
                                if ( last == null )
                                {
                                    logger.debug( "", ( (Throwable) next ) );
                                }
                                else
                                {
                                    logger.debug( String.valueOf( last ), ( (Throwable) next ) );
                                }
                            }
                            else
                            {
                                if ( last != null )
                                {
                                    logger.debug( String.valueOf( last ) );
                                }

                                last = next;
                            }
                        }

                        if ( last != null )
                        {
                            logger.debug( String.valueOf( last ) );
                        }
                    }
                }

                interpolator.clearFeedback();
View Full Code Here

    {
        this.currentThreshold = currentThreshold;

        for ( Iterator logs = loggers.values().iterator(); logs.hasNext(); )
        {
            Logger logger = (Logger) logs.next();
            logger.setThreshold( currentThreshold );
        }
    }
View Full Code Here

        return new ConsoleLogger( threshold, name );
    }

    public Logger getLoggerForComponent( String role, String roleHint )
    {
        Logger logger;
        String name;

        name = toMapKey( role, roleHint );
        logger = (Logger)loggers.get( name );
View Full Code Here

        if ( subCategory == null )
        {
            throw new IllegalStateException( "Logging category must be defined." );
        }

        Logger logger = this.logger.getChildLogger( subCategory );

        setupLogger( component, logger );
    }
View Full Code Here

                }
            }

            if ( mojo instanceof Mojo )
            {
                Logger mojoLogger = loggerManager.getLoggerForComponent( mojoDescriptor.getImplementation() );
                ( (Mojo) mojo ).setLog( new DefaultLog( mojoLogger ) );
            }

            Xpp3Dom dom = mojoExecution.getConfiguration();
View Full Code Here

TOP

Related Classes of org.codehaus.plexus.logging.Logger

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.