From 2baba8a594bc9f9ac057d357a3f088341ef094cc Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Sun, 8 Dec 2024 23:47:11 +0100 Subject: [PATCH 01/41] RAT-379: Groovify proposed solution and shorten log output during build --- .../copyResourcesFromParentProject.groovy | 69 ++++++++++--------- 1 file changed, 35 insertions(+), 34 deletions(-) diff --git a/apache-rat-core/src/main/build-grv/copyResourcesFromParentProject.groovy b/apache-rat-core/src/main/build-grv/copyResourcesFromParentProject.groovy index be232db9e..e8501d6c1 100644 --- a/apache-rat-core/src/main/build-grv/copyResourcesFromParentProject.groovy +++ b/apache-rat-core/src/main/build-grv/copyResourcesFromParentProject.groovy @@ -16,50 +16,51 @@ */ // Copy a set of resource files from the parent project to target/classes/META-INF, -// so that they become a part of the generated jar file. See RAT-379. +// so that they become a part of the generated jar file. See RAT-379 for details. -import java.io.FileNotFoundException; -import java.nio.file.attribute.FileTime; -import java.nio.file.Files; -import java.nio.file.Path; -import java.nio.file.Paths; -import java.nio.file.StandardCopyOption; +import java.nio.file.attribute.FileTime +import java.nio.file.Files +import java.nio.file.Path +import java.nio.file.Paths +import java.nio.file.StandardCopyOption + +final Path sourceDir = Paths.get("${sourceDir}") +final Path targetDir = Paths.get("${targetDir}") -final Path sourceDir = Paths.get("${sourceDir}"); -final Path targetDir = Paths.get("${targetDir}"); if (!Files.isDirectory(sourceDir)) { - final String msg = "Source directory not found: " + sourceDir.toAbsolutePath(); - log.error(msg); - throw new FileNotFoundException(msg); + final String msg = "Source directory not found: " + sourceDir.toAbsolutePath() + System.err.println(msg) + throw new FileNotFoundException(msg) } -log.debug("copyResourcesFromParent: Using source directory " + sourceDir + ", resolved to " + sourceDir.toAbsolutePath()); -log.debug("copyResourcesFromParent: Using target directory " + targetDir + ", resolved to " + targetDir.toAbsolutePath()); -Files.createDirectories(targetDir); -for (StringTokenizer st = new StringTokenizer("${filesToCopy}", ","); st.hasMoreTokens(); ) { - final String token = st.nextToken(); - final Path sourceFile = sourceDir.resolve(token); + +// System.out.println("copyResourcesFromParent: Using source directory " + sourceDir + ", resolved to " + sourceDir.toAbsolutePath()) +// System.out.println("copyResourcesFromParent: Using target directory " + targetDir + ", resolved to " + targetDir.toAbsolutePath()) +Files.createDirectories(targetDir) + +for (StringTokenizer st = new StringTokenizer("${filesToCopy}", ","); st.hasMoreTokens(); ) { + final String token = st.nextToken() + final Path sourceFile = sourceDir.resolve(token) if (!Files.isRegularFile(sourceFile)) { - final String msg = "Source file " + token + " not found in source directory " + sourceDir; - log.error("copyResourcesFromParent: " + msg); - log.error("copyResourcesFromParent: A possible reason is, that you did clone only the apache-rat-core subproject from Git."); - throw new FileNotFoundException(msg); + final String msg = "Source file " + token + " not found in source directory " + sourceDir + System.err.println("copyResourcesFromParent: " + msg) + System.err.println("copyResourcesFromParent: A possible reason is, that you did clone only the apache-rat-core subproject from Git.") + throw new FileNotFoundException(msg) } - final Path targetFile = targetDir.resolve(token); - final boolean replacing = Files.isRegularFile(targetFile); + final Path targetFile = targetDir.resolve(token) + final boolean replacing = Files.isRegularFile(targetFile) if (replacing) { - final FileTime sourceTime = Files.getLastModifiedTime(sourceFile); - final FileTime targetTime = Files.getLastModifiedTime(targetFile); - if (sourceTime != null && targetTime != null && sourceTime.compareTo(targetTime) >= 0) { - log.debug("copyResourcesFromParent: Skipping source file " - + sourceFile + ", because target file " + targetFile + " appears to be uptodate."); - continue; + final FileTime sourceTime = Files.getLastModifiedTime(sourceFile) + final FileTime targetTime = Files.getLastModifiedTime(targetFile) + if (sourceTime != null && targetTime != null && sourceTime >= targetTime) { + System.out.println("Skipping " + sourceFile + ", as target " + targetFile + " appears to be up-to-date already.") + continue } } - log.debug("copyResourcesFromParent: Copying source file " + sourceFile - + " to target file " + targetFile); + System.out.println("Copying " + sourceFile + + " to " + targetFile) if (replacing) { - Files.copy(sourceFile, targetFile, StandardCopyOption.REPLACE_EXISTING); + Files.copy(sourceFile, targetFile, StandardCopyOption.REPLACE_EXISTING) } else { - Files.copy(sourceFile, targetFile); + Files.copy(sourceFile, targetFile) } } From ce21f2add7c036b916e8c6f094310eeed9662820 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 00:55:06 +0000 Subject: [PATCH 02/41] Bump org.apache.commons:commons-text from 1.12.0 to 1.13.0 Bumps org.apache.commons:commons-text from 1.12.0 to 1.13.0. --- updated-dependencies: - dependency-name: org.apache.commons:commons-text dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 025a6130b..0ad4c8ab8 100644 --- a/pom.xml +++ b/pom.xml @@ -139,7 +139,7 @@ agnostic home for software distribution comprehension and audit tools. org.apache.commons commons-text - 1.12.0 + 1.13.0 org.apache.commons From 9b3c4b0033607efbd257b1dbaef36502f09c0ff0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 00:22:52 +0000 Subject: [PATCH 03/41] Bump org.junit:junit-bom from 5.11.3 to 5.11.4 Bumps [org.junit:junit-bom](https://github.com/junit-team/junit5) from 5.11.3 to 5.11.4. - [Release notes](https://github.com/junit-team/junit5/releases) - [Commits](https://github.com/junit-team/junit5/compare/r5.11.3...r5.11.4) --- updated-dependencies: - dependency-name: org.junit:junit-bom dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 0ad4c8ab8..4909a184a 100644 --- a/pom.xml +++ b/pom.xml @@ -149,7 +149,7 @@ agnostic home for software distribution comprehension and audit tools. org.junit junit-bom - 5.11.3 + 5.11.4 pom import From 4bf8b7772f27666a8147cd53db519b65d9ac70a2 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 00:43:19 +0000 Subject: [PATCH 04/41] Bump org.assertj:assertj-core from 3.26.3 to 3.27.0 Bumps [org.assertj:assertj-core](https://github.com/assertj/assertj) from 3.26.3 to 3.27.0. - [Release notes](https://github.com/assertj/assertj/releases) - [Commits](https://github.com/assertj/assertj/compare/assertj-build-3.26.3...assertj-build-3.27.0) --- updated-dependencies: - dependency-name: org.assertj:assertj-core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 4909a184a..0fa75e127 100644 --- a/pom.xml +++ b/pom.xml @@ -198,7 +198,7 @@ agnostic home for software distribution comprehension and audit tools. org.assertj assertj-core - 3.26.3 + 3.27.0 test From 61dd8c5cf8b689116333cd8a79815794f97fb049 Mon Sep 17 00:00:00 2001 From: "P. Ottlinger" Date: Wed, 1 Jan 2025 22:15:36 +0100 Subject: [PATCH 05/41] Happy new year --- src/site/site.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/site/site.xml b/src/site/site.xml index 76443f91f..a64c73555 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -128,7 +128,7 @@ -