我想使用maven-clean-plugin注释将@threadSafe标记为线程安全。有人能举个例子吗?
编辑:
升级到maven 3.0.5之后,我的构建得到了以下警告:(使用teamcity构建)
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] *****************************************************************Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * Your build is requesting parallel execution, but project *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * contains the following plugin(s) that are not marked as *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * @threadSafe to support parallel building. *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * While this /may/ work fine, please look for plugin updates *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * and/or request plugins be made thread-safe. *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * If reporting an issue, report it against the plugin in *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] * question, not against maven-core *Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] *****************************************************************Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] The following plugins are not marked @threadSafe in STRAW Main Application:Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] org.apache.maven.plugins:maven-clean-plugin:2.3Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] org.apache.maven.plugins:maven-install-plugin:2.2Agent time: 14:21:10
[18:51:10][com.dir.hay.straw:straw-parent] [WARNING] *****************************************************************从maven文档中,我也知道干净的插件是线程安全的。即使如此,我还是收到了警告。所以,我想我错过了什么地方。
发布于 2014-06-27 14:17:17
首先,您要尝试使用的是一个旧风格的XDoclet注释,它被废弃了,您应该使用像这样的Java 5注释。
你想做什么?maven-洁净插件已经是线程安全的了。。您使用的是哪个版本的maven清洁插件?
@Mojo( name = "WhatEver",
threadSafe = true)
public class MyMojo
extends AbstractMojohttps://stackoverflow.com/questions/24448623
复制相似问题