From d98a140f9669016196105419ac0a0ba47a145282 Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Thu, 19 Sep 2024 10:39:54 -0700 Subject: [PATCH] Bumped Spring Boot to version 3.3.4 --- README.md | 2 +- examples/.vscode/settings.json | 3 +- .../example/demo/DemoApplicationBuild.java | 10 +++--- .../rife/bld/extension/SpringBootBuild.java | 30 ++++++++-------- .../bld/extension/BootJarOperationTest.java | 36 ++++++++++--------- 5 files changed, 42 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 1646bc3..eb04250 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Don't forget to include the _Spring Boot Loader_ dependency to your project: ```java scope(standalone) - .include(dependency("org.springframeworkboot:spring-boot-loader:3.3.3")); + .include(dependency("org.springframeworkboot:spring-boot-loader:3.3.4")); ``` Please check the [BootJarOperation documentation](https://rife2.github.io/bld-spring-boot/rife/bld/extension/BootJarOperation.html#method-summary) diff --git a/examples/.vscode/settings.json b/examples/.vscode/settings.json index 4c33beb..8f4e3d2 100644 --- a/examples/.vscode/settings.json +++ b/examples/.vscode/settings.json @@ -11,5 +11,6 @@ "java.project.referencedLibraries": [ "${HOME}/.bld/dist/bld-2.1.0.jar", "lib/**/*.jar" - ] + ], + "java.compile.nullAnalysis.mode": "automatic" } diff --git a/examples/src/bld/java/com/example/demo/DemoApplicationBuild.java b/examples/src/bld/java/com/example/demo/DemoApplicationBuild.java index 8d3feab..551b5ec 100644 --- a/examples/src/bld/java/com/example/demo/DemoApplicationBuild.java +++ b/examples/src/bld/java/com/example/demo/DemoApplicationBuild.java @@ -27,15 +27,15 @@ public DemoApplicationBuild() { repositories = List.of(MAVEN_CENTRAL); scope(compile) - .include(dependency("org.springframework.boot:spring-boot-starter:3.3.3")) - .include(dependency("org.springframework.boot:spring-boot-starter-actuator:3.3.3")) - .include(dependency("org.springframework.boot:spring-boot-starter-web:3.3.3")); + .include(dependency("org.springframework.boot:spring-boot-starter:3.3.4")) + .include(dependency("org.springframework.boot:spring-boot-starter-actuator:3.3.4")) + .include(dependency("org.springframework.boot:spring-boot-starter-web:3.3.4")); scope(test) - .include(dependency("org.springframework.boot:spring-boot-starter-test:3.3.3")) + .include(dependency("org.springframework.boot:spring-boot-starter-test:3.3.4")) .include(dependency("org.junit.jupiter:junit-jupiter:5.11.0")) .include(dependency("org.junit.platform:junit-platform-console-standalone:1.11.0")); scope(standalone) - .include(dependency("org.springframework.boot:spring-boot-loader:3.3.3")); + .include(dependency("org.springframework.boot:spring-boot-loader:3.3.4")); } public static void main(String[] args) { diff --git a/src/bld/java/rife/bld/extension/SpringBootBuild.java b/src/bld/java/rife/bld/extension/SpringBootBuild.java index 8d7672e..d96d2a3 100644 --- a/src/bld/java/rife/bld/extension/SpringBootBuild.java +++ b/src/bld/java/rife/bld/extension/SpringBootBuild.java @@ -33,7 +33,7 @@ public class SpringBootBuild extends Project { public SpringBootBuild() { pkg = "rife.bld.extension"; name = "bld-spring-boot"; - version = version(0, 9, 8); + version = version(0, 9, 9, "SNAPSHOT"); javaRelease = 17; @@ -57,28 +57,26 @@ public SpringBootBuild() { publishOperation() .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) + .repository(repository("github")) .info() .groupId("com.uwyn.rife2") .artifactId("bld-spring-boot") .description("bld Extension for Spring Boot") .url("https://github.com/rife2/bld-spring-boot") - .developer( - new PublishDeveloper() - .id("ethauvin") - .name("Erik C. Thauvin") - .email("erik@thauvin.net") - .url("https://erik.thauvin.net/") + .developer(new PublishDeveloper() + .id("ethauvin") + .name("Erik C. Thauvin") + .email("erik@thauvin.net") + .url("https://erik.thauvin.net/") ) - .license( - new PublishLicense() - .name("The Apache License, Version 2.0") - .url("https://www.apache.org/licenses/LICENSE-2.0.txt") + .license(new PublishLicense() + .name("The Apache License, Version 2.0") + .url("https://www.apache.org/licenses/LICENSE-2.0.txt") ) - .scm( - new PublishScm() - .connection("scm:git:https://github.com/rife2/bld-spring-boot.git") - .developerConnection("scm:git:git@github.com:rife2/bld-spring-boot.git") - .url("https://github.com/rife2/bld-spring-boot") + .scm(new PublishScm() + .connection("scm:git:https://github.com/rife2/bld-spring-boot.git") + .developerConnection("scm:git:git@github.com:rife2/bld-spring-boot.git") + .url("https://github.com/rife2/bld-spring-boot") ) .signKey(property("sign.key")) .signPassphrase(property("sign.passphrase")); diff --git a/src/test/java/rife/bld/extension/BootJarOperationTest.java b/src/test/java/rife/bld/extension/BootJarOperationTest.java index 716f250..1b10a4a 100644 --- a/src/test/java/rife/bld/extension/BootJarOperationTest.java +++ b/src/test/java/rife/bld/extension/BootJarOperationTest.java @@ -16,6 +16,7 @@ package rife.bld.extension; +import org.assertj.core.api.AutoCloseableSoftAssertions; import org.junit.jupiter.api.Test; import rife.bld.Project; import rife.bld.dependencies.VersionNumber; @@ -35,7 +36,7 @@ class BootJarOperationTest { private static final String BLD = "bld-2.1.0.jar"; - private static final String BOOT_VERSION = "3.3.3"; + private static final String BOOT_VERSION = "3.3.4"; private static final String EXAMPLES_LIB_COMPILE = "examples/lib/compile/"; private static final String EXAMPLES_LIB_RUNTIME = "examples/lib/runtime/"; private static final String EXAMPLES_LIB_STANDALONE = "examples/lib/standalone/"; @@ -345,21 +346,24 @@ void testProject() throws IOException { var project = new CustomProject(tmp_dir); var bootJar = new BootJarOperation().fromProject(project).sourceDirectories(SRC_MAIN_JAVA); - assertThat(bootJar.mainClass()).as("mainClass").isEqualTo(MAIN_CLASS); - assertThat(bootJar.sourceDirectories()).as("sourceDirectories.size").hasSize(3) - .containsExactly(project.buildMainDirectory(), project.srcMainResourcesDirectory(), - new File(SRC_MAIN_JAVA)); - assertThat(bootJar.manifestAttributes()).as("manifestAttributes.size").hasSize(3); - assertThat(bootJar.manifestAttributes().get("Manifest-Version")).as("Manifest-Version").isEqualTo("1.0"); - assertThat(bootJar.manifestAttributes().get("Main-Class")).as("Main-Class").endsWith("JarLauncher"); - assertThat(bootJar.manifestAttributes().get("Start-Class")).as("Start-Class").isEqualTo(MAIN_CLASS); - assertThat(bootJar.manifestAttribute("Manifest-Test", "tsst") - .manifestAttributes().get("Manifest-Test")).as("Manifest-Test").isEqualTo("tsst"); - assertThat(bootJar.destinationDirectory()).as("destinationDirectory").isDirectory(); - assertThat(bootJar.destinationDirectory()).isEqualTo(project.buildDistDirectory()); - assertThat(bootJar.infLibs()).as("infoLibs").isEmpty(); - assertThat(bootJar.launcherLibs()).as("launcherJars").isEmpty(); - assertThat(bootJar.destinationFileName()).isEqualTo("test_project-0.0.1-boot.jar"); + try (var softly = new AutoCloseableSoftAssertions()) { + softly.assertThat(bootJar.mainClass()).as("mainClass").isEqualTo(MAIN_CLASS); + softly.assertThat(bootJar.sourceDirectories()).as("sourceDirectories.size").hasSize(3) + .containsExactly(project.buildMainDirectory(), project.srcMainResourcesDirectory(), + new File(SRC_MAIN_JAVA)); + softly.assertThat(bootJar.manifestAttributes()).as("manifestAttributes.size").hasSize(3); + softly.assertThat(bootJar.manifestAttributes().get("Manifest-Version")).as("Manifest-Version") + .isEqualTo("1.0"); + softly.assertThat(bootJar.manifestAttributes().get("Main-Class")).as("Main-Class").endsWith("JarLauncher"); + softly.assertThat(bootJar.manifestAttributes().get("Start-Class")).as("Start-Class").isEqualTo(MAIN_CLASS); + softly.assertThat(bootJar.manifestAttribute("Manifest-Test", "tsst") + .manifestAttributes().get("Manifest-Test")).as("Manifest-Test").isEqualTo("tsst"); + softly.assertThat(bootJar.destinationDirectory()).as("destinationDirectory").isDirectory(); + softly.assertThat(bootJar.destinationDirectory()).isEqualTo(project.buildDistDirectory()); + softly.assertThat(bootJar.infLibs()).as("infoLibs").isEmpty(); + softly.assertThat(bootJar.launcherLibs()).as("launcherJars").isEmpty(); + softly.assertThat(bootJar.destinationFileName()).isEqualTo("test_project-0.0.1-boot.jar"); + } FileUtils.deleteDirectory(tmp_dir); }