views:

101

answers:

2

We're currently working on an app with a relative large number of external dependencies, as we're integrating with a fairly complex existing system.

The dependencies are working just fine, however, it still takes several minutes to resolve dependencies regardless of whether or not the dependencies are already in the Ivy cache. If the cache needs updating, it takes even longer of course.

Is there any way we can speed this process up, or disable dependency resolution on every run? This is now becoming a huge productivity drain.

Thanks!

A: 

I don't think there is a good way to get around the time it takes to do dependency resolution; as I understand it, it was a specific design decision in Grails to do the dependency resolution at startup time so that the app doesn't have to pull in dependencies during runtime.

You could get around this in dev mode at least by just leaving your Grails app running and hot-deploying any changes - if you're using one of the recent Grails versions with the embedded Tomcat server, this works really well.

gareth_bowles
+1  A: 

Maybe it is a little tricky but i would do the following

  1. Use the enviroment element of config dsl to add dependecy resolution only in test e production see [here][1]
  2. Put all your depenecy jar in the lib forlder of your grails app I would do it with maven dependecy:copy. I think it could be done in ivy too
  3. Add the jar file to your scm-ignore-list
  4. Use a CI build system to check dependecy resolution is done right

    [1]: http://www.grails.org/doc/1.3.x/guide/3.%20Configuration.html#3.2 Environments

Sammyrulez