How to enable dependency management for PlayFramework behind a proxy server?

Hello everyone | I am trying to add a new dependency for a Play application, but it cannot resolve the dependencies. I added the line:

- org.fusesource.scalate -> scalate-core 1.4.1

Now when I try to run the 'game dependencies --verbose', I get the following:

    Server access Error: Network is unreachable: connect url=http://repo1.maven.org/maven2/org/fusesource/scalate/scalate-core/1.4.1/scalate-core-1.4.1.pom
    Server access Error: Network is unreachable: connect url=http://repo1.maven.org/maven2/org/fusesource/scalate/scalate-core/1.4.1/scalate-core-1.4.1.jar

This is because of the corporate proxy. I cannot figure out how to configure Play (from the output, I assume that it uses Ivy to manage dependencies) to use a proxy. Still python scripts like "play install" are working fine.
Thanks

+5
source share
4 answers

, ant setproxy, ...
- :

#> play deps YOUR_PROJECT_DIR -Dhttp.proxyHost=YOUR_PROXY -Dhttp.proxyPort=YOUR_PORT
+11

:

play dependencies --sync --verbose -Dhttp.proxyHost=YOUR_PROXY
-Dhttp.proxyPort=YOUR_PORT 
-Dhttp.proxyUser=YOUR_USERNAME -Dhttp.proxyPassword=YOUR_PASSWORD
+3

and if you use a proxy script instead, use the same solution as ProgrammerX, but just substitute the URL for the script:

set HTTP_PROXY=http://your-proxy-script-server/ProxyScript.pac
+2
source

Another easy way for Windows is to simply set HTTP_PROXY in the environment properties or in a command, for example,

set HTTP_PROXY = http: // proxy server: port

+1
source

All Articles