How do I pass a java proxy setting?

64 views
Skip to first unread message

Peter Kelley

unread,
Jun 1, 2014, 9:26:30 PM6/1/14
to gae...@googlegroups.com
If I'm developing behind a firewall with a proxy how do I set a proxy for appengineRun? I have set JAVA_OPTS so gradlew is running with the correct proxy but my appengine local instance is not.

Vladimír Oraný

unread,
Jun 3, 2014, 4:38:04 AM6/3/14
to gae...@googlegroups.com
I think you can set these in the appengine closure in build.gradle file


appengine {
    appcfg {
        httpsProxy = '10.0.0.1' // or httpProxy
    }
}




2014-06-02 3:26 GMT+02:00 Peter Kelley <yell...@gmail.com>:
If I'm developing behind a firewall with a proxy how do I set a proxy for appengineRun? I have set JAVA_OPTS so gradlew is running with the correct proxy but my appengine local instance is not.

--
--
You've received this message because you've subscribed to the Gaelyk Google Group.
To send an email to the group, please write to: gae...@googlegroups.com
To unsuscribe from this group: gaelyk+un...@googlegroups.com
To show more options: http://groups.google.fr/group/gaelyk?hl=en

---
You received this message because you are subscribed to the Google Groups "Gaelyk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gaelyk+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Kelley

unread,
Jun 3, 2014, 6:25:01 PM6/3/14
to gae...@googlegroups.com, vlad...@orany.cz
Should I be adding this closure to the build.gradle file in my project directory or is there one somewhere else that I should be altering?

Kunal Dabir

unread,
Jun 4, 2014, 12:35:01 AM6/4/14
to gae...@googlegroups.com, Vladimír Oraný
Yes, It should be in build.gradle.

Peter Kelley

unread,
Jun 4, 2014, 2:09:53 AM6/4/14
to gae...@googlegroups.com, vlad...@orany.cz
This doesn't work for me. Here is my build.gradle (taken from the sample project and modified):

apply plugin: 'war'
apply plugin: 'gaelyk'
apply plugin: 'appengine-geb'

def compatibilityVersion = 1.7
sourceCompatibility = compatibilityVersion
targetCompatibility = compatibilityVersion

buildscript {
    repositories {
        mavenCentral()
        jcenter()
    }

    dependencies {
        classpath 'org.gradle.api.plugins:gradle-gaelyk-plugin:0.6'
        classpath 'org.gradle.api.plugins:gradle-appengine-geb-plugin:0.4'
    }
}

repositories {
    mavenCentral()
    jcenter()
}

dependencies {
    def gaeVersion = '1.9.4'
    def groovyVersion = '2.3.0'

    compile "org.codehaus.groovy:groovy-all:${groovyVersion}"

    compile "com.google.appengine:appengine-api-1.0-sdk:$gaeVersion",
            "com.google.appengine:appengine-api-labs:$gaeVersion"

    compile 'org.sitemesh:sitemesh:3.0-alpha-2'

    compile 'org.gaelyk:gaelyk:2.1.2'


    testCompile 'org.gaelyk:gaelyk-spock:0.4'
    testCompile "com.google.appengine:appengine-api-stubs:$gaeVersion",
            "com.google.appengine:appengine-testing:$gaeVersion"

    functionalTestCompile 'org.seleniumhq.selenium:selenium-firefox-driver:2.40.0'
    functionalTestCompile 'org.gebish:geb-spock:0.9.2'

    appengineSdk "com.google.appengine:appengine-java-sdk:$gaeVersion"


    /**
     * To add binary plugin just declare it as a dependency. For example,
     * uncomment following to add GPars support to your Gaelyk project.
     */
    // compile 'org.codehaus.gpars:gpars-appengine:0.1'

    /**
     * Gaelyk console serves as playground or key-hole surgery tool for
     * your application
     */
    // compile 'org.gaelyk:gaelyk-console:2.0'

}

appengine {
appcfg {
httpProxy = 'proxy.mycompany.com:8080
httpsProxy = 'proxy.mycompany.com:8080

Peter Kelley

unread,
Mar 3, 2016, 10:53:44 PM3/3/16
to Gaelyk, vlad...@orany.cz
I would appreciate an example of a build.gradle file where this is working. The properties do not seem to be making it into the jvmFlags property of RunTask.groovy and hence are not being set. I would be interested also in the format of the proxy string. If I am running a cntlm proxy on 127.0.0.1 on port 3218 what should I be setting httpProxy to?

Does anyone have this working?
Reply all
Reply to author
Forward
0 new messages