grails 3.0.5 with searchable plugin

半城伤御伤魂 提交于 2019-12-11 19:40:26

问题


i am trying to upgrade my application from grails 2.1.1 to grails 3.0.5

i get a problem to install searchable plugin...

i see this page.. it says "Grails version: 2.0 > *".. then it must be support for grails 3.0.5

i put mavenRepo "http://repo.grails.org/grails/core" in repositories like this..

repositories {
    mavenLocal()
    maven { url "https://repo.grails.org/grails/core" }
    mavenRepo "http://repo.grails.org/grails/core"
}

and

compile ":searchable:0.6.9" in dependencies

but i get this error

C:\Users\User\Documents\ChatV3>grails run-app

Configuring > 0/1 projects > root project > Resolving dependencies ':classpath 1/1 projects > Resolving dependencies ':agent' > Resolving dependencies ':agentC opy' > Resolving dependencies ':versionManagement' > Resolving dependencies ':ve

FAILURE: Build failed with an exception.

  • Where: Build file 'C:\Users\User\Documents\ChatV3\build.gradle' line: 44

  • What went wrong: A problem occurred evaluating root project 'ChatV3'.

    Could not find method mavenRepo() for arguments [http://repo.grails.org/grails /core] on root project 'ChatV3'.

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 6.642 secs | Error Error initializing classpath: Could not find method mavenRepo() for argu ments [http://repo.grails.org/grails/core] on root project 'ChatV3'. (Use --stac ktrace to see the full trace)


回答1:


You cannot assume that any Grails plugin that works in version 2.x also works in 3.x; the opposite is true - assume no plugin works in 3.x until you've seen that the plugin has been updated. The plugin system was reworked significantly in 3.x, so all plugins have to be converted. This has been done for many plugins, but there are many remaining that need updating.

Independent of that though, you don't want to use the searchable plugin in any version of Grails. The plugin is based on Compass, but that project is basically dead - the last release was over six years ago. The big problem with Compass is that it doesn't scale well at all beyond a single server because it uses a file-based Lucene index. The creator of Compass went on to create ElasticSearch (now called just "Elastic") which is server-based and significantly better than Compass in every way. Shay Banon wrote a blog post about this a while back.



来源:https://stackoverflow.com/questions/33314785/grails-3-0-5-with-searchable-plugin

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!