Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * The MIT License
  * Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
  * Permission is hereby granted, free of charge, to any person obtaining a copy
  * of this software and associated documentation files (the "Software"), to deal
  * in the Software without restriction, including without limitation the rights
  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.RUNTIME;
Installs the specified plugin before launching Hudson.

Kohsuke Kawaguchi
public @interface WithPlugin {
Name of the plugin. For now, this has to be one of the plugins statically available in resources "/plugins/NAME". TODO: support retrieval through Maven repository.
    String value();
    public class RunnerImpl extends Recipe.Runner<WithPlugin> {
        private WithPlugin a;
        public void setup(HudsonTestCase testCaseWithPlugin recipethrows Exception {
             = recipe;
            testCase.useLocalPluginManager = true;
        public void decorateHome(HudsonTestCase testCaseFile homethrows Exception {
            URL res = getClass().getClassLoader().getResource("plugins/" + .value());
            FileUtils.copyURLToFile(res,new File(home,"plugins/"+.value()));
New to GrepCode? Check out our FAQ X