Reputation: 81990
I try to upload some artifacts to maven central (well actually to the sonatyp repository) using gradle.
I set up my build file as described in this nice article
And it worked for quite some time, but now I'm sitting behind a proxy, and the only information how to configure the proxy is a snippet that there is a proxy
element in the configuration and its JavaDoc
But I don't now how to actually translate that into code in my build file
I tried many variations of
uploadArchives {
repositories {
mavenDeployer {
repository(...) {...}
proxy('https://myproxy:8080'){
authentication(userName: proxyUser, password: proxyPassword)
}
...
But all I get are messages that no matching proxy method was found.
What is the correct syntax?
Upvotes: 0
Views: 311
Reputation: 28663
you're almost there. The proxy setup must be within the repository configuration block:
uploadArchives {
repositories {
mavenDeployer {
repository(url:"http://someupload.url"){
proxy(host: "localhost", port: 8080, type: 'http', userName:"proxyusername", password:"proxypassword")
}
}
}
}
Upvotes: 1