Announcement Announcement Module
Collapse
No announcement yet.
Resources.groovy Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Resources.groovy

    I am noticing that the STS compiles and copies the resources.groovy file to the target/classes dierctory even if it has not been changed at all (or nothing has changed in the application). Is this a bug or is there a reason for it?
    Thanks.
    Bharat

  • #2
    All java and groovy files will be compiled and their class files placed in target/classes, following the normal rules of incremental compilation. This means that if resource.groovy does not already exist in the target/classes directory, it will be placed there.

    Can you provide a little more information here?

    Are you saying that resources.groovy is both copied and compiled into target/classes? Ie- is there a resources.groovy and a resources.class (and associated closure classes) in target/classes?

    When does this happen? During incremental builds or some other time?

    Is this causing any kind of problem for your application?

    Comment


    • #3
      Further Clarification

      Hello Andrew,
      You wrote:
      "All java and groovy files will be compiled and their class files placed in target/classes, following the normal rules of incremental compilation. This means that if resource.groovy does not already exist in the target/classes directory, it will be placed there.

      Can you provide a little more information here? "

      I agree with you and understand this. But STS is always recompiling and recopying the resources.groovy file regardless of whether you have made any change to it or not. That is every time the run-app command is issued this happens. And this happens only for the resources.groovy file.


      You wrote:
      "Are you saying that resources.groovy is both copied and compiled into target/classes? Ie- is there a resources.groovy and a resources.class (and associated closure classes) in target/classes?"

      No. just the compiled .class file no .groovy file.

      "Is this causing any kind of problem for your application?"
      No. I was curious and am trying to learn to use STS better.


      Andrew E
      View Public Profile
      Send a private message to Andrew E
      Send email to Andrew E
      Find all posts by Andrew E
      Add Andrew E to Your Contacts

      Comment


      • #4
        Originally posted by bruparel View Post
        I agree with you and understand this. But STS is always recompiling and recopying the resources.groovy file regardless of whether you have made any change to it or not. That is every time the run-app command is issued this happens. And this happens only for the resources.groovy file.
        This might be a grails issue and not an STS issue. When run-app is called, STS just delegates to a new instance of Grails that runs the command. For some reason, grails must be deciding to copy the file over. I am not a grails expert and I do not know why this would be happening.

        Comment


        • #5
          Please escalate it to the Grails team then. We have support subscription for Grails support.
          Thanks.
          Bharat

          Comment


          • #6
            Done, forwarded to the grails team.

            Comment

            Working...
            X