Reputation: 1235
Trying to use the Grails db-reverse-engineer plugin. As this plugin doesn't work with Grails 3 I used SDKMAN to install older versions of Grails just to generate the models. First tried version 2.5.2 (which was still incompatible with the tutorial) and then spun back to 2.2.5. Following the tutorial still fails to install the plugin:
$grails create-app reveng-test
| Created Grails Application at /home/user/pnvStuff/grails/reveng-test
$ cd reveng-test
$ grails install-plugin db-reverse-engineer
| Environment set to development.....
| Warning The install-plugin command is deprecated and may be removed from a future version of Grails. Plugin dependencies should be expressed in grails-app/conf/BuildConfig.groovy. See http://grails.org/doc/2.2.x/guide/conf.html#pluginDependencies.
| Error resolving plugin [name:db-reverse-engineer, group:org.grails.plugins, version:latest.integration]. Plugin not found.
| Error Plugin not found for name [db-reverse-engineer] and version [not specified]
I also tried installing the plugin by referencing it in the plugins section of the BuildConfig.groovy.
runtime ':db-reverse-engineer:0.5.1'
How can I get this plugin installed to generate the needed domain classes?
Upvotes: 1
Views: 415
Reputation: 19682
Grails 2.x (and 1.x for that matter) plugins are now in a repository that isn't included in BuildConfig.groovy
by default. You need to add the below Maven repo to your dependency resolution block.
grails.project.dependency.resolution = {
repositories {
mavenRepo "http://repo.grails.org/grails/repo/"
...
Upvotes: 2