Skip to content

Commit ec424c4

Browse files
committed
Mojos marked as thread-safe
- 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 <david.matejcek@omnifish.ee>
1 parent 085dba2 commit ec424c4

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiInplaceMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
* <p>
3737
* This mojo converts files inplace, it is not recommended to execute it on src subdirectories.
3838
*/
39-
@Mojo(name = "inplace", defaultPhase = LifecyclePhase.PROCESS_RESOURCES)
39+
@Mojo(name = "inplace", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_RESOURCES)
4040
public class Native2AsciiInplaceMojo extends AbstractNative2AsciiMojo {
4141

4242
/**

src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
* Converts files with characters in any supported character encoding to one with ASCII and/or
3333
* Unicode escapes.
3434
*/
35-
@Mojo(name = "resources", defaultPhase = LifecyclePhase.PROCESS_RESOURCES)
35+
@Mojo(name = "resources", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_RESOURCES)
3636
public class Native2AsciiMojo extends AbstractNative2AsciiMojo {
3737

3838
/**

src/main/java/org/codehaus/mojo/native2ascii/mojo/Native2AsciiTestMojo.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*
2929
* @author David Matějček
3030
*/
31-
@Mojo(name = "testResources", defaultPhase = LifecyclePhase.PROCESS_TEST_RESOURCES)
31+
@Mojo(name = "testResources", threadSafe = true, defaultPhase = LifecyclePhase.PROCESS_TEST_RESOURCES)
3232
public class Native2AsciiTestMojo extends Native2AsciiMojo {
3333

3434
/**

0 commit comments

Comments
 (0)