From 1a786fc788f8b0fb5c12d0cbe5737c4794982fa0 Mon Sep 17 00:00:00 2001 From: coursar Date: Thu, 2 May 2024 10:26:11 +0300 Subject: [PATCH 1/2] Change Spring Boot CLI init command docs default build system to gradle See gh-40603 --- .../org/springframework/boot/cli/command/init/InitCommand.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java b/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java index 87796f93425..e60677acddc 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java @@ -165,7 +165,7 @@ public class InitCommand extends OptionParsingCommand { this.packaging = option(Arrays.asList("packaging", "p"), "Project packaging (for example 'jar')") .withRequiredArg(); this.build = option("build", "Build system to use (for example 'maven' or 'gradle')").withRequiredArg() - .defaultsTo("maven"); + .defaultsTo("gradle"); this.format = option("format", "Format of the generated content (for example 'build' for a build file, " + "'project' for a project archive)") .withRequiredArg() From 64b302032ce423b2b87e7f567cfcecddbded20c7 Mon Sep 17 00:00:00 2001 From: Moritz Halbritter Date: Thu, 2 May 2024 10:49:51 +0200 Subject: [PATCH 2/2] Polish "Change Spring Boot CLI init command docs default build system to gradle" See gh-40603 --- .../boot/cli/command/init/InitCommandTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java b/spring-boot-project/spring-boot-tools/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java index 1abe746cd33..0bf1b7db249 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java @@ -344,7 +344,7 @@ class InitCommandTests extends AbstractHttpClientMockTests { void parseTypeOnly() throws Exception { this.handler.disableProjectGeneration(); this.command.run("-t=ant-project"); - assertThat(this.handler.lastRequest.getBuild()).isEqualTo("maven"); + assertThat(this.handler.lastRequest.getBuild()).isEqualTo("gradle"); assertThat(this.handler.lastRequest.getFormat()).isEqualTo("project"); assertThat(this.handler.lastRequest.isDetectType()).isFalse(); assertThat(this.handler.lastRequest.getType()).isEqualTo("ant-project"); @@ -364,7 +364,7 @@ class InitCommandTests extends AbstractHttpClientMockTests { void parseFormatOnly() throws Exception { this.handler.disableProjectGeneration(); this.command.run("--format=web"); - assertThat(this.handler.lastRequest.getBuild()).isEqualTo("maven"); + assertThat(this.handler.lastRequest.getBuild()).isEqualTo("gradle"); assertThat(this.handler.lastRequest.getFormat()).isEqualTo("web"); assertThat(this.handler.lastRequest.isDetectType()).isTrue(); assertThat(this.handler.lastRequest.getType()).isNull();