Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Revert "Support assigning 0 to http/https port for OS assigned port."

This reverts commit e4c63c6.

Conflicts:
	grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/fork/ForkedGrailsProcess.groovy
	grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat/InlineExplodedTomcatServer.groovy
	grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat/IsolatedTomcat.java
	grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat/IsolatedWarTomcatServer.groovy
	grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat/TomcatKillSwitch.java
	grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat/TomcatServer.groovy
	grails-plugin-tomcat/src/main/groovy/org/grails/plugins/tomcat/fork/ForkedTomcatServer.groovy
	scripts/_GrailsTest.groovy
  • Loading branch information...
commit 7c105ab76efb54e915bc1487785c0e2b3208b0c5 1 parent 230b780
@graemerocher graemerocher authored
View
14 grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/cli/api/BaseSettingsApi.java
@@ -144,26 +144,12 @@ public int getServerPort() {
return serverPort;
}
- public void setServerPort(Integer port) {
- if (port != null) {
- System.setProperty("server.port", port.toString());
- System.setProperty("grails.server.port.http", port.toString());
- }
- }
-
public int getServerPortHttps() {
int serverPortHttps = Integer.valueOf(getPropertyValue("server.port.https", 8443).toString());
serverPortHttps = Integer.valueOf(getPropertyValue("grails.server.port.https", serverPortHttps).toString());
return serverPortHttps;
}
- public void setServerPortHttps(Integer port) {
- if (port != null) {
- System.setProperty("server.port.https", port.toString());
- System.setProperty("grails.server.port.https", port.toString());
- }
- }
-
public String getServerHost() {
return (String)getPropertyValue("grails.server.host", null);
}
View
8 ...b/src/main/groovy/org/codehaus/groovy/grails/project/container/GrailsProjectRunner.groovy
@@ -195,7 +195,7 @@ class GrailsProjectRunner extends BaseSettingsApi {
EmbeddableServer runServer(Map args) {
try {
eventListener.triggerEvent("StatusUpdate","Running Grails application")
-
+ def message = "Server running. Browse to http://${args.host ?: 'localhost'}:${args.httpPort}$serverContextPath"
EmbeddableServer server = args["server"]
if (server.hasProperty('eventListener')) {
@@ -205,7 +205,6 @@ class GrailsProjectRunner extends BaseSettingsApi {
server.grailsConfig = config
}
- def httpsMessage = ""
profile("start server") {
try { new ServerSocket(args.httpPort).close() }
@@ -226,15 +225,12 @@ class GrailsProjectRunner extends BaseSettingsApi {
server.startSecure args.host, args.httpPort, args.httpsPort
// Update the message to reflect the fact we are running HTTPS as well.
- setServerPortHttps(server.localHttpsPort)
- httpsMessage = " or https://${args.host ?: 'localhost'}:${server.localHttpsPort}$serverContextPath"
+ message += " or https://${args.host ?: 'localhost'}:${args.httpsPort}$serverContextPath"
}
else {
server.start args.host, args.httpPort
}
}
- setServerPort(server.localHttpPort)
- def message = "Server running. Browse to http://${args.host ?: 'localhost'}:${server.localHttpPort}$serverContextPath" + httpsMessage
eventListener.triggerEvent("StatusFinal", message)
boolean isWindows = System.getProperty("os.name").toLowerCase().indexOf("windows") != -1
View
2  scripts/StopApp.groovy
@@ -29,7 +29,7 @@ target('default': "Stops a forked Grails application") {
try {
grailsConsole.updateStatus "Stopping Grails Server..."
- def url = "http://${serverHost ?: 'localhost'}:${serverPort-1}"
+ def url = "http://${serverHost ?: 'localhost'}:${serverPort+1}"
grailsConsole.verbose "URL to stop server is $url"
new URL(url).getText(connectTimeout: 10000, readTimeout: 10000)
grailsConsole.updateStatus "Server Stopped"
View
1  scripts/_GrailsTest.groovy
@@ -94,6 +94,7 @@ target(allTests: "Runs the project's tests.") {
else {
projectTestRunner.runAllTests(argsMap, false)
}
+
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.