From 7bd786af1eb16b85687f7d0e31bb2813642e85de Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 27 Oct 2024 17:13:36 -0700 Subject: [PATCH 1/3] Added GitHub repository --- .../extension/JacocoReportOperationBuild.java | 27 +++++++++---------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java b/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java index 0e7852a..b1946de 100644 --- a/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java +++ b/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java @@ -40,6 +40,7 @@ public class JacocoReportOperationBuild extends Project { downloadSources = true; autoDownloadPurge = true; + repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL, RIFE2_RELEASES, RIFE2_SNAPSHOTS); var jacocoVersion = new VersionNumber(0, 8, 12); @@ -60,27 +61,25 @@ public class JacocoReportOperationBuild extends Project { publishOperation() .repository(version.isSnapshot() ? repository("rife2-snapshot") : repository("rife2")) + .repository(repository("github")) .info() .groupId("com.uwyn.rife2") .artifactId("bld-jacoco-report") .description("bld Extension to Generate JaCoCo Code Coverage Reports") .url("https://github.com/rife2/bld-pmd") - .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-pmd.git") - .developerConnection("scm:git:git@github.com:rife2/bld-pmd.git") - .url("https://github.com/rife2/bld-pmd") + .scm(new PublishScm().connection("scm:git:https://github.com/rife2/bld-pmd.git") + .developerConnection("scm:git:git@github.com:rife2/bld-pmd.git") + .url("https://github.com/rife2/bld-pmd") ) .signKey(property("sign.key")) .signPassphrase(property("sign.passphrase")); From 10292cfec58006f649e75e23185656d68a104bfa Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 27 Oct 2024 17:14:25 -0700 Subject: [PATCH 2/3] Updated dependencies Bumped JUnit version to 5.11.3 Bumped PMD extension version to 1.1.7 Bumped JDK to version 23 (GitHub CI Workflow) --- .github/workflows/bld.yml | 4 ++-- config/pmd.xml | 4 ++-- examples/src/bld/java/com/example/ExamplesBuild.java | 4 ++-- lib/bld/bld-wrapper.properties | 2 +- .../java/rife/bld/extension/JacocoReportOperationBuild.java | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/bld.yml b/.github/workflows/bld.yml index c5434f3..f7e10f8 100644 --- a/.github/workflows/bld.yml +++ b/.github/workflows/bld.yml @@ -1,6 +1,6 @@ name: bld-ci -on: [ push, pull_request, workflow_dispatch ] +on: [push, pull_request, workflow_dispatch] jobs: build-bld-project: @@ -8,7 +8,7 @@ jobs: strategy: matrix: - java-version: [ 17, 21, 22 ] + java-version: [17, 21, 23] steps: - name: Checkout source repository diff --git a/config/pmd.xml b/config/pmd.xml index 3d3203c..2641880 100644 --- a/config/pmd.xml +++ b/config/pmd.xml @@ -7,9 +7,9 @@ - - + + diff --git a/examples/src/bld/java/com/example/ExamplesBuild.java b/examples/src/bld/java/com/example/ExamplesBuild.java index b5a62f8..8d34b3c 100644 --- a/examples/src/bld/java/com/example/ExamplesBuild.java +++ b/examples/src/bld/java/com/example/ExamplesBuild.java @@ -25,8 +25,8 @@ public class ExamplesBuild extends Project { repositories = List.of(MAVEN_LOCAL, MAVEN_CENTRAL); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0))); + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))); } public static void main(String[] args) { diff --git a/lib/bld/bld-wrapper.properties b/lib/bld/bld-wrapper.properties index dd13eb0..0018912 100644 --- a/lib/bld/bld-wrapper.properties +++ b/lib/bld/bld-wrapper.properties @@ -2,6 +2,6 @@ bld.downloadExtensionJavadoc=false bld.downloadExtensionSources=true bld.downloadLocation= bld.extension-exec=com.uwyn.rife2:bld-exec:1.0.3 -bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.5 +bld.extension-pmd=com.uwyn.rife2:bld-pmd:1.1.7 bld.repositories=MAVEN_CENTRAL,MAVEN_LOCAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES bld.version=2.1.0 diff --git a/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java b/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java index b1946de..833b219 100644 --- a/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java +++ b/src/bld/java/rife/bld/extension/JacocoReportOperationBuild.java @@ -48,8 +48,8 @@ public class JacocoReportOperationBuild extends Project { .include(dependency("org.jacoco", "jacoco", jacocoVersion).exclude("*", "org.jacoco.doc")) .include(dependency("com.uwyn.rife2", "bld", version(2, 1, 0))); scope(test) - .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 0))) - .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 0))) + .include(dependency("org.junit.jupiter", "junit-jupiter", version(5, 11, 3))) + .include(dependency("org.junit.platform", "junit-platform-console-standalone", version(1, 11, 3))) .include(dependency("org.assertj", "assertj-core", version(3, 26, 3))); javadocOperation() From b2a67a1262ce81176048d2a996358a0ca2a2454c Mon Sep 17 00:00:00 2001 From: "Erik C. Thauvin" Date: Sun, 27 Oct 2024 17:14:56 -0700 Subject: [PATCH 3/3] Added soft assertions --- .../rife/bld/extension/JacocoReportOperationTest.java | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/test/java/rife/bld/extension/JacocoReportOperationTest.java b/src/test/java/rife/bld/extension/JacocoReportOperationTest.java index 3deadf3..2ec2c1d 100644 --- a/src/test/java/rife/bld/extension/JacocoReportOperationTest.java +++ b/src/test/java/rife/bld/extension/JacocoReportOperationTest.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.operations.exceptions.ExitStatusException; @@ -88,9 +89,11 @@ class JacocoReportOperationTest { assertThat(csv).exists(); assertThat(html).isDirectory(); assertThat(xml).exists(); - try (var lines = Files.lines(xml.toPath())) { - assertThat(lines.anyMatch(s -> - s.contains(""))).isTrue(); + try (var softly = new AutoCloseableSoftAssertions()) { + try (var lines = Files.lines(xml.toPath())) { + softly.assertThat(lines.anyMatch(s -> + s.contains(""))).isTrue(); + } } assertThat(Path.of(html.getPath(), "com.example", "Examples.java.html")).exists();