From 5b4605f870536636189a885f6754b7f6a7cfad5e Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 20 Nov 2024 05:47:33 +0000 Subject: [PATCH 1/2] Bump commons-io:commons-io from 2.17.0 to 2.18.0 Bumps commons-io:commons-io from 2.17.0 to 2.18.0. --- updated-dependencies: - dependency-name: commons-io:commons-io 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 1d369af2..effebdce 100644 --- a/pom.xml +++ b/pom.xml @@ -119,7 +119,7 @@ commons-io commons-io - 2.17.0 + 2.18.0 net.lingala.zip4j From 3286053e5c9c90904259f712025ab3bcf4cb0943 Mon Sep 17 00:00:00 2001 From: Reguel Wermelinger Date: Mon, 25 Nov 2024 11:10:51 +0100 Subject: [PATCH 2/2] migrate to common-io-2.18.0 api --- .../maven/engine/deploy/dir/FileLogForwarder.java | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/main/java/ch/ivyteam/ivy/maven/engine/deploy/dir/FileLogForwarder.java b/src/main/java/ch/ivyteam/ivy/maven/engine/deploy/dir/FileLogForwarder.java index 682fb80b..33b74aa4 100644 --- a/src/main/java/ch/ivyteam/ivy/maven/engine/deploy/dir/FileLogForwarder.java +++ b/src/main/java/ch/ivyteam/ivy/maven/engine/deploy/dir/FileLogForwarder.java @@ -26,6 +26,7 @@ import org.apache.commons.io.monitor.FileAlterationListenerAdaptor; import org.apache.commons.io.monitor.FileAlterationMonitor; import org.apache.commons.io.monitor.FileAlterationObserver; +import org.apache.commons.io.monitor.FileEntry; import org.apache.maven.plugin.MojoExecutionException; import org.apache.maven.plugin.logging.Log; @@ -55,11 +56,14 @@ public synchronized void activate() throws MojoExecutionException { IOFileFilter logFilter = FileFilterUtils.and( FileFilterUtils.fileFileFilter(), FileFilterUtils.nameFileFilter(engineLog.getFileName().toString())); - FileAlterationObserver fileObserver = new FileAlterationObserver(engineLog.getParent().toFile(), logFilter); - fileObserver.addListener(new LogModificationListener()); - monitor = new FileAlterationMonitor(100); - monitor.addObserver(fileObserver); try { + FileAlterationObserver fileObserver = FileAlterationObserver.builder() + .setRootEntry(new FileEntry(engineLog.getParent().toFile())) + .setFileFilter(logFilter) + .get(); + fileObserver.addListener(new LogModificationListener()); + monitor = new FileAlterationMonitor(100); + monitor.addObserver(fileObserver); monitor.start(); } catch (Exception ex) { throw new MojoExecutionException("Failed to activate deploy log forwarder", ex);