提交 8a954640 编写于 作者: D Daniel Spilker

use array instead of CSV

上级 18d4a29a
......@@ -50,14 +50,14 @@ import java.net.URL;
@Retention(RUNTIME)
public @interface WithPlugin {
/**
* Comma separated list of plugin names.
* Name of the plugins.
*
* For now, this has to be one or more of the plugins statically available in resources
* "/plugins/NAME". TODO: support retrieval through Maven repository.
* TODO: load the HPI file from $M2_REPO or $USER_HOME/.m2 by naming e.g. org.jvnet.hudson.plugins:monitoring:hpi:1.34.0
* (used in conjunction with the depepdency in POM to ensure it's available)
*/
String value();
String[] value();
class RunnerImpl extends Recipe.Runner<WithPlugin> {
private WithPlugin a;
......@@ -70,7 +70,7 @@ public @interface WithPlugin {
@Override
public void decorateHome(HudsonTestCase testCase, File home) throws Exception {
for (String plugin : a.value().split("\\s*,\\s*")) {
for (String plugin : a.value()) {
URL res = getClass().getClassLoader().getResource("plugins/" + plugin);
FileUtils.copyURLToFile(res, new File(home, "plugins/" + plugin));
}
......@@ -88,7 +88,7 @@ public @interface WithPlugin {
@Override
public void decorateHome(JenkinsRule jenkinsRule, File home) throws Exception {
for (String plugin : a.value().split("\\s*,\\s*")) {
for (String plugin : a.value()) {
URL res = getClass().getClassLoader().getResource("plugins/" + plugin);
FileUtils.copyURLToFile(res, new File(home, "plugins/" + plugin));
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册