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

apply plugin: ‘maven-publish’

publishing {

publications {

mavenJava(MavenPublication) {

from components.java

}

}

repositories {

maven {

url ‘ftp://x.com/maven/

}

} }

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(DefaultPlexusContainer.java:323)

at org.codehaus.plexus.DefaultPlexusContainer.lookup(DefaultPlexusContainer.java:440)

at org.apache.maven.artifact.manager.DefaultWagonManager.getWagon(DefaultWagonManager.java:157)

… 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.

thanks