Results 1 to 6 of 6

Thread: Resources.groovy

  1. #1
    Join Date
    Sep 2009
    Posts
    15

    Default 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. #2
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    768

    Default

    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?

  3. #3
    Join Date
    Sep 2009
    Posts
    15

    Default 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

  4. #4
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    768

    Default

    Quote 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.

  5. #5
    Join Date
    Sep 2009
    Posts
    15

    Default

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

  6. #6
    Join Date
    Aug 2008
    Location
    Vancouver, BC
    Posts
    768

    Default

    Done, forwarded to the grails team.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •