Grails
  1. Grails
  2. GRAILS-7962

run-app and test-app do not see new jars added to lib directory

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.0-M1
    • Fix Version/s: None
    • Component/s: Build System, Documentation
    • Labels:
    • Environment:
      MacOSX 10.6.8
      STS 2.8.0.M1
      java version "1.6.0_26"

      Description

      1 - Create a grails project
      2 - run-app or test-app your app
      3 - add jars to the lib directory
      4 - create a unit test or controller that uses the jar file
      5 - run-app or test-app will give you NoClassDefFoundError errors

      A work around is to do a grails clean after changing the contents of the lib directory. I'm assuming new jars should be automatically found without doing a clean.

        Activity

        Hide
        Graeme Rocher added a comment -

        You can workaround without doing a clean by running:

        grails --force-resolve run-app
        

        Note that will slow down Grails' startup time if run every time

        Show
        Graeme Rocher added a comment - You can workaround without doing a clean by running: grails --force-resolve run-app Note that will slow down Grails' startup time if run every time
        Hide
        Martin Gee added a comment -

        Thanks for the tip. I was looking for switches e.g. --stracktrace --force-resolve etc. Are they documented anywhere?

        Show
        Martin Gee added a comment - Thanks for the tip. I was looking for switches e.g. --stracktrace --force-resolve etc. Are they documented anywhere?
        Hide
        Graeme Rocher added a comment -

        type grails --help for a full list

        Show
        Graeme Rocher added a comment - type grails --help for a full list
        Hide
        Graeme Rocher added a comment -

        Note that --force-resolve was renamed --refresh-dependencies for the final release of Grails 2.0

        Show
        Graeme Rocher added a comment - Note that --force-resolve was renamed --refresh-dependencies for the final release of Grails 2.0

          People

          • Assignee:
            Graeme Rocher
            Reporter:
            Martin Gee
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Last Reviewed:

              Development