Skip to content

Commit

Permalink
Mojos marked as thread-safe
Browse files Browse the repository at this point in the history
- 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 <[email protected]>
  • Loading branch information
dmatej committed May 23, 2023
1 parent 085dba2 commit ec424c4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
* <p>
* 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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {

/**
Expand Down

0 comments on commit ec424c4

Please sign in to comment.