Search code examples
mavengrailsgrails-plugin

Download from Grails plugin repository fails even though plugin is there


I'm trying to use the remote-control plugin with Grails 2.5.6. As per the documentation, I added the following to BuildConfig.groovy:

repositories {
    ...
    mavenRepo "http://dl.bintray.com/alkemist/maven/"
}

dependencies {
    ...
    compile "org.grails.plugins:remote-control:2.0"
}

plugins {
    test ":remote-control:2.0"
}

Now, the output of grails refresh-dependencies is:

| Loading Grails 2.5.6
| Configuring classpath
| Downloading: org/grails/plugins/remote-control/2.0/remote-control-2.0.pom
| Downloading: io/remotecontrol/remote-core/0.7/remote-core-0.7.pom
| Downloading: io/remotecontrol/remote-transport-http/0.7/remote-transport-http-0.7.pom
| Downloading: org/grails/plugins/remote-control/2.0/remote-control-2.0.zip
| Downloading: io/remotecontrol/remote-transport-http/0.7/remote-transport-http-0.7.jar
| Downloading: io/remotecontrol/remote-core/0.7/remote-core-0.7.jar
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins)

To highlight, we get

Could not find artifact org.grails.plugins:remote-control:jar:2.0 in grailsCentral (https://repo.grails.org/grails/plugins)

The confusing part is that the plugin seems to be exactly where it's supposed to be:

enter image description here

I feel like I'm missing something obvious -- what is it?


Solution

  • The documentation is outdated in another way: adding the dependency is not necessary, and does in fact cause the resolving error in the question (I found the plugin sources, not a JAR usable as code dependency).

    After removing

    compile "org.grails.plugins:remote-control:2.0"
    

    from dependencies, Grails correctly refreshes the dependencies and runs with the plugin.