5

Hi all
I'm trying to add new dependency to Play application, but it fails to resolve dependencies. I've added a line:

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

Now when I'm trying to run 'play dependencies --verbose' I receive 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 a corporate proxy. I can't figure out how to configure Play (from output I assume it uses Ivy for Dependency management) to use proxy. Still python scripts like 'play install' work ok.
Thanks

Yura Taras
  • 1,293
  • 14
  • 26

4 Answers4

11

Apparently ivy uses ant's setproxy which simply add some system options...
Can you try something like:

#> play deps YOUR_PROJECT_DIR -Dhttp.proxyHost=YOUR_PROXY -Dhttp.proxyPort=YOUR_PORT
mandubian
  • 4,427
  • 1
  • 22
  • 15
3

My solution is:

play dependencies --sync --verbose -Dhttp.proxyHost=YOUR_PROXY
-Dhttp.proxyPort=YOUR_PORT 
-Dhttp.proxyUser=YOUR_USERNAME -Dhttp.proxyPassword=YOUR_PASSWORD
eeerahul
  • 1,629
  • 4
  • 27
  • 38
Aban
  • 31
  • 1
2

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
Kevin Welker
  • 7,719
  • 1
  • 40
  • 56
1

Another simple way on windows is to simply set HTTP_PROXY in the environment properties or on the command like as so

set HTTP_PROXY=http://proxy server:port

techarch
  • 1,121
  • 2
  • 20
  • 30