Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8375997
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:19:08+00:00 2026-06-09T15:19:08+00:00

I have a pretty standard 2.0.3 Grails app and I’ve executed grails install-templates which

  • 0

I have a pretty standard 2.0.3 Grails app and I’ve executed grails install-templates which places files list.gsp, edit.gsp, etc. in src/templates/scaffolding/ directory. These files are not automatically reloaded when a change is made to them. Is there a way I can get these to be automatically reloaded so I don’t have to stop/start the app every time I make a change? I’ve tried looking at watchedResources but that seems to be plugin development related.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T15:19:09+00:00Added an answer on June 9, 2026 at 3:19 pm

    You are correct that the “watched-resources” mechanism only applies to plugins. The correct fix for this would be to modify the core ScaffoldingGrailsPlugin.groovy to add

    def watchedResources = "file:./src/templates/scaffolding/*"
    

    and it’s probably worth submitting a JIRA to that effect. In the mean time, you may be able to get it working by writing a simple plugin of your own to “inject” this behaviour into the scaffolding plugin. Do grails create-plugin watch-scaffolding and then use the following for the plugin descriptor:

    import org.codehaus.groovy.grails.plugins.GrailsPlugin
    
    class WatchScaffoldingGrailsPlugin {
        def version = "0.1"
        def grailsVersion = "2.0 > *"
        def dependsOn = [:]
        def pluginExcludes = [ "grails-app/views/error.gsp" ]
    
        def title = "Watch Scaffolding Plugin"
        def author = "Your name"
        def authorEmail = ""
        def description = '''\
    Watches for changes to scaffolding templates and reloads dynamically-scaffolded
    controllers and views.
    '''
        // URL to the plugin's documentation
        def documentation = "http://grails.org/plugin/watch-scaffolding"
    
        // watch for changes to scaffolding templates...
        def watchedResources = "file:./src/templates/scaffolding/*"
    
        // ... and kick the scaffolding plugin when they change
        def onChange = { event ->
            event.manager.getGrailsPlugin('scaffolding').notifyOfEvent(
                GrailsPlugin.EVENT_ON_CHANGE, null)
        }
    
        // rest of plugin options are no-op
        def onConfigChange = { event -> }
        def doWithWebDescriptor = { xml -> }
        def doWithSpring = { }
        def doWithDynamicMethods = { ctx -> }
        def doWithApplicationContext = { applicationContext -> }
        def onShutdown = { event -> }
    }
    

    Now in your application’s BuildConfig.groovy add

    grails.plugin.location.'watch-scaffolding' = '../watch-scaffolding'
    

    (or whatever is the appropriate relative path from the root of your app to the root of the plugin) and your scaffolding template changes should start to reload automatically.

    (This is tested on Grails 2.1, I initially tried using influences but it didn’t have any effect, however forcing an onChange event in the scaffolding plugin had the required result.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have pretty standard Qmail toaster installation. I'm using the dot files to set
I have a pretty standard page which calls a ModalDialog. The modal dialog is
I have a pretty standard CSS based dropdown menu. The main list is #mainNav
I have a directory structure in my SVN repository which is pretty standard: /project1
I have a pretty standard django app, and am wondering how to set the
I have a pretty standard use-case. I have a parent object and a list
I have a pretty standard scenario where I have a model which in this
I have a pretty standard implementation of a circular, two-way linked list. For arrays
I have an App that does the pretty standard operation: It plays audio (streamed
I have a form which escaped the input in PHP in a pretty standard

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.