Permalink
Browse files

cleanup

  • Loading branch information...
1 parent fdc1be1 commit 835947fb56277a4d6abef72ef9179fdad06846fd @burtbeckwith burtbeckwith committed Jun 22, 2010
Showing with 1,652 additions and 1,629 deletions.
  1. +32 −21 scripts/AddProxy_.groovy
  2. +14 −14 scripts/BugReport.groovy
  3. +4 −4 scripts/Clean.groovy
  4. +17 −5 scripts/ClearProxy_.groovy
  5. +7 −7 scripts/Compile.groovy
  6. +15 −15 scripts/Console.groovy
  7. +4 −4 scripts/CreateApp_.groovy
  8. +7 −7 scripts/CreateController.groovy
  9. +5 −5 scripts/CreateDomainClass.groovy
  10. +6 −6 scripts/CreateFilters.groovy
  11. +28 −28 scripts/CreateHibernateCfgXml.groovy
  12. +6 −6 scripts/CreateIntegrationTest.groovy
  13. +4 −4 scripts/CreatePlugin_.groovy
  14. +6 −5 scripts/CreateScript.groovy
  15. +6 −6 scripts/CreateService.groovy
  16. +6 −6 scripts/CreateTagLib.groovy
  17. +6 −6 scripts/CreateUnitTest.groovy
  18. +21 −20 scripts/DependencyReport.groovy
  19. +1 −1 scripts/Doc.groovy
  20. +6 −6 scripts/GenerateAll.groovy
  21. +8 −8 scripts/GenerateController.groovy
  22. +8 −8 scripts/GenerateViews.groovy
  23. +38 −39 scripts/Help_.groovy
  24. +25 −26 scripts/Init.groovy
  25. +31 −35 scripts/InstallDependency.groovy
  26. +1 −1 scripts/InstallPlugin.groovy
  27. +2 −1 scripts/InstallTemplates.groovy
  28. +39 −42 scripts/IntegrateWith.groovy
  29. +3 −3 scripts/Interactive.groovy
  30. +5 −2 scripts/ListPluginUpdates.groovy
  31. +15 −15 scripts/ListPlugins_.groovy
  32. +4 −4 scripts/PackagePlugin_.groovy
  33. +176 −189 scripts/ReleasePlugin.groovy
  34. +24 −13 scripts/RemoveProxy_.groovy
  35. +1 −1 scripts/RunApp.groovy
  36. +21 −21 scripts/RunWar.groovy
  37. +24 −4 scripts/SchemaExport.groovy
  38. +19 −19 scripts/SetProxy_.groovy
  39. +4 −3 scripts/SetVersion.groovy
  40. +11 −12 scripts/Shell.groovy
  41. +12 −16 scripts/Stats.groovy
  42. +19 −20 scripts/TestApp.groovy
  43. +22 −26 scripts/Upgrade.groovy
  44. +18 −18 scripts/War.groovy
  45. +1 −1 scripts/_GrailsArgParsing.groovy
  46. +49 −49 scripts/_GrailsBootstrap.groovy
  47. +27 −27 scripts/_GrailsClasspath.groovy
  48. +7 −7 scripts/_GrailsClean.groovy
  49. +66 −73 scripts/_GrailsCompile.groovy
  50. +30 −28 scripts/_GrailsCreateArtifacts.groovy
  51. +9 −9 scripts/_GrailsCreateProject.groovy
  52. +80 −77 scripts/_GrailsDocs.groovy
  53. +6 −8 scripts/_GrailsEvents.groovy
  54. +10 −12 scripts/_GrailsGenerate.groovy
  55. +14 −17 scripts/_GrailsInit.groovy
  56. +123 −126 scripts/_GrailsPackage.groovy
  57. +32 −31 scripts/_GrailsPluginDev.groovy
  58. +114 −116 scripts/_GrailsPlugins.groovy
  59. +20 −14 scripts/_GrailsProxy.groovy
  60. +18 −18 scripts/_GrailsRun.groovy
  61. +11 −13 scripts/_GrailsSettings.groovy
  62. +66 −60 scripts/_GrailsTest.groovy
  63. +107 −111 scripts/_GrailsWar.groovy
  64. +38 −39 scripts/_PackagePlugins.groovy
  65. +93 −91 scripts/_PluginDependencies.groovy
