Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I enable dependency management for PlayFramework behind a proxy?

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

like image 527
Yura Taras Avatar asked Apr 22 '11 13:04

Yura Taras


2 Answers

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
like image 188
mandubian Avatar answered Jan 03 '23 19:01

mandubian


My solution is:

play dependencies --sync --verbose -Dhttp.proxyHost=YOUR_PROXY
-Dhttp.proxyPort=YOUR_PORT 
-Dhttp.proxyUser=YOUR_USERNAME -Dhttp.proxyPassword=YOUR_PASSWORD
like image 37
Aban Avatar answered Jan 03 '23 19:01

Aban