Permalink
Browse files

rework the install target so that it creates an install/ directory at…

… the top of the workspace and sets that up as a valid GRAILS_HOME
  • Loading branch information...
jeffbrown committed Jun 20, 2011
1 parent ab35043 commit d75add5f3c5e766f17ea8c5954040debb2b92b2b
Showing with 63 additions and 110 deletions.
  1. +1 −0 .gitignore
  2. +5 −44 build.gradle
  3. +12 −52 gradle/assemble.gradle
  4. +35 −13 grails-resources/build.gradle
  5. 0 { → grails-resources/src/grails/grails-home}/INSTALL
  6. 0 { → grails-resources/src/grails/grails-home}/LICENSE
  7. 0 grails-resources/src/grails/{home/docs → grails-home}/README
  8. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/cygrails
  9. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/grails
  10. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/grails-debug
  11. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/grails-debug.bat
  12. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/grails.bat
  13. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/startGrails
  14. 0 grails-resources/src/grails/{home/bash → grails-home/bin}/startGrails.bat
  15. 0 grails-resources/src/grails/{home → grails-home}/conf/groovy-starter.conf
  16. 0 { → grails-resources/src/grails/grails-home}/dependencies.txt
  17. 0 grails-resources/src/grails/{home → grails-home}/dsl-support/dsld/grails.dsld
  18. BIN grails-resources/src/{war/images → grails/grails-home/media/icons}/favicon.ico
  19. BIN { → grails-resources/src/grails/grails-home}/media/icons/favicon16.png
  20. BIN { → grails-resources/src/grails/grails-home}/media/icons/favicon32.png
  21. BIN { → grails-resources/src/grails/grails-home}/media/icons/favicon48.png
  22. BIN { → grails-resources/src/grails/grails-home}/media/logos/branding_blck_whit_colr.jpg
  23. BIN { → grails-resources/src/grails/grails-home}/media/logos/branding_blck_whit_colr.png
  24. 0 { → grails-resources/src/grails/grails-home}/media/logos/grails-color-logo.svg
  25. 0 { → grails-resources/src/grails/grails-home}/media/logos/grails-logo.eps
  26. 0 { → grails-resources/src/grails/grails-home}/media/logos/grails-logo.svg
  27. BIN { → grails-resources/src/grails/grails-home}/media/logos/grailslogo-medium.png
  28. BIN { → grails-resources/src/grails/grails-home}/media/logos/grailslogo.png
  29. 0 grails-resources/src/grails/{ → grails-home/src/grails}/ant/build.xml
  30. 0 grails-resources/src/grails/{ → grails-home/src/grails}/ant/ivy.xml
  31. 0 grails-resources/src/grails/{ → grails-home/src/grails}/ant/ivysettings.xml
  32. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/conf/BootStrap.groovy
  33. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/conf/BuildConfig.groovy
  34. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/conf/Config.groovy
  35. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/conf/DataSource.groovy
  36. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/conf/UrlMappings.groovy
  37. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/conf/spring/resources.groovy
  38. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages.properties
  39. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_cs_CZ.properties
  40. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_da.properties
  41. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_de.properties
  42. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_es.properties
  43. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_fr.properties
  44. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_it.properties
  45. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_ja.properties
  46. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_nl.properties
  47. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_pt_BR.properties
  48. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_pt_PT.properties
  49. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_ru.properties
  50. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_sv.properties
  51. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_th.properties
  52. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/i18n/messages_zh_CN.properties
  53. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/views/error.gsp
  54. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/views/index.gsp
  55. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-app/views/layouts/main.gsp
  56. 0 grails-resources/src/grails/{ → grails-home/src/grails}/grails-macros.xml
  57. 0 grails-resources/src/grails/{ → grails-home/src/grails}/plugin/grails-app/conf/BuildConfig.groovy
  58. 0 grails-resources/src/grails/{ → grails-home/src/grails}/plugin/grails-app/conf/Config.groovy
  59. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/Controller.groovy
  60. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/DomainClass.groovy
  61. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/Filters.groovy
  62. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/Script.groovy
  63. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/Service.groovy
  64. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/TagLib.groovy
  65. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/Tests.groovy
  66. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/WebTest.groovy
  67. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/artifacts/hibernate.cfg.xml
  68. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/ide-support/eclipse/.classpath
  69. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/ide-support/eclipse/.project
  70. 0 ...src/grails}/templates/ide-support/eclipse/.settings/org.codehaus.groovy.eclipse.preferences.prefs
  71. 0 ...esources/src/grails/{ → grails-home/src/grails}/templates/ide-support/git/grailsProject.gitignore
  72. 0 ...urces/src/grails/{ → grails-home/src/grails}/templates/ide-support/intellij/ideaGrailsProject.iml
  73. 0 ...urces/src/grails/{ → grails-home/src/grails}/templates/ide-support/intellij/ideaGrailsProject.ipr
  74. 0 ...urces/src/grails/{ → grails-home/src/grails}/templates/ide-support/intellij/ideaGrailsProject.iws
  75. 0 ...ls-resources/src/grails/{ → grails-home/src/grails}/templates/ide-support/textmate/project.tmproj
  76. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/plugins/GrailsPlugin.groovy
  77. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/plugins/scripts/_Install.groovy
  78. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/plugins/scripts/_Uninstall.groovy
  79. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/plugins/scripts/_Upgrade.groovy
  80. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/Controller.groovy
  81. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/Test.groovy
  82. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/_form.gsp
  83. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/create.gsp
  84. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/edit.gsp
  85. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/list.gsp
  86. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/renderEditor.template
  87. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/scaffolding/show.gsp
  88. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/testing/Controller.groovy
  89. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/testing/DomainClass.groovy
  90. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/testing/Filters.groovy
  91. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/testing/Generic.groovy
  92. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/testing/Service.groovy
  93. 0 grails-resources/src/grails/{ → grails-home/src/grails}/templates/testing/TagLib.groovy
  94. 0 grails-resources/src/grails/{home → grails-home/src/resources}/tests/junit-frames.xsl
  95. 0 grails-resources/src/grails/{home → grails-home/src/resources}/tests/junit-noframes.xsl
  96. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/applicationContext.xml
  97. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/log4j.properties
  98. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/sitemesh.xml
  99. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/test-applicationContext.xml
  100. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/2.3/c.tld
  101. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/2.3/fmt.tld
  102. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/2.4/c.tld
  103. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/2.4/fmt.tld
  104. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/2.5/c.tld
  105. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/2.5/fmt.tld
  106. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/3.0/c.tld
  107. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/3.0/fmt.tld
  108. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/grails.tld
  109. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/tld/spring.tld
  110. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/web2.4.template.xml
  111. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/web2.5.template.xml
  112. 0 grails-resources/src/{ → grails/grails-home/src}/war/WEB-INF/web3.0.template.xml
  113. 0 grails-resources/src/{ → grails/grails-home/src}/war/css/main.css
  114. 0 grails-resources/src/{ → grails/grails-home/src}/war/css/mobile.css
  115. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/apple-touch-icon-retina.png
  116. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/apple-touch-icon.png
  117. BIN {media/icons → grails-resources/src/grails/grails-home/src/war/images}/favicon.ico
  118. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/grails_logo.jpg
  119. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/grails_logo.png
  120. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/leftnav_btm.png
  121. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/leftnav_midstretch.png
  122. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/leftnav_top.png
  123. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/database_add.png
  124. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/database_delete.png
  125. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/database_edit.png
  126. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/database_save.png
  127. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/database_table.png
  128. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/exclamation.png
  129. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/house.png
  130. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/information.png
  131. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/shadow.jpg
  132. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/sorted_asc.gif
  133. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/skin/sorted_desc.gif
  134. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/spinner.gif
  135. BIN grails-resources/src/{ → grails/grails-home/src}/war/images/springsource.png
  136. 0 grails-resources/src/{ → grails/grails-home/src}/war/js/application.js
  137. +10 −1 grails-scripts/build.gradle
  138. 0 { → grails-scripts/src}/scripts/AddProxy_.groovy
  139. 0 { → grails-scripts/src}/scripts/Bootstrap.groovy
  140. 0 { → grails-scripts/src}/scripts/BugReport.groovy
  141. 0 { → grails-scripts/src}/scripts/Clean.groovy
  142. 0 { → grails-scripts/src}/scripts/ClearProxy_.groovy
  143. 0 { → grails-scripts/src}/scripts/Compile.groovy
  144. 0 { → grails-scripts/src}/scripts/Console.groovy
  145. 0 { → grails-scripts/src}/scripts/CreateApp_.groovy
  146. 0 { → grails-scripts/src}/scripts/CreateController.groovy
  147. 0 { → grails-scripts/src}/scripts/CreateDomainClass.groovy
  148. 0 { → grails-scripts/src}/scripts/CreateFilters.groovy
  149. 0 { → grails-scripts/src}/scripts/CreateHibernateCfgXml.groovy
  150. 0 { → grails-scripts/src}/scripts/CreateIntegrationTest.groovy
  151. 0 { → grails-scripts/src}/scripts/CreatePlugin_.groovy
  152. 0 { → grails-scripts/src}/scripts/CreateScript.groovy
  153. 0 { → grails-scripts/src}/scripts/CreateService.groovy
  154. 0 { → grails-scripts/src}/scripts/CreateTagLib.groovy
  155. 0 { → grails-scripts/src}/scripts/CreateUnitTest.groovy
  156. 0 { → grails-scripts/src}/scripts/DependencyReport.groovy
  157. 0 { → grails-scripts/src}/scripts/Doc.groovy
  158. 0 { → grails-scripts/src}/scripts/GenerateAll.groovy
  159. 0 { → grails-scripts/src}/scripts/GenerateController.groovy
  160. 0 { → grails-scripts/src}/scripts/GenerateViews.groovy
  161. 0 { → grails-scripts/src}/scripts/Help_.groovy
  162. 0 { → grails-scripts/src}/scripts/Init.groovy
  163. 0 { → grails-scripts/src}/scripts/InstallDependency.groovy
  164. 0 { → grails-scripts/src}/scripts/InstallPlugin.groovy
  165. 0 { → grails-scripts/src}/scripts/InstallTemplates.groovy
  166. 0 { → grails-scripts/src}/scripts/IntegrateWith.groovy
  167. 0 { → grails-scripts/src}/scripts/Interactive.groovy
  168. 0 { → grails-scripts/src}/scripts/ListPluginUpdates.groovy
  169. 0 { → grails-scripts/src}/scripts/ListPlugins_.groovy
  170. 0 { → grails-scripts/src}/scripts/Package.groovy
  171. 0 { → grails-scripts/src}/scripts/PackagePlugin_.groovy
  172. 0 { → grails-scripts/src}/scripts/PluginInfo_.groovy
  173. 0 { → grails-scripts/src}/scripts/RemoveProxy_.groovy
  174. 0 { → grails-scripts/src}/scripts/RunApp.groovy
  175. 0 { → grails-scripts/src}/scripts/RunScript.groovy
  176. 0 { → grails-scripts/src}/scripts/RunWar.groovy
  177. 0 { → grails-scripts/src}/scripts/SchemaExport.groovy
  178. 0 { → grails-scripts/src}/scripts/SetProxy_.groovy
  179. 0 { → grails-scripts/src}/scripts/SetVersion.groovy
  180. 0 { → grails-scripts/src}/scripts/Shell.groovy
  181. 0 { → grails-scripts/src}/scripts/Stats.groovy
  182. 0 { → grails-scripts/src}/scripts/TestApp.groovy
  183. 0 { → grails-scripts/src}/scripts/UninstallPlugin.groovy
  184. 0 { → grails-scripts/src}/scripts/Upgrade.groovy
  185. 0 { → grails-scripts/src}/scripts/War.groovy
  186. 0 { → grails-scripts/src}/scripts/_GrailsArgParsing.groovy
  187. 0 { → grails-scripts/src}/scripts/_GrailsBootstrap.groovy
  188. 0 { → grails-scripts/src}/scripts/_GrailsClasspath.groovy
  189. 0 { → grails-scripts/src}/scripts/_GrailsClean.groovy
  190. 0 { → grails-scripts/src}/scripts/_GrailsCompile.groovy
  191. 0 { → grails-scripts/src}/scripts/_GrailsCreateArtifacts.groovy
  192. 0 { → grails-scripts/src}/scripts/_GrailsCreateProject.groovy
  193. 0 { → grails-scripts/src}/scripts/_GrailsDocs.groovy
  194. 0 { → grails-scripts/src}/scripts/_GrailsEvents.groovy
  195. 0 { → grails-scripts/src}/scripts/_GrailsGenerate.groovy
  196. 0 { → grails-scripts/src}/scripts/_GrailsInit.groovy
  197. 0 { → grails-scripts/src}/scripts/_GrailsPackage.groovy
  198. 0 { → grails-scripts/src}/scripts/_GrailsPluginDev.groovy
  199. 0 { → grails-scripts/src}/scripts/_GrailsPlugins.groovy
  200. 0 { → grails-scripts/src}/scripts/_GrailsProxy.groovy
  201. 0 { → grails-scripts/src}/scripts/_GrailsRun.groovy
  202. 0 { → grails-scripts/src}/scripts/_GrailsSettings.groovy
  203. 0 { → grails-scripts/src}/scripts/_GrailsTest.groovy
  204. 0 { → grails-scripts/src}/scripts/_GrailsWar.groovy
  205. 0 { → grails-scripts/src}/scripts/_PackagePlugins.groovy
  206. 0 { → grails-scripts/src}/scripts/_PluginDependencies.groovy
  207. 0 { → grails-scripts/src}/scripts/log4j.properties
