I am trying to resolve a dependency in the configuration phase with the artifactory gradle plugin.
apply plugin: 'java' apply plugin: 'com.jfrog.artifactory' artifactory { contextUrl = "${artifactory_contextUrl}" ... resolve { repository { repoKey = 'repo' username = "${artifactory_user}" password = "${artifactory_password}" maven = true } } } dependencies { compile 'commons-lang:commons-lang:+' } task testCustomResolve { logger.quiet configurations.getByName('compile').singleFile.absolutePath }
And it gives me
Failed to resolve all dependencies for ': compile' configuration. It is not possible to resolve the external dependency commons-lang: commons-lang: + because no repositories are defined.
It works like charm at runtime.
task testCustomResolve << { logger.quiet configurations.getByName('compile').singleFile.absolutePath }
or when i use mavenCentral ()
repositories { mavenCentral() }
source share