Skip to content

Commit d19df3d

Browse files
committed
Merge pull request #40603 from coursar
* pr/40603: Polish "Change Spring Boot CLI init command docs default build system to gradle" Change Spring Boot CLI init command docs default build system to gradle Closes gh-40603
2 parents e471710 + 64b3020 commit d19df3d

File tree

2 files changed

+3
-3
lines changed
  • spring-boot-project/spring-boot-tools/spring-boot-cli/src

2 files changed

+3
-3
lines changed

spring-boot-project/spring-boot-tools/spring-boot-cli/src/main/java/org/springframework/boot/cli/command/init/InitCommand.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ private void projectGenerationOptions() {
165165
this.packaging = option(Arrays.asList("packaging", "p"), "Project packaging (for example 'jar')")
166166
.withRequiredArg();
167167
this.build = option("build", "Build system to use (for example 'maven' or 'gradle')").withRequiredArg()
168-
.defaultsTo("maven");
168+
.defaultsTo("gradle");
169169
this.format = option("format", "Format of the generated content (for example 'build' for a build file, "
170170
+ "'project' for a project archive)")
171171
.withRequiredArg()

spring-boot-project/spring-boot-tools/spring-boot-cli/src/test/java/org/springframework/boot/cli/command/init/InitCommandTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,7 @@ void overwriteFileInArchive(@TempDir File tempDir) throws Exception {
344344
void parseTypeOnly() throws Exception {
345345
this.handler.disableProjectGeneration();
346346
this.command.run("-t=ant-project");
347-
assertThat(this.handler.lastRequest.getBuild()).isEqualTo("maven");
347+
assertThat(this.handler.lastRequest.getBuild()).isEqualTo("gradle");
348348
assertThat(this.handler.lastRequest.getFormat()).isEqualTo("project");
349349
assertThat(this.handler.lastRequest.isDetectType()).isFalse();
350350
assertThat(this.handler.lastRequest.getType()).isEqualTo("ant-project");
@@ -364,7 +364,7 @@ void parseBuildOnly() throws Exception {
364364
void parseFormatOnly() throws Exception {
365365
this.handler.disableProjectGeneration();
366366
this.command.run("--format=web");
367-
assertThat(this.handler.lastRequest.getBuild()).isEqualTo("maven");
367+
assertThat(this.handler.lastRequest.getBuild()).isEqualTo("gradle");
368368
assertThat(this.handler.lastRequest.getFormat()).isEqualTo("web");
369369
assertThat(this.handler.lastRequest.isDetectType()).isTrue();
370370
assertThat(this.handler.lastRequest.getType()).isNull();

0 commit comments

Comments
 (0)