mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-11-20 07:22:32 +00:00
hudson-cli.jar to jenkins-cli.jar rename
This commit is contained in:
1 parent
294656a558
commit
f08fd38a76
9 files changed
+16
-14
No files matched your search
@@ -61,7 +61,7 @@ import java.util.logging.Logger;
|
||||
* <h2>How does a CLI command work</h2>
|
||||
* <p>
|
||||
* The users starts {@linkplain CLI the "CLI agent"} on a remote system, by specifying arguments, like
|
||||
* <tt>"java -jar hudson-cli.jar command arg1 arg2 arg3"</tt>. The CLI agent creates
|
||||
* <tt>"java -jar jenkins-cli.jar command arg1 arg2 arg3"</tt>. The CLI agent creates
|
||||
* a remoting channel with the server, and it sends the entire arguments to the server, along with
|
||||
* the remoted stdin/out/err.
|
||||
*
|
||||
@@ -268,7 +268,7 @@ public abstract class CLICommand implements ExtensionPoint, Cloneable {
|
||||
protected abstract int run() throws Exception;
|
||||
|
||||
protected void printUsage(PrintStream stderr, CmdLineParser p) {
|
||||
stderr.println("java -jar hudson-cli.jar "+getName()+" args...");
|
||||
stderr.println("java -jar jenkins-cli.jar "+getName()+" args...");
|
||||
printUsageSummary(stderr);
|
||||
p.printUsage(stderr);
|
||||
}
|
||||
|
||||
@@ -284,10 +284,12 @@ public abstract class Slave extends Node implements Serializable {
|
||||
}
|
||||
|
||||
public URL getURL() throws MalformedURLException {
|
||||
URL res = Hudson.getInstance().servletContext.getResource("/WEB-INF/" + fileName);
|
||||
String name = fileName;
|
||||
if (name.equals("hudson-cli.jar")) name="jenkins-cli.jar";
|
||||
URL res = Hudson.getInstance().servletContext.getResource("/WEB-INF/" + name);
|
||||
if(res==null) {
|
||||
// during the development this path doesn't have the files.
|
||||
res = new URL(new File(".").getAbsoluteFile().toURI().toURL(),"target/generated-resources/WEB-INF/"+fileName);
|
||||
res = new URL(new File(".").getAbsoluteFile().toURI().toURL(),"target/generated-resources/WEB-INF/"+name);
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user