Announcement Announcement Module
No announcement yet.
Grails hot deploy running in STS tc Server Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Grails hot deploy running in STS tc Server

    I'm working on my first Grails app and Grails is really cool. I am modifying a lot of JavaScript files and:

    1. When running using Run As -> Grails Command (run-app) whenever I change a .js it is automatically deployed and my browser sees it.

    2. When running using tc Server I have to publish in order to see the .js change. My tc Server instance is set to auto publish and the module's auto load set to enabled.

    I prefer to run using tc Server. How can I get it to auto deploy my .js, etc. files without manually publishing? Is maybe tc Server running grails in production mode by default? If so, it that a problem and how do I change it?

    Probably a simple setting but I've been searching for hours with no luck.


  • #2
    Hi m,

    For deploying to tc server, we haven't really tested any scenarios involving the editing of .js files. So I'm not too surprised it doesn't quite work as you'd expect. The deployment support is brand new and I'm sure still quite rough in many ways.

    However here is some specific info in relation to your questions.

    Yes, when deploying to tc server you will be running in "production" mode. This is because we use the "grails war" command to create the initial deployed artefacts... and... because of this bug:

    I'm afraid that because of this bug in Grails, it won't be possible at all to support deploying in dev mode. I think grails people are working on this bug and hopefully it will be fixed soon. Once it is, then we should be able to also build the war file for tc server deployment in STS using the "dev" mode. In fact, we *are* passing "dev" env paramter to the command we use to build the war, but because of this grails bug, it has no effect at the moment.

    I'm sorry I don't have a solution for you at this time.


    • #3
      still the same problem

      This problem still occurs, while the grails error has been resolved.
      I'm using grails 1.3.6, with STS version 5.2.2.
      grails dev war works fine, but running my grails app in tc Server still creates a war for production!

      Last edited by rilisema; Jan 13th, 2011, 03:11 PM. Reason: added STS version


      • #4
        I opened an issue in Jira regarding this.


        • #5
          This is really an issue that should be raised on the STS issue tracker. In fact there already is an issue raised for this:

          You can go to that issue and comment on it if you like.


          • #6
            Is there no way to deploy an app as dev or test on the tc Server integrated in the STS?


            • #7
              Not at the moment. The STS/Grails/TcServer integration is a brand new feature of STS. The first tation doesn't yet provide a way to set that opti. But... because of your comments and those of a few other users, it is becoming clear that making this possible should be a high priority issue.

              I actually implemented something yesterday that should make it possible. It should become available from the nightly update site once tonhe next nightly build completes succesfully.

              Note however that because of a bug in Grails 1.3.5 (and possible earlier versions also) this feature won't actually work because the grails war command ignores the 'env' parameter. It should work with Grails 1.3.6 where the bug in grails was fixed.