pastebin - collaborative debugging

pastebin is a collaborative debugging tool allowing you to share and modify code snippets while chatting on IRC, IM or a message board.

This site is developed to XHTML and CSS2 W3C standards. If you see this paragraph, your browser does not support those standards and you need to upgrade. Visit WaSP for a variety of options.

Groovy pastebin - collaborative debugging tool View Help


Posted by jameslorenzen on Sun 10 Aug 05:02
report abuse | View followups from Anonymous | download | new post

  1. import org.codehaus.groovy.grails.commons.GrailsClassUtils as GCU
  2.  
  3. /**
  4.  * This script installs the javascript library extjs available from
  5.  * http://www.extjs.com. Requires the zip file be present in the
  6.  * plugins directory. After running grails install-extjs, the library
  7.  * will be copied to the webapp/scripts/ext folder.
  8.  */
  9. grailsHome = Ant.project.properties."environment.GRAILS_HOME"
  10. basedir = System.getProperty("base.dir")
  11. extjsFile = "${basedir}/plugins/ext-2.2.zip"
  12. jsDir = "${basedir}/web-app/js"
  13. extDir = "${jsDir}/ext"
  14. props = null
  15.  
  16. includeTargets << new File ( "${grailsHome}/scripts/Init.groovy" )
  17.  
  18. target('default': "The description of the script goes here!") {
  19.     depends(setup)
  20.     clean()
  21.     install()
  22. }
  23.  
  24. target(setup: "Sets up access to the Grails Config properites script") {
  25.     Ant.property(file: "${basedir}/grails-app/conf/Config.groovy")
  26.     props = Ant.antProject.properties
  27. }
  28.  
  29. target(clean: "Removes any previous versions") {
  30.     Ant.delete(dir: "${extDir}")
  31. }
  32.  
  33. target(install: "Installs the latest version of extjs into the scripts folder") {
  34.     Ant.unzip(src: "${extjsFile}", dest: "$jsDir")
  35.     Ant.move(file: "${jsDir}/ext-2.2", tofile: "${extDir}")
  36.     Ant.delete(dir: "${extDir}/docs")
  37.     Ant.delete(dir: "${extDir}/examples")
  38.     Ant.delete(dir: "${extDir}/source")
  39. }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with @@


Remember me so that I can delete my post