@@ -57,20 +58,20 @@ public class InstallPluginCommand extends CLICommand {
@Argument(metaVar="SOURCE",required=true,usage="If this points to a local file, that file will be installed. "+
"If this is an URL, Jenkins downloads the URL and installs that as a plugin."+
"Otherwise the name is assumed to be the short name of the plugin in the existing update center (like \"findbugs\"),"+
"and the plugin will be installed from the update center")
"and the plugin will be installed from the update center.")
publicList<String>sources=newArrayList<String>();
@Option(name="-name",usage="If specified, the plugin will be installed as this short name (whereas normally the name is inferred from the source name automatically.)")
@Option(name="-name",usage="If specified, the plugin will be installed as this short name (whereas normally the name is inferred from the source name automatically).")
publicStringname;
@Option(name="-restart",usage="Restart Jenkins upon successful installation")
@Option(name="-restart",usage="Restart Jenkins upon successful installation.")
publicbooleanrestart;
@Option(name="-deploy",usage="Deploy plugins right away without postponing them until the reboot.")
publicbooleandynamicLoad;
protectedintrun()throwsException{
Jenkinsh=Jenkins.getInstance();
Jenkinsh=Jenkins.getActiveInstance();
h.checkPermission(PluginManager.UPLOAD_PLUGINS);
PluginManagerpm=h.getPluginManager();
...
...
@@ -113,8 +114,11 @@ public class InstallPluginCommand extends CLICommand {