Package org.gradle.logging

Examples of org.gradle.logging.ProgressLogger.completed()


            ProgressLogger op = progressLoggerFactory.newOperation(FileCacheBackedScriptClassCompiler.class)
                    .start("Compile script into cache", "Compiling script into cache");
            try {
                delegate.execute(cache);
            } finally {
                op.completed();
            }
        }
    }
}
View Full Code Here


            progressLogger.setDescription(String.format("Download %s", address));
            progressLogger.started();
            try {
                new Download("Gradle Tooling API", GradleVersion.current().getVersion()).download(address, destination);
            } finally {
                progressLogger.completed();
            }
        }
    }

    private static class InstalledDistribution implements Distribution {
View Full Code Here

            progressLogger.setDescription("Validate distribution");
            progressLogger.started();
            try {
                return getToolingImpl();
            } finally {
                progressLogger.completed();
            }
        }

        private ClassPath getToolingImpl() {
            if (!gradleHomeDir.exists()) {
View Full Code Here

        LinkedList<ProgressLogger> loggers = progressLoggers.get();
        if (loggers.isEmpty()) {
            throw new IllegalStateException("Logging operation was not started or it has already completed.");
        }
        ProgressLogger logger = loggers.removeLast();
        logger.completed();
        if (loggers.isEmpty()) {
            progressLoggers.remove();
        }
    }
}
View Full Code Here

        lock.lock();
        try {
            return delegate.create(distribution, progressLoggerFactory, connectionParameters, cancellationToken);
        } finally {
            lock.unlock();
            logger.completed();
        }
    }

    public void close() {
        lock.lock();
View Full Code Here

            progressLogger.setDescription("Build");
            progressLogger.started();
            try {
                return actionExecutor.run(action);
            } finally {
                progressLogger.completed();
            }
        } finally {
            listenerManager.removeListener(listener);
        }
    }
View Full Code Here

        } catch (ConnectException e) {
            logger.info("Jetty not running!");
        } catch (Exception e) {
            logger.error("Exception during stopping", e);
        } finally {
            progressLogger.completed();
        }
    }

    /**
     * Returns the TCP port to use to send stop command.
View Full Code Here

            startConsoleScanner();

        } catch (Exception e) {
            throw new GradleException("Could not start the Jetty server.", e);
        } finally {
            progressLogger.completed();
        }

        progressLogger = progressLoggerFactory.newOperation(AbstractJettyRunTask.class)
                .start(String.format("Run Jetty at http://localhost:%d/%s", getHttpPort(), getContextPath()),
                        String.format("Running at http://localhost:%d/%s", getHttpPort(), getContextPath()));
View Full Code Here

            // keep the thread going if not in daemon mode
            server.join();
        } catch (Exception e) {
            throw new GradleException("Failed to wait for the Jetty server to stop.", e);
        } finally {
            progressLogger.completed();
        }
    }

    public abstract void restartWebApp(boolean reconfigureScanner) throws Exception;
View Full Code Here

        if (configurationProgress != null) {
            ProgressLogger logger = projectConfigurationProgress.remove(projectPath);
            if (logger == null) {
                throw new IllegalStateException("Unexpected afterEvaluate event received without beforeEvaluate");
            }
            logger.completed();
            configurationProgress.progress(configurationProgressFormatter.incrementAndGetProgress());
        }
    }

    public ProgressLogger getLogger() {
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.