由于无法解决的错误,我无法使用 GR8 CRM 核心插件。
在 buildconfig.groogy (compile ': crm-core: 2.0.2') 及其依赖项 (compile ": twitter-bootstrap: 2.3.2"compile ": less-resources: 1.3.3.2") 中添加了插件,如中所述您的 tutorial .
但是在编译时出现以下错误:
|Packaging Grails application
....
|Compiling 251 source files
Adding tenantId field to class grails.plugins.crm.core.CrmLookupEntity
.Error
|
Compilation error: startup failed:
C:\appMock\target\work\plugins\crm-core-2.0.0\src\groovy\grails\plugins\crm\core\ClosureDelegate.groovy: 33: [Static type checking] - Cannot statically compile constructor implicitly including non static elements from object initializers, properties or fields.
@ line 33, column 5.
@CompileStatic
^
C:\appMock\target\work\plugins\crm-core-2.0.0\src\groovy\grails\plugins\crm\core\ClosureToMap.groovy: 34: [Static type checking] - Cannot statically compile constructor implicitly including non static elements from object initializers, properties or fields.
@ line 34, column 5.
@CompileStatic
^
C:\appMock\target\work\plugins\crm-core-2.0.0\src\groovy\grails\plugins\crm\util\Graph.groovy: 98: [Static type checking] - Cannot return value of type java.util.Collection <grails.plugins.crm.util.Vertex> on method returning type java.util.List <Vertex>
@ line 98, column 9.
vList.findAll { Vertex v -> !eList.find { Edge e -> v == e.source } }
^
3 errors
Process finished with exit code 1
我无法引用为什么会出现这些错误。我尝试将插件的版本更改为旧版本并继续同样的错误。
我正在使用 Grails 2.3.7 和 Groovy 2.4.0 以及 Java JDK 1.7
最佳答案
您需要下载以前版本的 grails。
http://gr8crm.github.io/tutorials/gr8crm-web/index.html#_prerequisites
我得到了使用 Grails 2.2.5 的内容教程,如果认为这不是太冒险的话。
BuildConfig.groovy 有一些不同的变化:
runtime ":hibernate:2.2.4" runtime ":jquery:1.11.1"
这只是“内容”演示。
必须从命令行执行此操作,因为 IDE 将愚蠢的东西放在工作区中。我想如果我想和它战斗足够长的时间,我会想出来的。但想让演示继续进行。
看看 github 分支 m4-greach。它说适用于“升级到 Grails 2.4.5”
https://github.com/gr8crm/gr8contact/tree/m4-greach
关于grails - GR8 CRM 核心插件错误无法编译,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28543971/