Skip to content

Commit

Permalink
Bumped Spring Boot to version 3.3.4
Browse files Browse the repository at this point in the history
  • Loading branch information
ethauvin committed Sep 19, 2024
1 parent a2ed825 commit d98a140
Show file tree
Hide file tree
Showing 5 changed files with 42 additions and 39 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
3 changes: 2 additions & 1 deletion examples/.vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@
"java.project.referencedLibraries": [
"${HOME}/.bld/dist/bld-2.1.0.jar",
"lib/**/*.jar"
]
],
"java.compile.nullAnalysis.mode": "automatic"
}
10 changes: 5 additions & 5 deletions examples/src/bld/java/com/example/demo/DemoApplicationBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
30 changes: 14 additions & 16 deletions src/bld/java/rife/bld/extension/SpringBootBuild.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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("[email protected]")
.url("https://erik.thauvin.net/")
.developer(new PublishDeveloper()
.id("ethauvin")
.name("Erik C. Thauvin")
.email("[email protected]")
.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:[email protected]: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:[email protected]:rife2/bld-spring-boot.git")
.url("https://github.com/rife2/bld-spring-boot")
)
.signKey(property("sign.key"))
.signPassphrase(property("sign.passphrase"));
Expand Down
36 changes: 20 additions & 16 deletions src/test/java/rife/bld/extension/BootJarOperationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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/";
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit d98a140

Please sign in to comment.