[ https://issues.apache.org/jira/browse/MRESOURCES-291?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Jin Xu updated MRESOURCES-291: ------------------------------ Description: If you try to make several sub-projects using this plugin to copy resources from some folter to a same folder, or even overwriting some files, it would crush. I don't think this be thread-safe. I see the codes. you are using File.mkdirs, which is actually not thread-safe. also, you are using file writing functions, which is not thread safe if multiple threads trying to write to a same file. So I don't think it is good to annote these 2 mojos as thread-safe. Please either remake that part, or remove the thread-safe annotation. was: If you try to make several sub-projects using this plugin to copy resources from some folter to a same folder, or even overwriting some files, it would crush. I don't think this be thread-safe. I see the codes. you are using File.mkdirs, which is actually not thread-safe. also, you are using file writing functions, which is not thread safe if multiple threads trying to write to a same file. So I don't think it is good to annote these 2 mojos as thread-safe. > CopyResourcesMojo and TestResourcesMojo is NOT thread-safe > ---------------------------------------------------------- > > Key: MRESOURCES-291 > URL: https://issues.apache.org/jira/browse/MRESOURCES-291 > Project: Maven Resources Plugin > Issue Type: Bug > Reporter: Jin Xu > Priority: Major > > If you try to make several sub-projects using this plugin to copy resources > from some folter to a same folder, or even overwriting some files, it would > crush. > I don't think this be thread-safe. > I see the codes. you are using File.mkdirs, which is actually not > thread-safe. also, you are using file writing functions, which is not thread > safe if multiple threads trying to write to a same file. > So I don't think it is good to annote these 2 mojos as thread-safe. > Please either remake that part, or remove the thread-safe annotation. -- This message was sent by Atlassian Jira (v8.20.10#820010)