Package hudson.plugins.analysis.util

Examples of hudson.plugins.analysis.util.PluginLogger


        if (!acceptGoal(mojo.getGoal())) {
            return true;
        }

        Result currentResult = getCurrentResult(build);
        PluginLogger logger = new LoggerFactory(receiveSettingsFromMaster(build)).createLogger(listener.getLogger(), pluginName);

        if (!canContinue(currentResult)) {
            logger.log("Skipping reporter since build result is " + currentResult);
            return true;
        }

        if (hasResultAction(build)) {
            return true;
        }

        ParserResult result;
        try {
            result = perform(build, pom, mojo, logger);

            if (result.getModules().isEmpty() && result.getNumberOfAnnotations() == 0) {
                logger.log("No report found for mojo " + mojo.getGoal());
                return true;
            }
        }
        catch (InterruptedException exception) {
            logger.log(exception.getMessage());

            return false;
        }
        logger.logLines(result.getLogMessages());

        setEncoding(pom, result, logger);
        registerResultsOnMaster(build, result, logger);
        copyFilesWithAnnotationsToBuildFolder(logger, build.getRootDir(), result.getAnnotations());
View Full Code Here


    @SuppressWarnings({"serial", "PMD.AvoidFinalLocalVariable"})
    @Override
    public final boolean postExecute(final MavenBuildProxy build, final MavenProject pom, final MojoInfo mojo,
            final BuildListener listener, final Throwable error) throws InterruptedException, IOException {
        PluginLogger logger = new LoggerFactory().createLogger(listener.getLogger(), pluginName);
        if (!acceptGoal(mojo.getGoal())) {
            return true;
        }
        Result currentResult = getCurrentResult(build);
        if (!canContinue(currentResult)) {
            logger.log("Skipping reporter since build result is " + currentResult);
            return true;
        }

        if (hasResultAction(build)) {
            logger.log("Skipping maven reporter: there is already a result available.");
            return true;
        }

        final ParserResult result = perform(build, pom, mojo, logger);

        defaultEncoding = pom.getProperties().getProperty("project.build.sourceEncoding");
        if (defaultEncoding == null) {
            logger.log(Messages.Reporter_Error_NoEncoding(Charset.defaultCharset().displayName()));
            result.addErrorMessage(pom.getName(), Messages.Reporter_Error_NoEncoding(Charset.defaultCharset().displayName()));
        }

        build.execute(new BuildCallable<Void, IOException>() {
            @Override
View Full Code Here

    }

    @Override
    public final boolean perform(final AbstractBuild<?, ?> build, final Launcher launcher,
            final BuildListener listener) throws InterruptedException, IOException {
        PluginLogger logger = new LoggerFactory().createLogger(listener.getLogger(), pluginName);
        if (canContinue(build.getResult())) {
            return perform(build, launcher, logger);
        }
        else {
            logger.log("Skipping publisher since build result is " + build.getResult());
            return true;
        }
    }
View Full Code Here

TOP

Related Classes of hudson.plugins.analysis.util.PluginLogger

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.