Inside Grails: The Build System & Plugin Management by Peter Ledbrook
Starting The Grails Build System
Starting The Grails Build System <ul><li>Shell scripts
startGrails launches VM </li><ul><li>Adds groovy-all & grails-bootstrap to system classpath </li></ul></ul>
Starting The Grails Build System <ul><li>Create  GrailsRootLoader
Load classpath from  groovy-starter.conf
Load  GrailsScriptRunner  in  GRL  and execute </li><ul><li>Class loader isolation </li></ul></ul>
Starting The Grails Build System <ul><li>Create  BuildSettings  if it doesn't exist
Populate root loader
Initialise Gant </li><ul><li>Pre-populate Gant binding </li></ul><li>Interactive mode </li></ul>
Starting The Grails Build System <ul><li>Parse & run Grails scripts </li></ul>
Starting The Grails Build System <ul><li>Load Grails using given class loader
Isolate Grails from parent class loader </li></ul>
Starting The Grails Build System <ul><li>Project structure
BuildConfig.groovy  &  settings.groovy
Dependencies </li></ul>
Class loader hell?
Context Class Loader <ul><li>Starts as root loader ( GrailsStarter )
Becomes ”classLoader” ( GrailsScriptRunner ) </li><ul><li>”classes” directory </li></ul><li>Ends as Grails application cla...
Grails Scripts
Grails Scripts <ul><li>General settings
Upcoming SlideShare
Loading in...5
×

Grails Internals Ggug Dec 2009

912

Published on

Published in: Technology, Art & Photos
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
912
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
27
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Grails Internals Ggug Dec 2009

  1. 1. Inside Grails: The Build System & Plugin Management by Peter Ledbrook
  2. 2. Starting The Grails Build System
  3. 3. Starting The Grails Build System <ul><li>Shell scripts
  4. 4. startGrails launches VM </li><ul><li>Adds groovy-all & grails-bootstrap to system classpath </li></ul></ul>
  5. 5. Starting The Grails Build System <ul><li>Create GrailsRootLoader
  6. 6. Load classpath from groovy-starter.conf
  7. 7. Load GrailsScriptRunner in GRL and execute </li><ul><li>Class loader isolation </li></ul></ul>
  8. 8. Starting The Grails Build System <ul><li>Create BuildSettings if it doesn't exist
  9. 9. Populate root loader
  10. 10. Initialise Gant </li><ul><li>Pre-populate Gant binding </li></ul><li>Interactive mode </li></ul>
  11. 11. Starting The Grails Build System <ul><li>Parse & run Grails scripts </li></ul>
  12. 12. Starting The Grails Build System <ul><li>Load Grails using given class loader
  13. 13. Isolate Grails from parent class loader </li></ul>
  14. 14. Starting The Grails Build System <ul><li>Project structure
  15. 15. BuildConfig.groovy & settings.groovy
  16. 16. Dependencies </li></ul>
  17. 17. Class loader hell?
  18. 18. Context Class Loader <ul><li>Starts as root loader ( GrailsStarter )
  19. 19. Becomes ”classLoader” ( GrailsScriptRunner ) </li><ul><li>”classes” directory </li></ul><li>Ends as Grails application class loader ( DefaultGrailsApplication ) </li></ul>
  20. 20. Grails Scripts
  21. 21. Grails Scripts <ul><li>General settings
  22. 22. Create PluginBuildSettings
  23. 23. Configure environment
  24. 24. getPropertyValue() </li></ul>
  25. 25. Grails Scripts <ul><li>Set up common/compile/test/runtime classpaths
  26. 26. Target classpath </li><ul><li>grails.*.classpath Ant paths </li></ul></ul>
  27. 27. Grails Scripts <ul><li>Install Ant build listener
  28. 28. Load event scripts ( _Events.groovy )
  29. 29. Add event() method </li></ul>
  30. 30. Grails Scripts <ul><li>Grails app without servlet container
  31. 31. Create application context, with </li><ul><li>GrailsApplication
  32. 32. GrailsPluginManager </li></ul><li>Used by integration tests, generate scripts, and others </li></ul>
  33. 33. Grails Scripts <ul><li>Grails app with servlet container
  34. 34. Should use runtime classpath
  35. 35. Plugin change scanner </li></ul>
  36. 36. Grails Scripts <ul><li>Create WAR
  37. 37. Package runtime dependencies </li></ul>
  38. 38. Plugins <ul><li>Build </li></ul><ul><li>Manage plugin installations </li><ul><li>Plugin dependencies
  39. 39. Scripts
  40. 40. Lib dependencies
  41. 41. Repositories </li></ul></ul><ul><li>Runtime </li></ul><ul><li>Load plugins </li><ul><li>Add Spring beans
  42. 42. Add dynamic methods
  43. 43. Web descriptor </li></ul></ul>
  44. 44. Plugins in the Build
  45. 45. Plugins at Runtime
  46. 46. Overlap <ul><li>_PluginDependencies: target ”loadPlugins” </li><ul><li>Called by bootstrap, package app
  47. 47. Required to generate web.xml
  48. 48. Creates temporary GrailsApplication and GrailsPluginManager instances
  49. 49. Plugins may be loaded twice or more! </li></ul></ul>
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×