How to use 'maven-publish' plugin to publish artifacts to a maven repository via ftp protocol?

apply plugin: ‘maven-publish’

publishing {

publications {

mavenJava(MavenPublication) {




repositories {

maven {

url ‘


} }

Exception: … … remote due to an error: Unsupported Protocol: ‘ftp’: Cannot find wagon which supports the requested protocol: ftp … … Caused by: org.codehaus.plexus.component.repository.exception.ComponentLookupException: Component descriptor cannot be found in the component repository: org.apache.maven.wagon.Wagonftp.

at org.codehaus.plexus.DefaultPlexusContainer.lookup(

at org.codehaus.plexus.DefaultPlexusContainer.lookup(

at org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(

… 97 more

Unfortunately the ‘maven-publish’ plugin doesn’t currently support FTP as a transport protocol. If you want to use other wagon implementations you’ll have to use the old publishing mechanism. You can find more details on that in our documentation.