Commit 9b6c9eee authored by Andy Wilkinson's avatar Andy Wilkinson

Merge branch '1.4.x' into 1.5.x

parents 5b66ffbb 7e8c5f59
...@@ -73,7 +73,9 @@ public class SpringApplicationRunner { ...@@ -73,7 +73,9 @@ public class SpringApplicationRunner {
this.compiler = new GroovyCompiler(configuration); this.compiler = new GroovyCompiler(configuration);
int level = configuration.getLogLevel().intValue(); int level = configuration.getLogLevel().intValue();
if (level <= Level.FINER.intValue()) { if (level <= Level.FINER.intValue()) {
System.setProperty("groovy.grape.report.downloads", "true"); System.setProperty(
"org.springframework.boot.cli.compiler.grape.ProgressReporter",
"detail");
System.setProperty("trace", "true"); System.setProperty("trace", "true");
} }
else if (level <= Level.FINE.intValue()) { else if (level <= Level.FINE.intValue()) {
...@@ -82,6 +84,9 @@ public class SpringApplicationRunner { ...@@ -82,6 +84,9 @@ public class SpringApplicationRunner {
else if (level == Level.OFF.intValue()) { else if (level == Level.OFF.intValue()) {
System.setProperty("spring.main.banner-mode", "OFF"); System.setProperty("spring.main.banner-mode", "OFF");
System.setProperty("logging.level.ROOT", "OFF"); System.setProperty("logging.level.ROOT", "OFF");
System.setProperty(
"org.springframework.boot.cli.compiler.grape.ProgressReporter",
"none");
} }
} }
......
/* /*
* Copyright 2012-2015 the original author or authors. * Copyright 2012-2016 the original author or authors.
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
...@@ -93,11 +93,26 @@ public class AetherGrapeEngine implements GrapeEngine { ...@@ -93,11 +93,26 @@ public class AetherGrapeEngine implements GrapeEngine {
} }
private ProgressReporter getProgressReporter(DefaultRepositorySystemSession session) { private ProgressReporter getProgressReporter(DefaultRepositorySystemSession session) {
if (Boolean.getBoolean("groovy.grape.report.downloads")) { String progressReporter = System.getProperty(
"org.springframework.boot.cli.compiler.grape.ProgressReporter");
if ("detail".equals(progressReporter)
|| Boolean.getBoolean("groovy.grape.report.downloads")) {
return new DetailedProgressReporter(session, System.out); return new DetailedProgressReporter(session, System.out);
} }
else if ("none".equals(progressReporter)) {
return new ProgressReporter() {
@Override
public void finished() {
}
};
}
else {
return new SummaryProgressReporter(session, System.out); return new SummaryProgressReporter(session, System.out);
} }
}
@Override @Override
public Object grab(Map args) { public Object grab(Map args) {
...@@ -340,4 +355,5 @@ public class AetherGrapeEngine implements GrapeEngine { ...@@ -340,4 +355,5 @@ public class AetherGrapeEngine implements GrapeEngine {
throw new UnsupportedOperationException( throw new UnsupportedOperationException(
"Grabbing an endorsed module is not supported"); "Grabbing an endorsed module is not supported");
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment