【问题标题】:Thread-safe warning when executing maven parallel build执行 Maven 并行构建时的线程安全警告
【发布时间】:2013-08-16 07:05:40
【问题描述】:

我正在运行 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] ****************************************************************

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

我可以忽略这个吗?

【问题讨论】:

    标签: maven maven-3 mojo


    【解决方案1】:

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

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

    【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-08-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多