From ec424c4da0f808245b6b14e4e41ed5a26e974c6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Mat=C4=9Bj=C4=8Dek?= Date: Tue, 23 May 2023 16:00:15 +0200 Subject: [PATCH] Mojos marked as thread-safe MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - I followed the Maven documentation about thread-safety and it seems that even the inplace goal is thread-safe in this meaning. Obviously it is not recommended to process the same file several times, especially with multiple threads, but that scenario is not what Maven means by the thread-safety. Signed-off-by: David Matějček --- .../mojo/native2ascii/mojo/Native2AsciiInplaceMojo.java | 2 +- .../org/codehaus/mojo/native2ascii/mojo/Native2AsciiMojo.java | 2 +- .../codehaus/mojo/native2ascii/mojo/Native2AsciiTestMojo.java | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiInplaceMojo.java b/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiInplaceMojo.java index 79b230f..f2b9d3b 100644 --- a/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiInplaceMojo.java +++ b/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiInplaceMojo.java @@ -36,7 +36,7 @@ *

* This mojo converts files inplace, it is not recommended to execute it on src subdirectories. */ -@Mojo(name = "inplace", defaultPhase = LifecyclePhase.PROCESS_RESOURCES) +@Mojo(name = "inplace", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_RESOURCES) public class Native2AsciiInplaceMojo extends AbstractNative2AsciiMojo { /** diff --git a/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiMojo.java b/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiMojo.java index c89d4e2..90bfcf5 100644 --- a/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiMojo.java +++ b/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiMojo.java @@ -32,7 +32,7 @@ * Converts files with characters in any supported character encoding to one with ASCII and/or * Unicode escapes. */ -@Mojo(name = "resources", defaultPhase = LifecyclePhase.PROCESS_RESOURCES) +@Mojo(name = "resources", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_RESOURCES) public class Native2AsciiMojo extends AbstractNative2AsciiMojo { /** diff --git a/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiTestMojo.java b/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiTestMojo.java index 5f9261b..8aa7b7a 100644 --- a/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiTestMojo.java +++ b/src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiTestMojo.java @@ -28,7 +28,7 @@ * * @author David Matějček */ -@Mojo(name = "testResources", defaultPhase = LifecyclePhase.PROCESS_TEST_RESOURCES) +@Mojo(name = "testResources", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_TEST_RESOURCES) public class Native2AsciiTestMojo extends Native2AsciiMojo { /**