View
@@ -1,3 +1,4 @@
+/install/
/src
/out
/bin
View
@@ -1,5 +1,3 @@
-import org.apache.tools.ant.filters.ReplaceTokens
-
buildscript {
repositories {
mavenRepo(urls: "http://repo.grails.org/grails/core")
@@ -12,8 +10,8 @@ buildscript {
apply plugin: 'idea'
-
grailsVersion = '1.4.0.BUILD-SNAPSHOT'
+installDir = "${rootProject.projectDir}/install"
antVersion = "1.8.2"
antTraxVersion = "1.7.1"
aspectjVersion = "1.6.10"
@@ -118,7 +116,7 @@ subprojects { project ->
from(project.libsDir) {
include "*-${grailsVersion}.jar"
}
- into "${rootProject.projectDir}/dist"
+ into "${installDir}/dist"
}
}
@@ -212,50 +210,13 @@ task clean << {
// delete(docs.destinationDir, libs.destinationDir)
delete(libs.destinationDir)
delete(buildDir)
+ delete(installDir)
}
task installResources << {
copy {
- from('grails-resources/src/grails/home/tests')
- into('lib')
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- }
-
- copy {
- from("grails-resources/src/grails/home/bash")
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
- filter(ReplaceTokens, tokens: ['spring.loaded.version': springLoadedVersion])
- fileMode = 0755
- into "bin"
-
- }
- // the fileMode property above should take care of the chmod work, but
- // it doesn't per http://jira.codehaus.org/browse/GRADLE-971
- ant.chmod(dir: 'bin', perm: '755', includes: '*')
-
- copy {
- from("grails-resources/src/grails/home/conf")
- into "conf"
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
- filter(ReplaceTokens, tokens: ['jline.version': jlineVersion])
- filter(ReplaceTokens, tokens: ['jansi.version': jansiVersion])
- filter(ReplaceTokens, tokens: ['jna.version': jnaVersion])
- filter(ReplaceTokens, tokens: ['commons.cli.version': commonsCliVersion])
- filter(ReplaceTokens, tokens: ['ant.version': antVersion])
- filter(ReplaceTokens, tokens: ['gant.version': gantVersion])
- filter(ReplaceTokens, tokens: ['ivy.version': ivyVersion])
- }
-
- copy {
- from 'grails-resources/src/grails/home/dsl-support'
- into 'dsl-support'
- }
-
- copy {
- from "grails-resources/src/war/WEB-INF"
- into 'src/war/WEB-INF'
+ from 'build.properties'
+ into "${installDir}"
}
}
View
@@ -21,14 +21,14 @@ dependencyCache = {
includes = dependencyIncludes as List
exclude "org.grails/**"
}
- into "$projectDir/lib"
+ into "$installDir/lib"
}
copy {
from (cacheLocation) {
includes = ['org.grails/grails-datastore-gorm/jars/grails-datastore-gorm-*.jar',
'org.grails/grails-gdoc-engine/jars/grails-gdoc-engine-*.jar']
}
- into "$projectDir/lib"
+ into "$installDir/lib"
}
}
@@ -50,10 +50,10 @@ task libs(dependsOn: getTasksByName("assemble", true)) {
into 'dist'
}
copy {
- from("$projectDir/grails-resources") {
+ from("$projectDir/grails-resources/src/grails/grails-home") {
include 'src/grails', 'src/war'
}
- into projectDir
+ into installDir
}
}
}
@@ -81,71 +81,31 @@ task pluginsFromSvn {
binExecutables = ["cygrails", "grails", "grails-debug", "grails-debug.bat", "grails.bat"]
distSpec = copySpec {
- from(projectDir) {
+ from(installDir) {
into "grails-$grailsVersion"
- include 'lib/', 'gradle/', 'media/', 'samples/', 'scripts/', 'build.gradle', 'build.properties', 'dependencies.txt',
- 'LICENSE', 'INSTALL', "src/", "gradlew.bat","gradle.properties"
- exclude 'ant/bin'
}
- from("grails-resources") {
+
+ from(projectDir) {
into "grails-$grailsVersion"
- include 'src/grails/**', 'src/war/**'
- // this file is accounted for later with special handling to do some token replacement
- exclude 'src/grails/grails-macros.xml'
+ include 'gradle/', 'build.gradle', "gradlew.bat","gradle.properties"
}
+
from(projectDir) {
into "grails-$grailsVersion"
include "gradlew"
fileMode = 0755
}
+
from(docs.destinationDir) {
into "grails-$grailsVersion/doc"
}
- exclude "**/CVS/**"
+
from(project.files(pluginsFromSvn.dir) { builtBy 'pluginsFromSvn' }) {
into "grails-$grailsVersion/plugins"
}
- from('grails-resources/src/grails/home/docs/README') {
- into "grails-$grailsVersion"
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- }
- from('grails-resources/src/grails/home/tests') {
- into "grails-$grailsVersion/src/resources/tests"
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- }
- from("grails-resources/src/grails/home/bash") {
- into "grails-$grailsVersion/bin"
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
- filter(ReplaceTokens, tokens: ['spring.loaded.version': springLoadedVersion])
- fileMode = 0755
- }
- from("grails-resources/src/grails/home/conf") {
- into "grails-$grailsVersion/conf"
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
- filter(ReplaceTokens, tokens: ['ant.version': antVersion])
- filter(ReplaceTokens, tokens: ['gant.version': gantVersion])
- filter(ReplaceTokens, tokens: ['ivy.version': ivyVersion])
- filter(ReplaceTokens, tokens: ['jline.version': jlineVersion])
- filter(ReplaceTokens, tokens: ['jansi.version': jansiVersion])
- filter(ReplaceTokens, tokens: ['jna.version': jnaVersion])
- filter(ReplaceTokens, tokens: ['commons.cli.version': commonsCliVersion])
- }
- from(libs.destinationDir) {
- into "grails-$grailsVersion/dist"
- exclude "*.zip"
- }
- from("grails-resources/src/grails/grails-macros.xml") {
- into "grails-$grailsVersion/src/grails"
- filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
- }
- from('grails-resources/src/grails/home/dsl-support') {
- into "grails-$grailsVersion/dsl-support"
- }
}
-task zipDist(type: Zip,dependsOn:libs) {
+task zipDist(type: Zip,dependsOn: [getTasksByName('install', true), 'populateDependencies', 'installResources']) {
from distSpec
destinationDir = "${buildDir}/distributions" as File
baseName = 'grails'
@@ -1,12 +1,33 @@
+import org.apache.tools.ant.filters.ReplaceTokens
+
+task installGrailsHomeResources << {
+ copy {
+ from("src/grails/grails-home")
+ into "${installDir}/"
+ filter(ReplaceTokens, tokens: ['grails.version': grailsVersion])
+ filter(ReplaceTokens, tokens: ['groovy.version': groovyVersion])
+ filter(ReplaceTokens, tokens: ['jline.version': jlineVersion])
+ filter(ReplaceTokens, tokens: ['jansi.version': jansiVersion])
+ filter(ReplaceTokens, tokens: ['jna.version': jnaVersion])
+ filter(ReplaceTokens, tokens: ['commons.cli.version': commonsCliVersion])
+ filter(ReplaceTokens, tokens: ['ant.version': antVersion])
+ filter(ReplaceTokens, tokens: ['gant.version': gantVersion])
+ filter(ReplaceTokens, tokens: ['ivy.version': ivyVersion])
+ filter(ReplaceTokens, tokens: ['spring.loaded.version': springLoadedVersion])
+ }
+
+ ant.chmod(dir: "${installDir}/bin", perm: '755', includes: '*')
+}
+
task createSharedFilesJar(type: Jar, description: 'Package up the files that are shared by both applications and plugins.') {
version = null
appendix = "shared-files"
appFileJar = true
- from("src/war/WEB-INF") {
+ from("src/grails/grails-home/src/war/WEB-INF") {
into "web-app/WEB-INF"
include "applicationContext.xml", "sitemesh.xml", "tld/*.tld"
}
- from("src/grails/grails-app/conf") {
+ from("src/grails/grails-home/src/grails/grails-app/conf") {
into "grails-app/conf"
include "DataSource.groovy", "UrlMappings.groovy"
}
@@ -16,11 +37,11 @@ task createSharedApplicationFilesJar(type: Jar, description: 'Package up the fil
version = null
appendix = "app-files"
appFileJar = true
- from("src/war") {
+ from("src/grails/grails-home/src/war") {
into "web-app"
exclude "WEB-INF/**"
}
- from("src/grails/grails-app") {
+ from("src/grails/grails-home/src/grails/grails-app") {
into "grails-app"
exclude "taglib/**", "utils/**", "conf/DataSource.groovy", "conf/UrlMappings.groovy"
}
@@ -30,37 +51,38 @@ task createSharedPluginFilesJar(type: Jar, description: 'Package up the files th
version = null
appendix = "plugin-files"
appFileJar = true
- from("src/grails/templates/plugins")
- from("src/grails") {
+ from("src/grails/grails-home/src/grails/templates/plugins")
+ from("src/grails/grails-home/src/grails") {
include "grails-app/views/error.gsp"
}
- from("src/grails/plugin")
+ from("src/grails/grails-home/src/grails/plugin")
}
task createIntegrationFilesJar(type: Jar, description: 'Files to integrate Grails with IDEs and build systems.') {
version = null
appendix = "integration-files"
appFileJar = true
- from("src/grails/templates/ide-support", "src/grails/ant")
+ from("src/grails/grails-home/src/grails/templates/ide-support", "src/grails/ant")
}
allJarFileTasks = [createSharedFilesJar,createSharedApplicationFilesJar,createSharedPluginFilesJar,createIntegrationFilesJar]
-task resourceJarFiles(dependsOn:allJarFileTasks)
-
+task resourceJarFiles(dependsOn: allJarFileTasks)
jar.dependsOn resourceJarFiles
for (jarTask in allJarFileTasks) {
jar.from(jarTask.archivePath)
}
-jar.from("src/war") {
+jar.from("src/grails/grails-home/src/war") {
into "src/war"
include "WEB-INF/**"
exclude 'WEB-INF/tld/grails.tld', 'WEB-INF/tld/spring.tld'
}
-jar.from("src/grails/templates") {
+jar.from("src/grails/grails-home/src/grails/templates") {
into "src/grails/templates"
}
-jar.appendix = 'resources'
+jar.appendix = 'resources'
+
+install.dependsOn installGrailsHomeResources
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -22,8 +22,17 @@ dependencies {
sourceSets {
main {
- groovy.srcDirs = ['../scripts']
+ groovy.srcDirs = ['src/scripts']
}
}
jar.appendix = 'scripts'
+
+task installScripts {
+ copy {
+ from("src/scripts")
+ into "${installDir}/scripts"
+ }
+}
+
+install.dependsOn installScripts
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit d75add5

Please sign in to comment.