Spring Tool Suite
  1. Spring Tool Suite
  2. STS-2743

Changes to default index.gsp in new grails app are not published/updated on server

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 3.0.0.M2, 3.0.0.M3
    • Fix Version/s: 3.0.0.RC1
    • Component/s: GRAILS
    • Labels:
      None

      Description

      See here for original report:
      http://forum.springsource.org/showthread.php?128103-STS-3-0-M2-not-publishing-to-tc-Server-after-resource-change

      Summary:
      Seems to be a specific case where if one modifies the 'index.gsp' file that is there by default in a new grails app, then these changes aren't noticed by the updating logic and don't become live on tc-server.

      Correction: Actually this problem seems to affect all GSP files.

        Activity

        Hide
        Kris De Volder (c) added a comment -

        Actually, playing around... I can't seem to get any gsp files to update properly. Tried with various versions of grails 2.0.4 through 2.0.1.

        Changes to controllers seems to be picked up okay.

        Also the changed gsps get copied to the server but what doesn't happen at that point is the changes to become live (unless the server is restarted).

        Not sure whether this is a tc server, tc server tooling or grails issue yet.

        I don't notice tc server 'refreshing the app/servlets' after the gsp changes. But I do see that happen when a controller changes.

        Show
        Kris De Volder (c) added a comment - Actually, playing around... I can't seem to get any gsp files to update properly. Tried with various versions of grails 2.0.4 through 2.0.1. Changes to controllers seems to be picked up okay. Also the changed gsps get copied to the server but what doesn't happen at that point is the changes to become live (unless the server is restarted). Not sure whether this is a tc server, tc server tooling or grails issue yet. I don't notice tc server 'refreshing the app/servlets' after the gsp changes. But I do see that happen when a controller changes.
        Hide
        Kris De Volder (c) added a comment -

        Updating severity to 'critical' since it seems to be a pretty serious regression. Changes to GSPs used to work just fine... though testing for this has been a bit sketchy lately (the deploy tests have been taken offline around the big M2 restructuring).

        Show
        Kris De Volder (c) added a comment - Updating severity to 'critical' since it seems to be a pretty serious regression. Changes to GSPs used to work just fine... though testing for this has been a bit sketchy lately (the deploy tests have been taken offline around the big M2 restructuring).
        Hide
        Kris De Volder (c) added a comment -

        I've tested with STS 2.9.2 and it works fine in 2.9.2. My suspicion is that it got broken in M2.
        I could not confirm it works in M1 because I can't find a copy of the M1 update site for Grails tools.

        Version of TcServer in 2.9.2 = 2.7.0.RELEASE
        Version of TcServer in 3.0.0.M3 = 2.7.0.RELEASE

        Also I tried both with the same version of Grails = 2.0.4
        So it seems the only thing that changed in between it working and not working is the STS + TcServer + Grails tooling.

        Show
        Kris De Volder (c) added a comment - I've tested with STS 2.9.2 and it works fine in 2.9.2. My suspicion is that it got broken in M2. I could not confirm it works in M1 because I can't find a copy of the M1 update site for Grails tools. Version of TcServer in 2.9.2 = 2.7.0.RELEASE Version of TcServer in 3.0.0.M3 = 2.7.0.RELEASE Also I tried both with the same version of Grails = 2.0.4 So it seems the only thing that changed in between it working and not working is the STS + TcServer + Grails tooling.
        Hide
        Kris De Volder (c) added a comment -

        I've discovered what is making the difference. In 2.9.2 the tc server launch configuration created by STS when one first launches tcServer has this argument added automatically:
        -Dgrails.gsp.enable.reload=true

        On 300M3 this is no longer the case. This will cause grails to no longer enable reload functionality for gsps on the deployed app.
        A workaround is to add this option manually to your tc server launch configuration. You can do this via the 'run' button in the toolbar. Go to 'Run configurations' and locate the tcserver launch. Then add the above snippet in the arguments tab. I pasted it right after the -Xmx memory argument, which is where it used to be before.

        Show
        Kris De Volder (c) added a comment - I've discovered what is making the difference. In 2.9.2 the tc server launch configuration created by STS when one first launches tcServer has this argument added automatically: -Dgrails.gsp.enable.reload=true On 300M3 this is no longer the case. This will cause grails to no longer enable reload functionality for gsps on the deployed app. A workaround is to add this option manually to your tc server launch configuration. You can do this via the 'run' button in the toolbar. Go to 'Run configurations' and locate the tcserver launch. Then add the above snippet in the arguments tab. I pasted it right after the -Xmx memory argument, which is where it used to be before.
        Hide
        Kris De Volder (c) added a comment -

        Alternate workaround. I think you can also specify this option in Config.groovy of your specific application (but I didn't test that).

        Show
        Kris De Volder (c) added a comment - Alternate workaround. I think you can also specify this option in Config.groovy of your specific application (but I didn't test that).
        Hide
        Kris De Volder (c) added a comment -

        The system property is no longer being set because:

        • tcServer tooling is doing that only if it sees the grails tooling installed in the current platform
        • but the check is checking for 'com.springsource' style bundle name so it no longer matches with the new names after grails tools where refactored.
        Show
        Kris De Volder (c) added a comment - The system property is no longer being set because: tcServer tooling is doing that only if it sees the grails tooling installed in the current platform but the check is checking for 'com.springsource' style bundle name so it no longer matches with the new names after grails tools where refactored.
        Hide
        Kris De Volder (c) added a comment -

        A fix was committed to the eclipse-integration-tcserver repo:
        hash = 32e14f19a70e0e5962cc6e07e20ab528aacc4a45

        Show
        Kris De Volder (c) added a comment - A fix was committed to the eclipse-integration-tcserver repo: hash = 32e14f19a70e0e5962cc6e07e20ab528aacc4a45

          People

          • Assignee:
            Kris De Volder (c)
            Reporter:
            Kris De Volder (c)
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: