Revert "479712 Added --yes to start.jar"
This reverts commit 14b638f8f7
.
This commit is contained in:
parent
f0deae82d4
commit
6e203c1ffa
|
@ -116,7 +116,7 @@ public class BaseBuilder
|
||||||
if (licensing.hasLicenses())
|
if (licensing.hasLicenses())
|
||||||
{
|
{
|
||||||
StartLog.debug("Requesting License Acknowledgement");
|
StartLog.debug("Requesting License Acknowledgement");
|
||||||
if (!licensing.acknowledgeLicenses(startArgs))
|
if (!licensing.acknowledgeLicenses())
|
||||||
{
|
{
|
||||||
StartLog.warn(EXITING_LICENSE_NOT_ACKNOWLEDGED);
|
StartLog.warn(EXITING_LICENSE_NOT_ACKNOWLEDGED);
|
||||||
System.exit(1);
|
System.exit(1);
|
||||||
|
|
|
@ -55,7 +55,7 @@ public class Licensing
|
||||||
return !licenseMap.isEmpty();
|
return !licenseMap.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean acknowledgeLicenses(StartArgs startArgs) throws IOException
|
public boolean acknowledgeLicenses() throws IOException
|
||||||
{
|
{
|
||||||
if (!hasLicenses())
|
if (!hasLicenses())
|
||||||
{
|
{
|
||||||
|
@ -92,7 +92,11 @@ public class Licensing
|
||||||
throw new RuntimeException("Test Configuration Missing - Pre-specify answer to (" + PROP_ACK_LICENSES + ") in test case");
|
throw new RuntimeException("Test Configuration Missing - Pre-specify answer to (" + PROP_ACK_LICENSES + ") in test case");
|
||||||
}
|
}
|
||||||
|
|
||||||
licenseAck = startArgs.isYes("%nProceed (y/N)? ");
|
BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
|
||||||
|
System.err.printf("%nProceed (y/N)? ");
|
||||||
|
String response = input.readLine();
|
||||||
|
|
||||||
|
licenseAck = (Utils.isNotBlank(response) && response.toLowerCase().startsWith("y"));
|
||||||
}
|
}
|
||||||
|
|
||||||
return licenseAck;
|
return licenseAck;
|
||||||
|
|
|
@ -18,15 +18,14 @@
|
||||||
|
|
||||||
package org.eclipse.jetty.start;
|
package org.eclipse.jetty.start;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
import java.io.OutputStream;
|
import java.io.OutputStream;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.nio.file.Files;
|
import java.nio.file.Files;
|
||||||
import java.nio.file.Path;
|
import java.nio.file.Path;
|
||||||
|
import java.nio.file.Paths;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
|
@ -171,7 +170,6 @@ public class StartArgs
|
||||||
private boolean licenseCheckRequired = false;
|
private boolean licenseCheckRequired = false;
|
||||||
private boolean testingMode = false;
|
private boolean testingMode = false;
|
||||||
|
|
||||||
private boolean yes = false;
|
|
||||||
private boolean help = false;
|
private boolean help = false;
|
||||||
private boolean stopCommand = false;
|
private boolean stopCommand = false;
|
||||||
private boolean listModules = false;
|
private boolean listModules = false;
|
||||||
|
@ -183,8 +181,7 @@ public class StartArgs
|
||||||
private boolean exec = false;
|
private boolean exec = false;
|
||||||
private String exec_properties;
|
private String exec_properties;
|
||||||
private boolean approveAllLicenses = false;
|
private boolean approveAllLicenses = false;
|
||||||
private BufferedReader input = new BufferedReader(new InputStreamReader(System.in));
|
|
||||||
|
|
||||||
public StartArgs()
|
public StartArgs()
|
||||||
{
|
{
|
||||||
classpath = new Classpath();
|
classpath = new Classpath();
|
||||||
|
@ -838,11 +835,6 @@ public class StartArgs
|
||||||
run = false;
|
run = false;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ("--yes".equals(arg))
|
|
||||||
{
|
|
||||||
yes = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ("--debug".equals(arg) || arg.startsWith("--start-log-file"))
|
if ("--debug".equals(arg) || arg.startsWith("--start-log-file"))
|
||||||
{
|
{
|
||||||
|
@ -1189,26 +1181,6 @@ public class StartArgs
|
||||||
this.run = run;
|
this.run = run;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isYes(String promptFormat,Object... args)
|
|
||||||
{
|
|
||||||
System.err.printf(promptFormat,args);
|
|
||||||
if (yes)
|
|
||||||
{
|
|
||||||
System.err.printf("--yes%n");
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
try
|
|
||||||
{
|
|
||||||
String response = input.readLine();
|
|
||||||
return (Utils.isNotBlank(response) && response.toLowerCase().startsWith("y"));
|
|
||||||
}
|
|
||||||
catch(IOException e)
|
|
||||||
{
|
|
||||||
e.printStackTrace();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
|
@ -1224,5 +1196,4 @@ public class StartArgs
|
||||||
builder.append("]");
|
builder.append("]");
|
||||||
return builder.toString();
|
return builder.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,10 +115,6 @@ Module Management:
|
||||||
${jetty.base} and are willing to forego some of the
|
${jetty.base} and are willing to forego some of the
|
||||||
safety checks built into the jetty-start mechanism.
|
safety checks built into the jetty-start mechanism.
|
||||||
|
|
||||||
--yes Automatically reply Yes to any questions asked by the
|
|
||||||
module installation mechanism. Useful for running module
|
|
||||||
commands from scripts.
|
|
||||||
|
|
||||||
|
|
||||||
Startup / Shutdown Command Line:
|
Startup / Shutdown Command Line:
|
||||||
--------------------------------
|
--------------------------------
|
||||||
|
|
Loading…
Reference in New Issue