Grails
  1. Grails
  2. GRAILS-6180

Precompilation of gsp should be optional when generating the war file

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.2.1, 1.2.2, 1.3-RC1
    • Fix Version/s: 1.3 final
    • Component/s: Project infrastructure
    • Labels:
      None

      Description

      Since grails 1.2 the gsps are pre compiled when generating the war file.

      One easy way to customize the look and feel of grails application is to simply update the views for e.g. Developer A gives the war file to deployment team B.

      Given this use case it would be interesting if there is a command line option to enable/disable the precompilation of gsp.

      e.g.
      grails -nogspcompile war

        Issue Links

          Activity

          Hide
          Lari Hotari added a comment -

          Disabling precompilation isn't necessary. It's possible to add grails.gsp.reload.enable=true to Config.groovy or set the "grails.gsp.enable.reload" System property to "true" (-Dgrails.gsp.enable.reload=true command line argument) to enable GSP reloading. There will be a negative effect on performance since some internal caching is disabled when reloading is enabled in Grails. GRAILS-5787 would be a better solution, but it's not implemented yet.

          Show
          Lari Hotari added a comment - Disabling precompilation isn't necessary. It's possible to add grails.gsp.reload.enable=true to Config.groovy or set the "grails.gsp.enable.reload" System property to "true" (-Dgrails.gsp.enable.reload=true command line argument) to enable GSP reloading. There will be a negative effect on performance since some internal caching is disabled when reloading is enabled in Grails. GRAILS-5787 would be a better solution, but it's not implemented yet.
          Hide
          Lari Hotari added a comment -

          Please read the comments about enabling reloading and GRAILS-5787 that covers the actual requirement.

          Show
          Lari Hotari added a comment - Please read the comments about enabling reloading and GRAILS-5787 that covers the actual requirement.
          Hide
          Kapil Sachdeva added a comment -

          Apologies. I guess I was not clear with my use case. The use case is that I as a developer give a "war" file which has some views in it. The deployment team thencustomize these views as per customer requirements. The functionality is same but look and feel is quite different. My customer here then is the deployment team. Me giving them pre-compiled gsp does not help as either they or I would manually delete the compiled files. This is very different from reloading gsps in the web application which is running. Adding the compile time option gives user the choice to pre-compile or not and is flexible.

          Show
          Kapil Sachdeva added a comment - Apologies. I guess I was not clear with my use case. The use case is that I as a developer give a "war" file which has some views in it. The deployment team thencustomize these views as per customer requirements. The functionality is same but look and feel is quite different. My customer here then is the deployment team. Me giving them pre-compiled gsp does not help as either they or I would manually delete the compiled files. This is very different from reloading gsps in the web application which is running. Adding the compile time option gives user the choice to pre-compile or not and is flexible.
          Hide
          Markus Mueller added a comment -

          Disabling precompilation is indeed very different to reloading. Unfortunately I cannot vote for this since issue is already "resolved"

          Show
          Markus Mueller added a comment - Disabling precompilation is indeed very different to reloading. Unfortunately I cannot vote for this since issue is already "resolved"
          Hide
          Fabien Benichou added a comment -

          Markus is right. This is clearly a different issue from GRAILS-5787. And I would have voted for it as well!

          Show
          Fabien Benichou added a comment - Markus is right. This is clearly a different issue from GRAILS-5787 . And I would have voted for it as well!
          Hide
          Markus Mueller added a comment -

          Please reopen!

          Show
          Markus Mueller added a comment - Please reopen!
          Hide
          Kapil Sachdeva added a comment -

          Please see the comments by other people in community which seem to also need this feature.

          Show
          Kapil Sachdeva added a comment - Please see the comments by other people in community which seem to also need this feature.

            People

            • Assignee:
              Unassigned
              Reporter:
              Kapil Sachdeva
            • Votes:
              3 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Last Reviewed:

                Development