Unverified Commit c0f4399c authored by Eric Barboni's avatar Eric Barboni Committed by GitHub
Browse files

Merge pull request #3086 from apache/delivery

delivery to release125
parents 19be548f b805a687
......@@ -116,7 +116,7 @@ TIME_HOURS={0,choice, 1#{0} hour|2#{0} hours}
TIME_MINUTES={0,choice, 1#{0} minute|2#{0} minutes}
TIME_SECONDS={0,choice, 1#{0} second|2#{0} seconds}
TIME_MILISECONDS={0} ms
TIME_SEPARATOR=,\
TIME_SEPARATOR=,\
LBL_InstallLocation=Installation &Location:
V3_PRELUDE_NAME=GlassFish v3 Prelude
V3_EE6_NAME=GlassFish Server 3
......@@ -174,7 +174,7 @@ AddServerLocationVisualPanel.agreeCheckBox.AccessibleContext.accessibleDescripti
AddServerLocationVisualPanel.remoteDomainRadioButton=Remote Domain
AddServerLocationVisualPanel.localDomainRadioButton=Local Domain
AddDomainLocationVisualPanel.targetValueLabel.text=&Target:
AddDomainLocationVisualPanel.targetValueField.text=\ \ \ \ \ \ \ \ \ \ \ \ \ \
AddDomainLocationVisualPanel.targetValueField.text=\ \ \ \ \ \ \ \ \ \ \ \ \ \
AddDomainLocationVisualPanel.userNameLabel.text=&User Name:
AddDomainLocationVisualPanel.passwordLabel.text=Pass&word:
AddDomainLocationVisualPanel.httpPortFieldLabel.text=HTTP Port:
......
......@@ -303,19 +303,33 @@ public class ServerTasks {
*/
private static void appendOptions(StringBuilder argumentBuf,
List<String> optList, Map<String, String> varMap) {
final String METHOD = "appendOptions";
HashMap<String, String> keyValueArgs = new HashMap<>();
LinkedList<String> keyOrder = new LinkedList<>();
String name, value;
final boolean isWindows = OsUtils.isWin();
final String METHOD = "appendOptions"; // NOI18N
// override the values that are found in the domain.xml file.
// this is totally a copy/paste from StartTomcat...
final Map<String,String> PROXY_PROPS = new HashMap<>();
for(String s: new String[] {
"http.proxyHost", // NOI18N
"http.proxyPort", // NOI18N
"http.nonProxyHosts", // NOI18N
"https.proxyHost", // NOI18N
"https.proxyPort", // NOI18N
}) {
PROXY_PROPS.put(JavaUtils.systemPropertyName(s), s);
PROXY_PROPS.put("-D\"" + s, s); // NOI18N
PROXY_PROPS.put("-D" + s, s); // NOI18N
}
// first process optList aquired from domain.xml
for (String opt : optList) {
String name, value;
// do placeholder substitution
opt = Utils.doSub(opt.trim(), varMap);
int splitIndex = opt.indexOf('=');
// && !opt.startsWith("-agentpath:") is a temporary hack to
// not touch already quoted -agentpath. Later we should handle it
// in a better way.
if (splitIndex != -1 && !opt.startsWith("-agentpath:")) {
if (splitIndex != -1 && !opt.startsWith("-agentpath:")) { // NOI18N
// key=value type of option
name = opt.substring(0, splitIndex);
value = Utils.quote(opt.substring(splitIndex + 1));
......@@ -325,44 +339,27 @@ public class ServerTasks {
} else {
name = opt;
value = null;
LOGGER.log(Level.FINER, METHOD, "jvmOpt", name);
}
if (!keyValueArgs.containsKey(name)) {
keyOrder.add(name);
LOGGER.log(Level.FINER, METHOD, "jvmOpt", name); // NOI18N
}
keyValueArgs.put(name, value);
}
// override the values that are found in the domain.xml file.
// this is totally a copy/paste from StartTomcat...
final String[] PROXY_PROPS = {
"http.proxyHost", // NOI18N
"http.proxyPort", // NOI18N
"http.nonProxyHosts", // NOI18N
"https.proxyHost", // NOI18N
"https.proxyPort", // NOI18N
};
boolean isWindows = OsUtils.isWin();
for (String prop : PROXY_PROPS) {
value = System.getProperty(prop);
if (value != null && value.trim().length() > 0) {
if (isWindows && "http.nonProxyHosts".equals(prop)) {
// enclose in double quotes to escape the pipes separating
// the hosts on windows
value = "\"" + value + "\""; // NOI18N
if(PROXY_PROPS.containsKey(name)) {
String sysValue = System.getProperty(PROXY_PROPS.get(name));
if (sysValue != null && sysValue.trim().length() > 0) {
if (isWindows && "http.nonProxyHosts".equals(PROXY_PROPS.get(name))) { // NOI18N
// enclose in double quotes to escape the pipes separating
// the hosts on windows
sysValue = "\"" + value + "\""; // NOI18N
}
name = JavaUtils.systemPropertyName(PROXY_PROPS.get(name));
value = sysValue;
}
keyValueArgs.put(JavaUtils.systemPropertyName(prop), value);
}
}
// appending key=value options to the command line argument
// using the same order as they came in argument - important!
for (String key : keyOrder) {
argumentBuf.append(' ');
argumentBuf.append(key);
if (keyValueArgs.get(key) != null) {
argumentBuf.append(name);
if(value != null) {
argumentBuf.append("="); // NOI18N
argumentBuf.append(keyValueArgs.get(key));
argumentBuf.append(value);
}
}
}
......
......@@ -23,9 +23,9 @@
<tools lib="lib">
<asadmin jar="client/appserver-cli.jar"/>
</tools>
<java version="1.8">
<platform version="1.7"/>
<platform version="1.8"/>
<java version="11">
<platform version="11"/>
<platform version="16"/>
</java>
<javaee version="1.8">
<profile version="1.3" type="full"/>
......
......@@ -44,11 +44,15 @@ public enum JavaSEPlatform {
v1_5,
/** JavaSE 1.6. */
v1_6,
/** JavaEE 1.7. */
/** JavaSE 1.7. */
v1_7,
/** JavaEE 1.8. */
v1_8;
/** JavaSE 1.8. */
v1_8,
/** JavaSE 11. */
v11,
/** JavaSE 16. */
v16;
////////////////////////////////////////////////////////////////////////////
// Class attributes //
////////////////////////////////////////////////////////////////////////////
......@@ -83,6 +87,13 @@ public enum JavaSEPlatform {
/** A <code>String</code> representation of v1_8 value. */
static final String V1_8_STR = "1.8";
/** A <code>String</code> representation of v11 value. */
static final String V11_STR = "11";
/** A <code>String</code> representation of v16 value. */
static final String V16_STR = "16";
/**
* Stored <code>String</code> values for backward <code>String</code>
* conversion.
......@@ -142,6 +153,9 @@ public enum JavaSEPlatform {
case v1_6: return V1_6_STR;
case v1_7: return V1_7_STR;
case v1_8: return V1_8_STR;
case v11: return V11_STR;
case v16: return V16_STR;
// This is unrecheable. Being here means this class does not handle
// all possible values correctly.
default: throw new ServerConfigException(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment