简体   繁体   中英

How to run Grails fully locally?

I'm having some heavy troubles having Grails to run in my corporate environment (probably the firewall not letting it through or other security measures) and at the same time, I can't really provide it with any custom proxy settings (and I'm not sure if this would be enough anyway). Thus, I'd like to be able to run it locally, downloading everything needed manually cause every run-app or 'create-app' ends with Error initializing classpath: services.gradle.org or the similar.

I can bypass having to have an internet connection when creating the project by downloading it from the Grails Application Forge but still, I can't start it without connecting to the internet at least once - and I'm unable to do this because some security things are preventing Grails from connecting. I've tried both a simple grailsw run-app and grailsw --offline run-app but I still get the You must be connected to the internet the first time you use the Grails wrapper , promptly followed by a java.net.UnknownHostException: repo.grails.org . It also tries Downloading https://services.gradle.org/distributions/gradle-3.5-bin.zip even if I download Gradle 3.5 manually and set the PATH to it.

Can I bypass this in any way so that I don't have to be connected, even for the first time?

Can I bypass this in any way so that I don't have to be connected, even for the first time?

Kind of "yes" but practically speaking, "no".

In order to build the project offline all of the dependencies will have to have been downloaded onto your local machine at some point. Doing that without ever connecting to the internet is not a simple thing. In theory you could do it without ever being connected to the internet but you would need to transport all of the dependencies to your machine somehow and that would be a tedious mission.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM