执行maven并行构建时的线程安全警告

时间:2013-08-14 10:57:03

标签: maven maven-3 mojo

我正在运行Maven并行构建。我正在接受一些警告。

[WARNING] *****************************************************************
[WARNING] * Your build is requesting parallel execution, but project      *
[WARNING] * contains the following plugin(s) that are not marked as       *
[WARNING] * @threadSafe to support parallel building.                     *
[WARNING] * While this /may/ work fine, please look for plugin updates    *
[WARNING] * and/or request plugins be made thread-safe.                   *
[WARNING] * If reporting an issue, report it against the plugin in        *
[WARNING] * question, not against maven-core                              *
[WARNING] *****************************************************************
[WARNING] The following plugins are not marked @threadSafe in my-project:
[WARNING] org.apache.maven.plugins:maven-clean-plugin:2.1.1
[WARNING] org.codehaus.mojo:cobertura-maven-plugin:2.2
[WARNING] ****************************************************************

构建是成功的。有人可以告诉我以下插件的哪个版本是线程安全的。

我可以简单地忽略这一点。

1 个答案:

答案 0 :(得分:1)

org.apache.maven.plugins:maven-clean-plugin:2.5org.codehaus.mojo:cobertura-maven-plugin:2.5.2都是线程安全的(来自https://maven.apache.org/plugins/

大多数情况下,此警告无需担心,但如果您使用并行构建功能,我建议您为插件使用线程安全版本。