尝试使用Grails db-逆向工程插件。作为这个插件不适用于Grails 3,我使用SDKMAN来创建Grails的安装旧版本,仅仅是为了生成模型。首先尝试2.5.2版本(它仍然与本教程不兼容),然后转回到2.2.5。在本教程之后,仍然无法安装插件:
$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]我还尝试通过在BuildConfig.groovy的插件部分引用插件来安装插件。
runtime ':db-reverse-engineer:0.5.1'如何安装这个插件来生成所需的域类?
发布于 2015-11-24 17:09:45
Grails2.x(以及1.x )插件现在位于默认情况下不包含在BuildConfig.groovy中的存储库中。您需要将下面的Maven repo添加到您的依赖性解析块中。
grails.project.dependency.resolution = {
repositories {
mavenRepo "http://repo.grails.org/grails/repo/"
...https://stackoverflow.com/questions/33898396
复制相似问题