Gradle repository 401 problem


(Jorge) #1

Hi Guys,

I’m getting 401 on my gradle.build

maven {
url "https://nexus/repository/maven-public"
credentials {
username nexusUser
password nexusPassword
}
}

If I run gradlew clean build and I put nexusUser and nexusPassword on gradle.properties it will fail with 401 but the properties are there because if I do println(nexusUser) I get a response. If I hard code the credentials it does work. Gradle 4.3.1


(Jorge) #2

I found out the problem was that the gradle 4.3.1 does not escape spaces on gradle.properties which is really bad…


(James Justinic) #3

What were you expecting Gradle to do differently here? The values are loaded from gradle.properties using the core properties support in the Java platform. It should only work when following the specifications of a Java properties file.