Open franck-serot opened 9 years ago
The problem is on line 39 of 'D:\workshop\asciidoc\asciidoctor-gradle-examples\asciidoc-to-deckjs-example\build.gradle' with the copy of https://github.com/asciidoctor/asciidoctor-deck.js/archive/${asciidoctorBackendVersion}.zip and extract of directory asciidoctor-deck.js-${asciidoctorBackendVersion}/templates.
I can download with a browser the file https://github.com/asciidoctor/asciidoctor-deck.js/archive/${asciidoctorBackendVersion}.zip.
In fact, the problem is the proxy of my company. I can build without problem at home.
How can we configure a proxy in the following task ?
task download << { mkdir downloadDir vfs { cp "zip:https://github.com/asciidoctor/asciidoctor-deck.js/archive/${asciidoctorBackendVersion}.zip!asciidoctor-deck.js-${asciidoctorBackendVersion}/templates", templateDir, recursive:true, overwrite:true cp "zip:https://github.com/imakewebthings/deck.js/archive/${deckjsVersion}.zip!deck.js-${deckjsVersion}", deckjsDir, recursive:true, overwrite:true } }
I'm facing a similar issue with revealjs.
Proxy settings are documented here: https://docs.gradle.org/current/userguide/build_environment.html#sec:accessing_the_web_via_a_proxy
If this doesn't work, this one could help (in this case: a local squid proxy):
gradlew -Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=3128 -Dhttps.proxyHost=127.0.0.1 -Dhttps.proxyPort=3129
And if this doesn't help, maybe this snippet for build.gradle could help (taken from the web):
task setHttpProxyFromEnv {
def map = ['HTTP_PROXY': 'http', 'HTTPS_PROXY': 'https']
for (e in System.getenv()) {
def key = e.key.toUpperCase()
if (key in map) {
def base = map[key]
def url = e.value.toURL()
println " - systemProp.${base}.proxy=${url.host}:${url.port}"
System.setProperty("${base}.proxyHost", url.host.toString())
System.setProperty("${base}.proxyPort", url.port.toString())
}
}
}
build.dependsOn setHttpProxyFromEnv
(you may replace the map keys with your OS' sys env proxy settings)
Hi, I try to compile asciidoctor-gradle-examples but I have the following error. Could you please help me ? Best regards, Franck
:asciidoc-diagram-to-html-example:jrubyPrepareGems UP-TO-DATE :asciidoc-diagram-to-html-example:asciidoctor :asciidoc-to-all-example:asciidoctor UP-TO-DATE :asciidoc-to-deckjs-example:download FAILED
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':asciidoc-to-deckjs-example:download'.
BUILD FAILED
Total time: 1 mins 28.441 secs