4

I am relatively new to grails and need to know something really basic. Right now I need to be connected to internet to run my grails project, Otherwise the project tries to resolve dependencies indefinitely.. Could not find this anywhere in the documentation.. I am assuming it tries to look for updated versions of plugins?

How do I set this feature off so that the project runs without internet connection.

Regards Priyank

doelleri
  • 19,232
  • 5
  • 61
  • 65
pri_dev
  • 11,315
  • 15
  • 70
  • 122
  • Which version of Grails? – calebds Feb 28 '12 at 18:53
  • The version is 1.3.7, trying to go through the documentation, looks like need to have some settings in BuildConfig.groovy (a guess right now) but not finding the change to be done exactly.. – pri_dev Feb 28 '12 at 19:44
  • it should run straight out of the box, have you done any configuration yet. Try a brand new install. Also check to make sure that localhost points to the loopback IP in your hosts file – Scott Feb 29 '12 at 01:49
  • 1
    looks like grails 2.0 has an explicit setting to set the run-app mode to offline from the documentation here http://grails.org/doc/2.0.0/guide/conf.html#dependencyRepositories need to know how to do it in 1.3.7 – pri_dev Feb 29 '12 at 02:36
  • 1
    This may be related to this bug http://jira.grails.org/browse/GRAILS-8506. It was fixed on 2.0.1. – Philippe Feb 29 '12 at 10:23

1 Answers1

1

Grails 1.3.7 works (from my experience) without being connected to the internet except for the first run:

On the first run, it will resolve dependencies from the internet. But those will be cached locally (check $user/.grails, $user/.m2 and $user/.ivy2 folders). The next run will not need an internet connection.

But there is one catch - if one of your plugins depends on a snapshot version, it will try to connect to the internet each time you start your project in order to see if there is a newer version. See this question Grails: working offline with snapshot dependencies for a solution.

Community
  • 1
  • 1
rdmueller
  • 10,742
  • 10
  • 69
  • 126