Hello, I am using the Artifactory Publish Task from ‘http://wiki.jfrog.org/confluence/display/RTF/Working+with+Gradle’ (and am using gadle-milestone 3) I am starting my Build Script with: gradle -DPassword=password -DUser=mike uploadArchives
But I always get the error: … User anonymous is not permitted to deploy … Here’s a fragment of my Code:
repositories {
println "User: "+ System.properties[“User”]
println "PW:
" + System.properties[“Password”]
org.apache.ivy.util.url.CredentialsStore.INSTANCE.addCredentials(‘plugins-snapshot’, System.properties[“User”], System.properties[“User”],System.properties[“Password”]);
mavenRepo urls: “http://artifactoryURL/artifactory/experimental”; }
uploadArchives {
repositories {
mavenRepo urls: “http://artifactoryURL/artifactory/experimental”;
repositories.mavenDeployer {
repository(url: “http://artifactoryURL.com/artifactory/experimental”) {
authentication(userName: System.properties[“User”], password: System.properties[“Password”])
println "User: "+ System.properties[“User”]
println "PW:
" + System.properties[“Password”]
}
pom.version = versionNumber
pom.artifactId = artifactId
pom.groupId = groupId
}
} }
However if I print my properties they are not null. I tried a gradle.properties file but I get the same error over and over again… I also tried the Artifactory Plugin and it worked just fine, but now I need a simple task to do it, which can be used in external Build Scripts.
I’m quite new to Gradle, so maybe this is a very stupid question, but I’d appreciate any help. Thank You very much in advance!