Make grails to run locally (intranet)

140 Views Asked by At

After reading this post, I have to say that I am in the exact same situation.

I can use USB keys to transfert files from the internet on my computer, but my computer could not access to the Internet.

So my question is : how set up my computer environment to make grails compile and run the first time without Internet ?

Which packages do I have to download, how to create my folder, and configure my build.gradle to make it running ? (when I want to visit maven repository, I see a looooot of folder and subfolder, and so on. Do I have to create the same arborescence ? Do I have to download it all ? Does it existe any software to make it automatically ? (scrappy ?)

Anny tutorial, help is welcome, and I am ready to create a full tutorial when (if) I finally achieve this.

Thanks in advance !

(At this point, I create the war file for my project on a machine with internet access and make it running on the intranet computer with tomcat, but this solution is not satisfaying for developpement)

1

There are 1 best solutions below

4
On

So my question is : how set up my computer environment to make grails compile and run the first time without Internet ?

Basically we need internet connection to download required dependencies/jars from remote location(Maven). And even our Maven comes already with a local repository(~/.m2/repository)

To Installs a packaged application or plugin into the local Maven cache use following command:

grails maven-install [--binary]

Please check documentation here

In your new application do modify below details:

Local Resolvers

If you do not wish to use a public Maven repository you can specify a flat file repository:

repositories {
    flatDir name:'myRepo', dirs:'/path/to/repo'
}

To specify your local Maven cache (~/.m2/repository) as a repository:

repositories {
    mavenLocal()
}

Please refer this and this for all details and documentation

This is similar issue someone raised in grails repo