Permalink
Browse files

whitespace

  • Loading branch information...
1 parent 32417de commit db568e47cbc3186ecd961c6f38a7481e1fa54bfd Burt Beckwith committed Aug 15, 2012
@@ -30,7 +30,7 @@ import org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener
import org.codehaus.groovy.grails.plugins.GrailsPluginInfo
/**
- * Creates a WAR file from a Grails project
+ * Creates a WAR file from a Grails project.
*
* @author Graeme Rocher
* @since 2.1
@@ -39,7 +39,7 @@ class GrailsProjectWarCreator extends BaseSettingsApi {
boolean includeJars = true
boolean buildExplodedWar
- String warName = null
+ String warName
BuildSettings grailsSettings
GrailsBuildEventListener eventListener
def additionalEventArgs
@@ -59,8 +59,11 @@ class GrailsProjectWarCreator extends BaseSettingsApi {
private GrailsConsole grailsConsole = GrailsConsole.getInstance()
Closure defaultWarDependencies
- GrailsProjectWarCreator(BuildSettings settings, GrailsBuildEventListener buildEventListener,GrailsProjectPackager projectPackager, AntBuilder ant = new AntBuilder(), boolean interactive = false) {
+ GrailsProjectWarCreator(BuildSettings settings, GrailsBuildEventListener buildEventListener, GrailsProjectPackager projectPackager,
+ AntBuilder ant = new AntBuilder(), boolean interactive = false) {
+
super(settings, buildEventListener, interactive)
+
this.eventListener = buildEventListener
this.projectPackager = projectPackager
this.ant = ant
@@ -111,7 +114,6 @@ class GrailsProjectWarCreator extends BaseSettingsApi {
void packageWar() {
-
def includeOsgiHeaders = grailsSettings.projectWarOsgiHeaders
try {
@@ -297,15 +299,13 @@ class GrailsProjectWarCreator extends BaseSettingsApi {
entry(key:Metadata.SERVLET_VERSION, value:grailsSettings.servletVersion)
}
- ant.replace(file:"${stagingDir}/WEB-INF/applicationContext.xml",
- token:"classpath*:", value:"")
+ ant.replace(file:"${stagingDir}/WEB-INF/applicationContext.xml", token:"classpath*:", value:"")
if (buildConfig.grails.war.resources instanceof Closure) {
Closure callable = buildConfig.grails.war.resources
callable.delegate = ant
callable.resolveStrategy = Closure.DELEGATE_FIRST
-
if (callable.maximumNumberOfParameters == 1) {
callable(stagingDir)
}
@@ -338,7 +338,7 @@ class GrailsProjectWarCreator extends BaseSettingsApi {
ant.jar(destfile:warName, basedir:stagingDir, manifest:manifestFile)
}
- eventListener.triggerEvent("CreateWarEnd",warName, stagingDir)
+ eventListener.triggerEvent("CreateWarEnd", warName, stagingDir)
}
finally {
if (!buildExplodedWar) cleanUpAfterWar()
@@ -370,8 +370,7 @@ class GrailsProjectWarCreator extends BaseSettingsApi {
// The command-line argument takes precedence.
warName = warFileDest
- // Find out whether WAR name is an absolute file path or a
- // relative one.
+ // Find out whether WAR name is an absolute file path or a relative one.
def warFile = new File(warName.toString())
if (!warFile.absolute) {
// It's a relative path, so adjust it for 'basedir'.
@@ -15,31 +15,29 @@
*/
package org.codehaus.groovy.grails.project.container
-import org.codehaus.groovy.grails.project.packaging.GrailsProjectPackager
-import org.codehaus.groovy.grails.project.packaging.GrailsProjectWarCreator
+import grails.build.logging.GrailsConsole
import grails.util.Metadata
+import grails.web.container.EmbeddableServer
import grails.web.container.EmbeddableServerFactory
-
-import org.codehaus.groovy.grails.cli.api.BaseSettingsApi
-import grails.build.logging.GrailsConsole
-import org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener
import groovy.transform.CompileStatic
-import grails.web.container.EmbeddableServer
-import java.awt.event.ActionListener
+
import java.awt.event.ActionEvent
-import org.codehaus.groovy.grails.cli.ScriptExitException
+import java.awt.event.ActionListener
+import org.codehaus.groovy.grails.cli.ScriptExitException
+import org.codehaus.groovy.grails.cli.api.BaseSettingsApi
import org.codehaus.groovy.grails.cli.support.BuildSettingsAware
+import org.codehaus.groovy.grails.cli.support.GrailsBuildEventListener
+import org.codehaus.groovy.grails.project.packaging.GrailsProjectPackager
+import org.codehaus.groovy.grails.project.packaging.GrailsProjectWarCreator
/**
- * Responsible for running the container embedded within the current JVM
+ * Runs the container embedded within the current JVM.
*
* @author Graeme Rocher
* @since 2.2
*/
-
-class GrailsProjectRunner extends BaseSettingsApi{
-
+class GrailsProjectRunner extends BaseSettingsApi {
public static String SCHEME_HTTP = "http"
public static String SCHEME_HTTPS = "https"
@@ -58,7 +56,6 @@ class GrailsProjectRunner extends BaseSettingsApi{
boolean usingSecureServer = false
private ConfigObject config
-
GrailsProjectRunner(GrailsProjectPackager projectPackager, GrailsProjectWarCreator warCreator, ClassLoader classLoader) {
super(projectPackager.buildSettings, warCreator.eventListener, false)
initialize(projectPackager, warCreator, classLoader)
View
@@ -106,12 +106,14 @@ target(stopPluginScanner: "Stops the plugin manager's scanner that detects chang
target(watchContext: "Watches the WEB-INF/classes directory for changes and restarts the server if necessary") {
depends(classpath)
- if (InteractiveMode.current) {
- Thread.start {
- def im = InteractiveMode.current
- im.grailsServer = grailsServer
- im.run()
- }
+ def im = InteractiveMode.current
+ if (!im) {
+ return
+ }
+
+ Thread.start {
+ im.grailsServer = grailsServer
+ im.run()
}
keepServerAlive()

0 comments on commit db568e4

Please sign in to comment.