I just migrate our nexus repository to new server and updated build.gradle to point on this server.
uploadArchives {
repositories.mavenDeployer {
setUniqueVersion(false)
repository(url: "http://<tomcat2:8080>/nexus-webapp-1.9.2/content/repositories/releases") {
authentication(userName: "username", password: "password")
}
snapshotRepository(url: "http://<tomcat2:8080>/nexus-webapp-1.9.2/content/repositories/snapshots"){
authentication(userName: "username", password: "password")
}
}
}
Now uploadArchives task fails with error:
Error deploying artifact: Error transferring file Error writing to server
I see 401 error in tomcat2 logs but credential are good. I can login to nexus webapp with these credentials.
User permissions also fine in nexus since it works when I point my nexus url to old server.
I verified nexus username and password also in /.m2/settings.xml.