Reformat code using Eclipse Mars

This commit is contained in:
Phillip Webb
2015-10-07 23:37:10 -07:00
parent e473364e4e
commit c9fb9916b8
408 changed files with 2831 additions and 2652 deletions

View File

@@ -47,8 +47,9 @@ public class InitCommand extends OptionParsingCommand {
}
public InitCommand(InitOptionHandler handler) {
super("init", "Initialize a new project using Spring "
+ "Initialzr (start.spring.io)", handler);
super("init",
"Initialize a new project using Spring " + "Initialzr (start.spring.io)",
handler);
}
@Override
@@ -124,8 +125,8 @@ public class InitCommand extends OptionParsingCommand {
@Override
protected void options() {
this.target = option(Arrays.asList("target"), "URL of the service to use")
.withRequiredArg().defaultsTo(
ProjectGenerationRequest.DEFAULT_SERVICE_URL);
.withRequiredArg()
.defaultsTo(ProjectGenerationRequest.DEFAULT_SERVICE_URL);
this.listCapabilities = option(Arrays.asList("list", "l"),
"List the capabilities of the service. Use it to discover the "
+ "dependencies and the types that are available");
@@ -138,7 +139,7 @@ public class InitCommand extends OptionParsingCommand {
"Project coordinates (for example 'org.test')").withRequiredArg();
this.artifactId = option(Arrays.asList("artifactId", "a"),
"Project coordinates; infer archive name (for example 'test')")
.withRequiredArg();
.withRequiredArg();
this.version = option(Arrays.asList("version", "v"),
"Project version (for example '0.0.1-SNAPSHOT')").withRequiredArg();
this.name = option(Arrays.asList("name", "n"),
@@ -146,8 +147,7 @@ public class InitCommand extends OptionParsingCommand {
this.description = option("description", "Project description")
.withRequiredArg();
this.packageName = option("package-name", "Package name").withRequiredArg();
this.type = option(
Arrays.asList("type", "t"),
this.type = option(Arrays.asList("type", "t"),
"Project type. Not normally needed if you use --build "
+ "and/or --format. Check the capabilities of the service "
+ "(--list) for more details").withRequiredArg();
@@ -155,21 +155,19 @@ public class InitCommand extends OptionParsingCommand {
"Project packaging (for example 'jar')").withRequiredArg();
this.build = option("build",
"Build system to use (for example 'maven' or 'gradle')")
.withRequiredArg().defaultsTo("maven");
this.format = option(
"format",
.withRequiredArg().defaultsTo("maven");
this.format = option("format",
"Format of the generated content (for example 'build' for a build file, "
+ "'project' for a project archive)").withRequiredArg()
.defaultsTo("project");
.defaultsTo("project");
this.javaVersion = option(Arrays.asList("java-version", "j"),
"Language level (for example '1.8')").withRequiredArg();
this.language = option(Arrays.asList("language", "l"),
"Programming language (for example 'java')").withRequiredArg();
this.bootVersion = option(Arrays.asList("boot-version", "b"),
"Spring Boot version (for example '1.2.0.RELEASE')")
.withRequiredArg();
this.dependencies = option(
Arrays.asList("dependencies", "d"),
.withRequiredArg();
this.dependencies = option(Arrays.asList("dependencies", "d"),
"Comma-separated list of dependency identifiers to include in the "
+ "generated project").withRequiredArg();
}
@@ -203,7 +201,8 @@ public class InitCommand extends OptionParsingCommand {
}
private void generateReport(OptionSet options) throws IOException {
Log.info(this.serviceCapabilitiesReport.generate(options.valueOf(this.target)));
Log.info(this.serviceCapabilitiesReport
.generate(options.valueOf(this.target)));
}
protected void generateProject(OptionSet options) throws IOException {

View File

@@ -73,8 +73,9 @@ import joptsimple.OptionSpec;
public class JarCommand extends OptionParsingCommand {
public JarCommand() {
super("jar", "Create a self-contained "
+ "executable jar file from a Spring Groovy script",
super("jar",
"Create a self-contained "
+ "executable jar file from a Spring Groovy script",
new JarOptionHandler());
}
@@ -91,14 +92,12 @@ public class JarCommand extends OptionParsingCommand {
@Override
protected void doOptions() {
this.includeOption = option(
"include",
this.includeOption = option("include",
"Pattern applied to directories on the classpath to find files to include in the resulting jar")
.withRequiredArg().withValuesSeparatedBy(",").defaultsTo("");
this.excludeOption = option(
"exclude",
.withRequiredArg().withValuesSeparatedBy(",").defaultsTo("");
this.excludeOption = option("exclude",
"Pattern applied to directories on the claspath to find files to exclude from the resulting jar")
.withRequiredArg().withValuesSeparatedBy(",").defaultsTo("");
.withRequiredArg().withValuesSeparatedBy(",").defaultsTo("");
}
@Override
@@ -109,8 +108,8 @@ public class JarCommand extends OptionParsingCommand {
"The name of the resulting jar and at least one source file must be specified");
File output = new File((String) nonOptionArguments.remove(0));
Assert.isTrue(output.getName().toLowerCase().endsWith(".jar"), "The output '"
+ output + "' is not a JAR file.");
Assert.isTrue(output.getName().toLowerCase().endsWith(".jar"),
"The output '" + output + "' is not a JAR file.");
deleteIfExists(output);
GroovyCompiler compiler = createCompiler(options);
@@ -131,8 +130,8 @@ public class JarCommand extends OptionParsingCommand {
private void deleteIfExists(File file) {
if (file.exists() && !file.delete()) {
throw new IllegalStateException("Failed to delete existing file "
+ file.getPath());
throw new IllegalStateException(
"Failed to delete existing file " + file.getPath());
}
}
@@ -164,7 +163,7 @@ public class JarCommand extends OptionParsingCommand {
private void writeJar(File file, Class<?>[] compiledClasses,
List<MatchedResource> classpathEntries, List<URL> dependencies)
throws FileNotFoundException, IOException, URISyntaxException {
throws FileNotFoundException, IOException, URISyntaxException {
final List<Library> libraries;
JarWriter writer = new JarWriter(file);
try {

View File

@@ -45,7 +45,7 @@ public class CompilerOptionHandler extends OptionHandler {
"Do not attempt to guess dependencies");
this.autoconfigureOption = option("autoconfigure",
"Add autoconfigure compiler transformations").withOptionalArg()
.ofType(Boolean.class).defaultsTo(true);
.ofType(Boolean.class).defaultsTo(true);
this.classpathOption = option(Arrays.asList("classpath", "cp"),
"Additional classpath entries").withRequiredArg();
doOptions();

View File

@@ -103,8 +103,8 @@ public abstract class AnnotatedNodeASTTransformation implements ASTTransformatio
.iterator();
while (annotationNodes.hasNext()) {
AnnotationNode annotationNode = annotationNodes.next();
if (this.interestingAnnotationNames.contains(annotationNode
.getClassNode().getName())) {
if (this.interestingAnnotationNames
.contains(annotationNode.getClassNode().getName())) {
this.annotationNodes.add(annotationNode);
if (this.removeAnnotations) {
annotationNodes.remove();

View File

@@ -164,7 +164,8 @@ public abstract class AstUtils {
return null;
}
private static List<ExpressionStatement> getExpressionStatements(BlockStatement block) {
private static List<ExpressionStatement> getExpressionStatements(
BlockStatement block) {
ArrayList<ExpressionStatement> statements = new ArrayList<ExpressionStatement>();
for (Statement statement : block.getStatements()) {
if (statement instanceof ExpressionStatement) {

View File

@@ -61,7 +61,8 @@ import groovy.grape.Grape;
* @since 1.3.0
*/
@Order(DependencyManagementBomTransformation.ORDER)
public class DependencyManagementBomTransformation extends AnnotatedNodeASTTransformation {
public class DependencyManagementBomTransformation
extends AnnotatedNodeASTTransformation {
/**
* The order of the transformation.
@@ -69,9 +70,9 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
public static final int ORDER = Ordered.HIGHEST_PRECEDENCE + 100;
private static final Set<String> DEPENDENCY_MANAGEMENT_BOM_ANNOTATION_NAMES = Collections
.unmodifiableSet(new HashSet<String>(Arrays.asList(
DependencyManagementBom.class.getName(),
DependencyManagementBom.class.getSimpleName())));
.unmodifiableSet(new HashSet<String>(
Arrays.asList(DependencyManagementBom.class.getName(),
DependencyManagementBom.class.getSimpleName())));
private final DependencyResolutionContext resolutionContext;
@@ -103,7 +104,8 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
private List<Map<String, String>> createDependencyMaps(Expression valueExpression) {
Map<String, String> dependency = null;
List<ConstantExpression> constantExpressions = getConstantExpressions(valueExpression);
List<ConstantExpression> constantExpressions = getConstantExpressions(
valueExpression);
List<Map<String, String>> dependencies = new ArrayList<Map<String, String>>(
constantExpressions.size());
for (ConstantExpression expression : constantExpressions) {
@@ -139,7 +141,8 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
return Collections.emptyList();
}
private List<ConstantExpression> getConstantExpressions(ListExpression valueExpression) {
private List<ConstantExpression> getConstantExpressions(
ListExpression valueExpression) {
List<ConstantExpression> expressions = new ArrayList<ConstantExpression>();
for (Expression expression : valueExpression.getExpressions()) {
if (expression instanceof ConstantExpression
@@ -147,8 +150,9 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
expressions.add((ConstantExpression) expression);
}
else {
reportError("Each entry in the array must be an "
+ "inline string constant", expression);
reportError(
"Each entry in the array must be an " + "inline string constant",
expression);
}
}
return expressions;
@@ -172,8 +176,8 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
request.setModelSource(new UrlModelSource(uri.toURL()));
request.setSystemProperties(System.getProperties());
Model model = modelBuilder.build(request).getEffectiveModel();
this.resolutionContext
.addDependencyManagement(new MavenModelDependencyManagement(model));
this.resolutionContext.addDependencyManagement(
new MavenModelDependencyManagement(model));
}
catch (Exception ex) {
throw new IllegalStateException("Failed to build model for '" + uri
@@ -191,14 +195,15 @@ public class DependencyManagementBomTransformation extends AnnotatedNodeASTTrans
}
private void reportError(String message, ASTNode node) {
getSourceUnit().getErrorCollector().addErrorAndContinue(
createSyntaxErrorMessage(message, node));
getSourceUnit().getErrorCollector()
.addErrorAndContinue(createSyntaxErrorMessage(message, node));
}
private Message createSyntaxErrorMessage(String message, ASTNode node) {
return new SyntaxErrorMessage(new SyntaxException(message, node.getLineNumber(),
node.getColumnNumber(), node.getLastLineNumber(),
node.getLastColumnNumber()), getSourceUnit());
return new SyntaxErrorMessage(
new SyntaxException(message, node.getLineNumber(), node.getColumnNumber(),
node.getLastLineNumber(), node.getLastColumnNumber()),
getSourceUnit());
}
private static class GrapeModelResolver implements ModelResolver {

View File

@@ -56,9 +56,11 @@ import groovy.lang.GroovyCodeSource;
* <ul>
* <li>{@link CompilerAutoConfiguration} strategies will be read from
* {@code META-INF/services/org.springframework.boot.cli.compiler.CompilerAutoConfiguration}
* (per the standard java {@link ServiceLoader} contract) and applied during compilation</li>
* (per the standard java {@link ServiceLoader} contract) and applied during compilation
* </li>
*
* <li>Multiple classes can be returned if the Groovy source defines more than one Class</li>
* <li>Multiple classes can be returned if the Groovy source defines more than one Class
* </li>
*
* <li>Generated class files can also be loaded using
* {@link ClassLoader#getResource(String)}</li>
@@ -94,8 +96,8 @@ public class GroovyCompiler {
GrapeEngineInstaller.install(grapeEngine);
this.loader.getConfiguration().addCompilationCustomizers(
new CompilerAutoConfigureCustomizer());
this.loader.getConfiguration()
.addCompilationCustomizers(new CompilerAutoConfigureCustomizer());
if (configuration.isAutoconfigure()) {
this.compilerAutoConfigurations = ServiceLoader
.load(CompilerAutoConfiguration.class);
@@ -105,14 +107,14 @@ public class GroovyCompiler {
}
this.transformations = new ArrayList<ASTTransformation>();
this.transformations.add(new DependencyManagementBomTransformation(
resolutionContext));
this.transformations
.add(new DependencyManagementBomTransformation(resolutionContext));
this.transformations.add(new DependencyAutoConfigurationTransformation(
this.loader, resolutionContext, this.compilerAutoConfigurations));
this.transformations.add(new GroovyBeansTransformation());
if (this.configuration.isGuessDependencies()) {
this.transformations.add(new ResolveDependencyCoordinatesTransformation(
resolutionContext));
this.transformations.add(
new ResolveDependencyCoordinatesTransformation(resolutionContext));
}
for (ASTTransformation transformation : ServiceLoader
.load(SpringBootAstTransformation.class)) {
@@ -175,8 +177,8 @@ public class GroovyCompiler {
* @throws IOException in case of I/O errors
* @throws CompilationFailedException in case of compilation errors
*/
public Class<?>[] compile(String... sources) throws CompilationFailedException,
IOException {
public Class<?>[] compile(String... sources)
throws CompilationFailedException, IOException {
this.loader.clearCache();
List<Class<?>> classes = new ArrayList<Class<?>>();
@@ -274,8 +276,8 @@ public class GroovyCompiler {
public void call(SourceUnit source, GeneratorContext context, ClassNode classNode)
throws CompilationFailedException {
ImportCustomizer importCustomizer = new SmartImportCustomizer(source,
context, classNode);
ImportCustomizer importCustomizer = new SmartImportCustomizer(source, context,
classNode);
ClassNode mainClassNode = MainClass.get(source.getAST().getClasses());
// Additional auto configuration
@@ -290,10 +292,9 @@ public class GroovyCompiler {
GroovyCompiler.this.configuration, context, source,
classNode);
}
autoConfiguration
.apply(GroovyCompiler.this.loader,
GroovyCompiler.this.configuration, context, source,
classNode);
autoConfiguration.apply(GroovyCompiler.this.loader,
GroovyCompiler.this.configuration, context, source,
classNode);
}
}
importCustomizer.call(source, context, classNode);
@@ -313,9 +314,8 @@ public class GroovyCompiler {
if (AstUtils.hasAtLeastOneAnnotation(node, "Enable*AutoConfiguration")) {
return null; // No need to enhance this
}
if (AstUtils
.hasAtLeastOneAnnotation(node, "*Controller", "Configuration",
"Component", "*Service", "Repository", "Enable*")) {
if (AstUtils.hasAtLeastOneAnnotation(node, "*Controller", "Configuration",
"Component", "*Service", "Repository", "Enable*")) {
return node;
}
}

View File

@@ -108,15 +108,17 @@ public class MavenSettings {
return new ConservativeAuthenticationSelector(selector);
}
private ProxySelector createProxySelector(SettingsDecryptionResult decryptedSettings) {
private ProxySelector createProxySelector(
SettingsDecryptionResult decryptedSettings) {
DefaultProxySelector selector = new DefaultProxySelector();
for (Proxy proxy : decryptedSettings.getProxies()) {
Authentication authentication = new AuthenticationBuilder()
.addUsername(proxy.getUsername()).addPassword(proxy.getPassword())
.build();
selector.add(new org.eclipse.aether.repository.Proxy(proxy.getProtocol(),
proxy.getHost(), proxy.getPort(), authentication), proxy
.getNonProxyHosts());
selector.add(
new org.eclipse.aether.repository.Proxy(proxy.getProtocol(),
proxy.getHost(), proxy.getPort(), authentication),
proxy.getNonProxyHosts());
}
return selector;
}
@@ -124,10 +126,10 @@ public class MavenSettings {
private List<Profile> determineActiveProfiles(Settings settings) {
SpringBootCliModelProblemCollector problemCollector = new SpringBootCliModelProblemCollector();
List<org.apache.maven.model.Profile> activeModelProfiles = createProfileSelector()
.getActiveProfiles(
createModelProfiles(settings.getProfiles()),
new SpringBootCliProfileActivationContext(settings
.getActiveProfiles()), problemCollector);
.getActiveProfiles(createModelProfiles(settings.getProfiles()),
new SpringBootCliProfileActivationContext(
settings.getActiveProfiles()),
problemCollector);
if (!problemCollector.getProblems().isEmpty()) {
throw new IllegalStateException(createFailureMessage(problemCollector));
}
@@ -145,8 +147,8 @@ public class MavenSettings {
PrintWriter printer = new PrintWriter(message);
printer.println("Failed to determine active profiles:");
for (ModelProblemCollectorRequest problem : problemCollector.getProblems()) {
printer.println(" " + problem.getMessage() + " at "
+ problem.getLocation());
printer.println(
" " + problem.getMessage() + " at " + problem.getLocation());
}
return message.toString();
}
@@ -175,7 +177,8 @@ public class MavenSettings {
return modelProfiles;
}
private org.apache.maven.model.Activation createModelActivation(Activation activation) {
private org.apache.maven.model.Activation createModelActivation(
Activation activation) {
org.apache.maven.model.Activation modelActivation = new org.apache.maven.model.Activation();
modelActivation.setActiveByDefault(activation.isActiveByDefault());
if (activation.getFile() != null) {
@@ -226,8 +229,8 @@ public class MavenSettings {
return this.activeProfiles;
}
private static final class SpringBootCliProfileActivationContext implements
ProfileActivationContext {
private static final class SpringBootCliProfileActivationContext
implements ProfileActivationContext {
private final List<String> activeProfiles;
@@ -268,8 +271,8 @@ public class MavenSettings {
}
private static final class SpringBootCliModelProblemCollector implements
ModelProblemCollector {
private static final class SpringBootCliModelProblemCollector
implements ModelProblemCollector {
private final List<ModelProblemCollectorRequest> problems = new ArrayList<ModelProblemCollectorRequest>();

View File

@@ -56,7 +56,8 @@ public class MavenSettingsReader {
Settings settings = loadSettings();
SettingsDecryptionResult decrypted = decryptSettings(settings);
if (!decrypted.getProblems().isEmpty()) {
Log.error("Maven settings decryption failed. Some Maven repositories may be inaccessible");
Log.error(
"Maven settings decryption failed. Some Maven repositories may be inaccessible");
// Continue - the encrypted credentials may not be used
}
return new MavenSettings(settings, decrypted);
@@ -72,8 +73,8 @@ public class MavenSettingsReader {
.getEffectiveSettings();
}
catch (SettingsBuildingException ex) {
throw new IllegalStateException("Failed to build settings from "
+ settingsFile, ex);
throw new IllegalStateException(
"Failed to build settings from " + settingsFile, ex);
}
}
@@ -99,8 +100,8 @@ public class MavenSettingsReader {
field.set(target, value);
}
catch (Exception ex) {
throw new IllegalStateException("Failed to set field '" + fieldName
+ "' on '" + target + "'", ex);
throw new IllegalStateException(
"Failed to set field '" + fieldName + "' on '" + target + "'", ex);
}
}

View File

@@ -78,10 +78,10 @@ public final class RepositoryConfigurationFactory {
List<RepositoryConfiguration> repositoryConfiguration) {
for (Profile activeProfile : activeProfiles) {
for (Repository repository : activeProfile.getRepositories()) {
repositoryConfiguration.add(new RepositoryConfiguration(repository
.getId(), URI.create(repository.getUrl()), repository
.getSnapshots() != null ? repository.getSnapshots().isEnabled()
: false));
repositoryConfiguration.add(new RepositoryConfiguration(
repository.getId(), URI.create(repository.getUrl()),
repository.getSnapshots() != null
? repository.getSnapshots().isEnabled() : false));
}
}
}

View File

@@ -33,7 +33,8 @@ class SmartImportCustomizer extends ImportCustomizer {
private SourceUnit source;
SmartImportCustomizer(SourceUnit source, GeneratorContext context, ClassNode classNode) {
SmartImportCustomizer(SourceUnit source, GeneratorContext context,
ClassNode classNode) {
this.source = source;
}

View File

@@ -44,10 +44,10 @@ public class ReactorCompilerAutoConfiguration extends CompilerAutoConfiguration
@Override
public void applyImports(ImportCustomizer imports) {
imports.addImports("reactor.bus.Bus", "reactor.bus.Event",
"reactor.bus.EventBus", "reactor.fn.Function", "reactor.fn.Functions",
"reactor.fn.Predicate", "reactor.fn.Predicates", "reactor.fn.Supplier",
"reactor.fn.Suppliers", "reactor.spring.context.annotation.Consumer",
imports.addImports("reactor.bus.Bus", "reactor.bus.Event", "reactor.bus.EventBus",
"reactor.fn.Function", "reactor.fn.Functions", "reactor.fn.Predicate",
"reactor.fn.Predicates", "reactor.fn.Supplier", "reactor.fn.Suppliers",
"reactor.spring.context.annotation.Consumer",
"reactor.spring.context.annotation.ReplyTo",
"reactor.spring.context.annotation.Selector",
"reactor.spring.context.annotation.SelectorType",

View File

@@ -38,9 +38,9 @@ public class SpringRetryCompilerAutoConfiguration extends CompilerAutoConfigurat
@Override
public void applyDependencies(DependencyCustomizer dependencies) {
dependencies.ifAnyMissingClasses(
"org.springframework.retry.annotation.EnableRetry").add("spring-retry",
"spring-boot-starter-aop");
dependencies
.ifAnyMissingClasses("org.springframework.retry.annotation.EnableRetry")
.add("spring-retry", "spring-boot-starter-aop");
}
@Override

View File

@@ -45,8 +45,7 @@ public class SpringSecurityCompilerAutoConfiguration extends CompilerAutoConfigu
@Override
public void applyImports(ImportCustomizer imports) {
imports.addImports(
"org.springframework.security.core.Authentication",
imports.addImports("org.springframework.security.core.Authentication",
"org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity",
"org.springframework.security.core.authority.AuthorityUtils")
.addStarImports(

View File

@@ -30,8 +30,8 @@ import org.springframework.boot.cli.compiler.DependencyCustomizer;
* @author Dave Syer
* @since 1.3.0
*/
public class SpringSecurityOAuth2CompilerAutoConfiguration extends
CompilerAutoConfiguration {
public class SpringSecurityOAuth2CompilerAutoConfiguration
extends CompilerAutoConfiguration {
@Override
public boolean matches(ClassNode classNode) {
@@ -48,7 +48,8 @@ public class SpringSecurityOAuth2CompilerAutoConfiguration extends
@Override
public void applyImports(ImportCustomizer imports) throws CompilationFailedException {
imports.addImports("org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso");
imports.addImports(
"org.springframework.boot.autoconfigure.security.oauth2.client.EnableOAuth2Sso");
imports.addStarImports(
"org.springframework.security.oauth2.config.annotation.web.configuration",
"org.springframework.security.access.prepost");

View File

@@ -25,8 +25,8 @@ import org.springframework.util.StringUtils;
* @author Phillip Webb
* @author Andy Wilkinson
*/
public class DependencyManagementArtifactCoordinatesResolver implements
ArtifactCoordinatesResolver {
public class DependencyManagementArtifactCoordinatesResolver
implements ArtifactCoordinatesResolver {
private final DependencyManagement dependencyManagement;

View File

@@ -50,8 +50,8 @@ public class MavenModelDependencyManagement implements DependencyManagement {
List<Exclusion> exclusions = new ArrayList<Exclusion>();
for (org.apache.maven.model.Exclusion mavenExclusion : mavenDependency
.getExclusions()) {
exclusions.add(new Exclusion(mavenExclusion.getGroupId(), mavenExclusion
.getArtifactId()));
exclusions.add(new Exclusion(mavenExclusion.getGroupId(),
mavenExclusion.getArtifactId()));
}
Dependency dependency = new Dependency(mavenDependency.getGroupId(),
mavenDependency.getArtifactId(), mavenDependency.getVersion(),

View File

@@ -30,8 +30,8 @@ import org.apache.maven.model.locator.DefaultModelLocator;
* @author Andy Wilkinson
* @since 1.3.0
*/
public class SpringBootDependenciesDependencyManagement extends
MavenModelDependencyManagement {
public class SpringBootDependenciesDependencyManagement
extends MavenModelDependencyManagement {
public SpringBootDependenciesDependencyManagement() {
super(readModel());

View File

@@ -28,8 +28,8 @@ import org.springframework.boot.cli.compiler.MavenSettingsReader;
*
* @author Andy Wilkinson
*/
public class SettingsXmlRepositorySystemSessionAutoConfiguration implements
RepositorySystemSessionAutoConfiguration {
public class SettingsXmlRepositorySystemSessionAutoConfiguration
implements RepositorySystemSessionAutoConfiguration {
@Override
public void apply(DefaultRepositorySystemSession session,

View File

@@ -76,13 +76,15 @@ final class SummaryProgressReporter implements ProgressReporter {
}
private void reportProgress() {
if (!this.finished && System.currentTimeMillis() - this.startTime > INITIAL_DELAY) {
if (!this.finished
&& System.currentTimeMillis() - this.startTime > INITIAL_DELAY) {
if (!this.started) {
this.started = true;
this.out.print("Resolving dependencies..");
this.lastProgressTime = System.currentTimeMillis();
}
else if (System.currentTimeMillis() - this.lastProgressTime > PROGRESS_DELAY) {
else if (System.currentTimeMillis()
- this.lastProgressTime > PROGRESS_DELAY) {
this.out.print(".");
this.lastProgressTime = System.currentTimeMillis();
}