Our shop is currently using Grails 2.3.8, and each developer keeps a external build config in our home directory that contains the following:
artifactory.username = 'username'
artifactory.password = 'password'
artifactory.repo = 'http://our.artifactory.server.com:8080/artifactory/central'
artifactory.repositoryLocation = "http://our.artifactory.server.com:8080/artifactory/libs-release-local"
Here is how we configure all of our Grails projects in our BuildConfig.groovy:
def config = new ConfigSlurper(grailsSettings.grailsEnv).parse(new File("$home/my_build_config.groovy").toURI().toURL())
grails.project.dependency.resolver = "maven"
grails.project.dependency.resolution = {
inherits("global") {
}
log "error"
checksums true
legacyResolve false
repositories {
String artifactoryUrl = config.artifactory.repo
mavenRepo(artifactoryUrl) {
auth([
username: config.artifactory.username,
password: config.artifactory.password
])
updatePolicy "always"
}
mavenLocal()
}
dependencies {
// ...
}
plugins {
// ...
}
}
If that doesn't work, I would suggest looking at the Artifactory permission settings for your virtual repositories and user permissions in general.