1

I got an grails application created behind a proxy a few month ago (all worked fine i.e. the initial load of all dependencys via the proxy). Now I want to add some new plugins to it, and some other people should also bring the app up and running on their maschines.

So the ProxySetting in grails (ProxySettings.groovy) is:

client=['http.proxyHost':"1.2.3.4", 'http.proxyPort':"8080",
        'http.proxyUser':'', 'http.proxyPassword':'', 'http.nonProxyHosts':'']
currentProxy='myproxy'

But: when I try to enhance the app by for example

compile ":jasper:1.11.0"

I get an error:

   ==== grailsCentral: tried
      http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/jasper-1.11.0.pom
      -- artifact org.grails.plugins#jasper;1.11.0!jasper.zip:
      http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip


            ::::::::::::::::::::::::::::::::::::::::::::::
            ::          UNRESOLVED DEPENDENCIES         ::
            ::::::::::::::::::::::::::::::::::::::::::::::
            :: org.grails.plugins#jasper;1.11.0: not found
            ::::::::::::::::::::::::::::::::::::::::::::::

I figured out, that when I try to get the pom or zip file from that URL by

wget http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip

--2015-03-12 11:24:27--  http://grails.org/plugins/grails-jasper/tags/RELEASE_1.11.0/grails-jasper-1.11.0.zip
Connecting to 1.2.3.4:8080... connected.
Proxy request sent, awaiting response... 302 Found
Location: https://repo.grails.org/grails/plugins-releases-local/org/grails/plugins/jasper/1.11.0/jasper-1.11.0.zip [following]

It is redirected to https!

So in wget this is only working when I export https_proxy=http://1.2.3.4:8080

So I try to configure it in ProxySettings.groovy like this:

myproxy=['https.proxyHost':'10.206.247.65', 'https.proxyPort':'8080', 
'http.proxyHost':'10.206.247.65', 'http.proxyPort':'8080']

but that doesn't help. Is there any way to tell grails to use the proxy also for https connections or any other way to fix this?

physi
  • 151
  • 8
  • possible duplicate of [Grails unable to install plugin](http://stackoverflow.com/questions/28715832/grails-unable-to-install-plugin), [Failed to resolve dependencies errors in grails 2.3.4](http://stackoverflow.com/questions/29011606/failed-to-resolve-dependencies-errors-in-grails-2-3-4) and [Grails 2.2.1 app cannot resolve dependencies](http://stackoverflow.com/questions/28975041/grails-2-2-1-app-cannot-resolve-dependencies) – Andriy Budzinskyy Mar 12 '15 at 15:29

1 Answers1

1

We had a similar problem and changed the grailsPlugins() entry in BuildConfig, under repositories{} to mavenRepo "http://repo.grails.org/grails/plugins"

I'm not sure if this is the best long-term solution, but it did stop Grails from trying to find plugins over https.

Dave Klein
  • 207
  • 2
  • 10
  • this is right now working, thanks, but I hope there might be a switch or some similar to that topic. – physi Mar 12 '15 at 14:08