Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Speeding Up Grails Dependency Resolution

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!

like image 901
Thody Avatar asked May 19 '10 15:05

Thody


2 Answers

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

like image 152
Sammyrulez Avatar answered Oct 07 '22 19:10

Sammyrulez


try using the --offline switch. this will avoid remote repositories and only search the file system (i.e., local maven repo). you only need to go back online when new dependencies are added.

like image 20
Peter Hawkins Avatar answered Oct 07 '22 18:10

Peter Hawkins