John Little
John Little

Reputation: 12338

grails 2.5.5 cant install plugins:rest-client-builder:jar:2.1.1

I get

Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:rest-client-builder:jar:2.1.1 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)

With this BuildConfig.groovy:

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    grailsPlugins()
    grailsHome()
    mavenLocal()
    grailsCentral()
    mavenCentral()
    mavenRepo "http://repo.spring.io/milestone"
    mavenRepo "http://repo1.maven.org/maven2/"
    mavenRepo "http://repo.grails.org/grails/core"
    mavenRepo "http://repo.grails.org/grails/plugins"
}

dependencies {
    test "org.grails:grails-datastore-test-support:1.0.2-grails-2.4"
    compile 'commons-beanutils:commons-beanutils:1.8.3'
    runtime 'mysql:mysql-connector-java:5.1.34'
    compile 'com.maxmind.geoip2:geoip2:2.7.0'
    compile 'org.apache.httpcomponents:httpclient:4.5.2'
    compile "org.grails.plugins:rest-client-builder:2.1.1"
}

I tried the usual:

 grails clean
 grails refresh-depenencies

But no luck. Lots of people have had the same issue, but none of their "fixes" have worked unfortunately.

Upvotes: 1

Views: 828

Answers (1)

John Little
John Little

Reputation: 12338

Solution courtesy of dmahapatro, move the definition into plugins:

repositories {
    inherits true // Whether to inherit repository definitions from plugins

    grailsPlugins()
    grailsHome()
    mavenLocal()
    grailsCentral()
    mavenCentral()
    mavenRepo "http://repo.spring.io/milestone"
    mavenRepo "http://repo1.maven.org/maven2/"
    mavenRepo "http://repo.grails.org/grails/core"
    mavenRepo "http://repo.grails.org/grails/plugins"
}

plugins { 
    build ":tomcat:8.0.20"
    :
    compile "org.grails.plugins:rest-client-builder:2.1.1"
}

Upvotes: 2

Related Questions