Releasing artifacts to CloudBees from Gradle


  • Don’t know how to deploy artifact to CloudBees WebDav repo from Gradle
  • You might be getting Unauthorized (401)


  • DEV@cloud
  • Gradle
  • Maven WebDav repo at CloudBees


The article below explains how to deploy artifacts on CloudBees with Gradle:

I personally tested and it works.

This is the build.gradle file I used:

apply plugin: 'java'
apply plugin: 'maven'

group = "net.ggtools.cloudbees"
version = '0.1-SNAPSHOT'

def cloudbeesUsername = "MY_USERNAME"
def cloudbeesPassword = "MY_PASSWORD"

configurations {

repositories {

dependencies {
    deployerJars "org.apache.maven.wagon:wagon-webdav:1.0-beta-2"

uploadArchives {
    repositories {
        mavenDeployer {
            configuration = configurations.deployerJars
            repository(url: "dav:") {
                authentication(userName: cloudbeesUsername, password: cloudbeesPassword)

However, it might not be clear what is the MY_USERNAME and MY_PASSWORD you need to use.


In order to get your username you need:

    1. Go to the settings menu -engine button next to your account name.


    1. Go to Account Users (Total: X)) You need to be an admin of the account o do this.


Pick up for here you User Name under User Name column next to your email address.


It is the one you use to authenticate at CloudBees under[][]

I think this should be enough information to now be able to deploy to your WebDav repo at CloudBees ;-)


Have more questions? Submit a request


Please sign in to leave a comment.