Maven Plugin got "Malformed reply from SOCKS server", but mvn deploy:deploy-file not


(Ronnin Li) #1

it seems same as Maven-publish plugin: Failed to retrieve remote metadata (maven-metadata.xml)

simple java project:

apply plugin: ‘java’
apply plugin: ‘maven’’

uploadArchives {
repositories.mavenDeployer {
repository(url: mavenRepoRelease) {
authentication(userName: mavenUsername, password: mavenPassword)
}
snapshotRepository(url: mavenRepoSnapshot) {
authentication(userName: mavenUsername, password: mavenPassword)
}
}
}

gradle failed to run:

gradle clean uploadArchives --info

got:

Failed to retrieve remote metadata ronnin:test:1.0.0-SNAPSHOT/maven-metadata.xml: Could not transfer metadata ronnin:test:1.0.0-SNAPSHOT/maven-metadata.xml from/to remote (http://192.168.1.111/repository/maven-snapshots/): Malformed reply from SOCKS server

but mvn deploy:deploy-file worked:

mvn deploy:deploy-file \
-DrepositoryId=my-snapshots \
-Durl=http://192.168.1.111/repository/maven-snapshots/ \
-Dfile=build/libs/test-1.0.0-SNAPSHOT.jar \
-DpomFile=build/poms/pom-default.xml

the mvn repo located in 192.168.1.111 is powered by nexus OSS 3.13.0-01