View
@@ -1,3 +1,18 @@
+/*
+ * Copyright 2004-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* @author Graeme Rocher
@@ -8,31 +23,27 @@ includeTargets << grailsScript("_GrailsArgParsing")
target(default:"Adds a proxy configuration") {
depends(parseArguments)
-
- if(!argsMap.params) {
+ if (!argsMap.params) {
println msg()
exit 1
}
+
+ if (argsMap.host && argsMap.port) {
+ def settingsFile = grailsSettings.proxySettingsFile
+ config = grailsSettings.proxySettings
+
+ config[argsMap.params[0]] = ['http.proxyHost':argsMap.host,
+ 'http.proxyPort':argsMap.port,
+ "http.proxyUserName": argsMap.username?: '',
+ "http.proxyPassword": argsMap.password?: '']
+
+ settingsFile.withWriter { w -> config.writeTo(w) }
+
+ println "Added proxy ${argsMap.params[0]} to ${settingsFile}"
+ }
else {
- if(argsMap.host && argsMap.port) {
- def settingsFile = grailsSettings.proxySettingsFile
- config = grailsSettings.proxySettings
-
- config[argsMap.params[0]] = ['http.proxyHost':argsMap.host,
- 'http.proxyPort':argsMap.port,
- "http.proxyUserName": argsMap.username?: '',
- "http.proxyPassword": argsMap.password?: '']
-
- settingsFile.withWriter { w ->
- config.writeTo(w)
- }
-
- println "Added proxy ${argsMap.params[0]} to ${settingsFile}"
- }
- else {
- println msg()
- exit 1
- }
+ println msg()
+ exit 1
}
}
View
@@ -33,24 +33,24 @@ artifactNames = [
'i18n',
'services',
'taglib',
- 'views'
+ 'views'
]
target ('default': "Creates a ZIP containing source artifacts for reporting bugs") {
- depends( checkVersion )
-
- def fileName = new File(basedir).name
- def date = new java.text.SimpleDateFormat("ddMMyyyy").format(new Date())
- def zipName = "${basedir}/${fileName}-bug-report-${date}.zip"
+ depends(checkVersion)
- ant.zip(destfile:zipName) {
- fileset(dir: "${basedir}", includes: "grails-app/**/*")
- fileset(dir: "${basedir}", includes: "test/**/*")
- fileset(dir: "${basedir}", includes: "scripts/**/*")
- fileset(dir: "${basedir}", includes: "spring/**/*")
- fileset(dir: "${basedir}", includes: "src/**/*")
- fileset(file: "${basedir}/application.properties")
- }
+ def fileName = new File(basedir).name
+ def date = new java.text.SimpleDateFormat("ddMMyyyy").format(new Date())
+ def zipName = "${basedir}/${fileName}-bug-report-${date}.zip"
+
+ ant.zip(destfile: zipName) {
+ fileset(dir: "${basedir}", includes: "grails-app/**/*")
+ fileset(dir: "${basedir}", includes: "test/**/*")
+ fileset(dir: "${basedir}", includes: "scripts/**/*")
+ fileset(dir: "${basedir}", includes: "spring/**/*")
+ fileset(dir: "${basedir}", includes: "src/**/*")
+ fileset(file: "${basedir}/application.properties")
+ }
event("StatusFinal", ["Created bug-report ZIP at ${zipName}"])
}
View
@@ -1,12 +1,12 @@
/*
* Copyright 2004-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
/**
* Gant script that cleans a Grails project
- *
+ *
* @author Graeme Rocher
*
* @since 0.4
View
@@ -1,18 +1,30 @@
+/*
+ * Copyright 2004-2005 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
/**
* @author Graeme Rocher
* @since 1.2.3
*/
-target(default:"Clears a proxy configuration") {
+target(default: "Clears a proxy configuration") {
def settingsFile = grailsSettings.proxySettingsFile
config = grailsSettings.proxySettings
config.remove('currentProxy')
- settingsFile.withWriter { w ->
- config.writeTo(w)
- }
+ settingsFile.withWriter { w -> config.writeTo(w) }
println "Cleared proxy settings."
}
-
View
@@ -1,12 +1,12 @@
/*
* Copyright 2004-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,17 +16,17 @@
/**
* Gant script that compiles Groovy and Java files in the src tree
- *
+ *
* @author Graeme Rocher
*
* @since 0.4
*/
includeTargets << grailsScript("_GrailsCompile")
-
-if(args?.indexOf('--gsp')>-1)
+if (args?.indexOf('--gsp') > -1) {
setDefaultTarget("compilepackage")
+}
else {
setDefaultTarget("compile")
-}
+}
View
@@ -1,12 +1,12 @@
/*
* Copyright 2004-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
/**
* Gant script that loads the Grails console
- *
+ *
* @author Graeme Rocher
*
* @since 0.4
@@ -28,16 +28,16 @@ import org.codehaus.groovy.grails.web.context.ServletContextHolder as SCH
includeTargets << grailsScript("_GrailsBootstrap")
target ('default': "Load the Grails interactive Swing console") {
- depends( checkVersion, configureProxy, packageApp, classpath)
- console()
-}
+ depends(checkVersion, configureProxy, packageApp, classpath)
+ console()
+}
target(console:"The console implementation target") {
// classLoader = new URLClassLoader([classesDir.toURI().toURL()] as URL[], rootLoader)
// Thread.currentThread().setContextClassLoader(classLoader)
- loadApp()
- configureApp()
+ loadApp()
+ configureApp()
try {
def console = createConsole()
@@ -93,10 +93,10 @@ createConsole = {
}
class ConsoleFocusListener implements java.awt.event.FocusListener{
- String text
- void focusGained(java.awt.event.FocusEvent e){
- e.source.text = text
- e.source.removeFocusListener(this)
- }
- void focusLost(java.awt.event.FocusEvent e){}
+ String text
+ void focusGained(java.awt.event.FocusEvent e) {
+ e.source.text = text
+ e.source.removeFocusListener(this)
+ }
+ void focusLost(java.awt.event.FocusEvent e){}
}
@@ -1,12 +1,12 @@
/*
* Copyright 2004-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
/**
* Gant script that handles the creation of Grails applications
- *
+ *
* @author Graeme Rocher
*
* @since 0.4
@@ -1,12 +1,12 @@
/*
* Copyright 2004-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
/**
* Gant script that creates a new Grails controller
- *
+ *
* @author Graeme Rocher
*
* @since 0.4
@@ -32,11 +32,11 @@ target ('default': "Creates a new controller") {
promptForName(type: type)
def name = argsMap["params"][0]
- createArtifact(name: name, suffix: type, type: type, path: "grails-app/controllers")
+ createArtifact(name: name, suffix: type, type: type, path: "grails-app/controllers")
def viewsDir = "${basedir}/grails-app/views/${propertyName}"
ant.mkdir(dir:viewsDir)
- event("CreatedFile", [viewsDir])
+ event("CreatedFile", [viewsDir])
- createUnitTest(name: name, suffix: type, superClass: "ControllerUnitTestCase")
+ createUnitTest(name: name, suffix: type, superClass: "ControllerUnitTestCase")
}
@@ -1,12 +1,12 @@
/*
* Copyright 2004-2005 the original author or authors.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
/**
* Gant script that creates a Grails domain class
- *
+ *
* @author Graeme Rocher
*
* @since 0.4
@@ -32,5 +32,5 @@ target ('default': "Creates a new domain class") {
def name = argsMap["params"][0]
createArtifact(name: name, suffix: "", type: "DomainClass", path: "grails-app/domain")
- createUnitTest(name: name, suffix: "")
+ createUnitTest(name: name, suffix: "")
}
Oops, something went wrong.

0 comments on commit 835947f

Please sign in to comment.