Bumped Spring Boot to version 3.3.4

This commit is contained in:
Erik C. Thauvin 2024-09-19 10:39:54 -07:00
parent a2ed825042
commit d98a140f96
Signed by: erik
GPG key ID: 776702A6A2DA330E
5 changed files with 42 additions and 39 deletions

View file

@ -49,7 +49,7 @@ Don't forget to include the _Spring Boot Loader_ dependency to your project:
```java ```java
scope(standalone) 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) Please check the [BootJarOperation documentation](https://rife2.github.io/bld-spring-boot/rife/bld/extension/BootJarOperation.html#method-summary)

View file

@ -11,5 +11,6 @@
"java.project.referencedLibraries": [ "java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.1.0.jar", "${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar" "lib/**/*.jar"
] ],
"java.compile.nullAnalysis.mode": "automatic"
} }

View file

@ -27,15 +27,15 @@ public class DemoApplicationBuild extends WebProject {
repositories = List.of(MAVEN_CENTRAL); repositories = List.of(MAVEN_CENTRAL);
scope(compile) scope(compile)
.include(dependency("org.springframework.boot:spring-boot-starter: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.3")) .include(dependency("org.springframework.boot:spring-boot-starter-actuator:3.3.4"))
.include(dependency("org.springframework.boot:spring-boot-starter-web:3.3.3")); .include(dependency("org.springframework.boot:spring-boot-starter-web:3.3.4"));
scope(test) 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.jupiter:junit-jupiter:5.11.0"))
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.11.0")); .include(dependency("org.junit.platform:junit-platform-console-standalone:1.11.0"));
scope(standalone) 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) { public static void main(String[] args) {

View file

@ -33,7 +33,7 @@ public class SpringBootBuild extends Project {
public SpringBootBuild() { public SpringBootBuild() {
pkg = "rife.bld.extension"; pkg = "rife.bld.extension";
name = "bld-spring-boot"; name = "bld-spring-boot";
version = version(0, 9, 8); version = version(0, 9, 9, "SNAPSHOT");
javaRelease = 17; javaRelease = 17;
@ -57,28 +57,26 @@ public class SpringBootBuild extends Project {
publishOperation() publishOperation()
.repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2"))
.repository(repository("github"))
.info() .info()
.groupId("com.uwyn.rife2") .groupId("com.uwyn.rife2")
.artifactId("bld-spring-boot") .artifactId("bld-spring-boot")
.description("bld Extension for Spring Boot") .description("bld Extension for Spring Boot")
.url("https://github.com/rife2/bld-spring-boot") .url("https://github.com/rife2/bld-spring-boot")
.developer( .developer(new PublishDeveloper()
new PublishDeveloper() .id("ethauvin")
.id("ethauvin") .name("Erik C. Thauvin")
.name("Erik C. Thauvin") .email("erik@thauvin.net")
.email("erik@thauvin.net") .url("https://erik.thauvin.net/")
.url("https://erik.thauvin.net/")
) )
.license( .license(new PublishLicense()
new PublishLicense() .name("The Apache License, Version 2.0")
.name("The Apache License, Version 2.0") .url("https://www.apache.org/licenses/LICENSE-2.0.txt")
.url("https://www.apache.org/licenses/LICENSE-2.0.txt")
) )
.scm( .scm(new PublishScm()
new PublishScm() .connection("scm:git:https://github.com/rife2/bld-spring-boot.git")
.connection("scm:git:https://github.com/rife2/bld-spring-boot.git") .developerConnection("scm:git:git@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")
.url("https://github.com/rife2/bld-spring-boot")
) )
.signKey(property("sign.key")) .signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase")); .signPassphrase(property("sign.passphrase"));

View file

@ -16,6 +16,7 @@
package rife.bld.extension; package rife.bld.extension;
import org.assertj.core.api.AutoCloseableSoftAssertions;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
import rife.bld.Project; import rife.bld.Project;
import rife.bld.dependencies.VersionNumber; import rife.bld.dependencies.VersionNumber;
@ -35,7 +36,7 @@ import static org.assertj.core.api.Assertions.assertThatCode;
class BootJarOperationTest { class BootJarOperationTest {
private static final String BLD = "bld-2.1.0.jar"; 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_COMPILE = "examples/lib/compile/";
private static final String EXAMPLES_LIB_RUNTIME = "examples/lib/runtime/"; private static final String EXAMPLES_LIB_RUNTIME = "examples/lib/runtime/";
private static final String EXAMPLES_LIB_STANDALONE = "examples/lib/standalone/"; private static final String EXAMPLES_LIB_STANDALONE = "examples/lib/standalone/";
@ -345,21 +346,24 @@ class BootJarOperationTest {
var project = new CustomProject(tmp_dir); var project = new CustomProject(tmp_dir);
var bootJar = new BootJarOperation().fromProject(project).sourceDirectories(SRC_MAIN_JAVA); var bootJar = new BootJarOperation().fromProject(project).sourceDirectories(SRC_MAIN_JAVA);
assertThat(bootJar.mainClass()).as("mainClass").isEqualTo(MAIN_CLASS); try (var softly = new AutoCloseableSoftAssertions()) {
assertThat(bootJar.sourceDirectories()).as("sourceDirectories.size").hasSize(3) softly.assertThat(bootJar.mainClass()).as("mainClass").isEqualTo(MAIN_CLASS);
.containsExactly(project.buildMainDirectory(), project.srcMainResourcesDirectory(), softly.assertThat(bootJar.sourceDirectories()).as("sourceDirectories.size").hasSize(3)
new File(SRC_MAIN_JAVA)); .containsExactly(project.buildMainDirectory(), project.srcMainResourcesDirectory(),
assertThat(bootJar.manifestAttributes()).as("manifestAttributes.size").hasSize(3); new File(SRC_MAIN_JAVA));
assertThat(bootJar.manifestAttributes().get("Manifest-Version")).as("Manifest-Version").isEqualTo("1.0"); softly.assertThat(bootJar.manifestAttributes()).as("manifestAttributes.size").hasSize(3);
assertThat(bootJar.manifestAttributes().get("Main-Class")).as("Main-Class").endsWith("JarLauncher"); softly.assertThat(bootJar.manifestAttributes().get("Manifest-Version")).as("Manifest-Version")
assertThat(bootJar.manifestAttributes().get("Start-Class")).as("Start-Class").isEqualTo(MAIN_CLASS); .isEqualTo("1.0");
assertThat(bootJar.manifestAttribute("Manifest-Test", "tsst") softly.assertThat(bootJar.manifestAttributes().get("Main-Class")).as("Main-Class").endsWith("JarLauncher");
.manifestAttributes().get("Manifest-Test")).as("Manifest-Test").isEqualTo("tsst"); softly.assertThat(bootJar.manifestAttributes().get("Start-Class")).as("Start-Class").isEqualTo(MAIN_CLASS);
assertThat(bootJar.destinationDirectory()).as("destinationDirectory").isDirectory(); softly.assertThat(bootJar.manifestAttribute("Manifest-Test", "tsst")
assertThat(bootJar.destinationDirectory()).isEqualTo(project.buildDistDirectory()); .manifestAttributes().get("Manifest-Test")).as("Manifest-Test").isEqualTo("tsst");
assertThat(bootJar.infLibs()).as("infoLibs").isEmpty(); softly.assertThat(bootJar.destinationDirectory()).as("destinationDirectory").isDirectory();
assertThat(bootJar.launcherLibs()).as("launcherJars").isEmpty(); softly.assertThat(bootJar.destinationDirectory()).isEqualTo(project.buildDistDirectory());
assertThat(bootJar.destinationFileName()).isEqualTo("test_project-0.0.1-boot.jar"); 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); FileUtils.deleteDirectory(tmp_dir);
} }