简体   繁体   中英

grails 3.0.5 with searchable plugin

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)

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM