安装 grails drools 插件时涉及的手动步骤
我想知道其他人在安装 grails 的 drools 插件时是否遇到过问题,因为我必须执行几个手动步骤才能使其工作,而且我认为它会立即安装并工作。
要实现此功能,我必须执行以下步骤:
步骤 1 - 安装 drools 插件
grails install-plugin drools
步骤 2 - 尝试运行应用程序
grails run-app
(SAXParser 异常阻止我的应用程序启动)
步骤 3 - 删除 Jar 文件以修复 SAXParser 异常
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\lib
删除文件 - xml-apis-1.0.b2.jar
步骤 4 - 将 jar 文件从 .grails 文件夹复制到您自己的应用程序文件夹
复制到
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\lib
工作区中 lib 文件夹所在的任何位置
步骤 5 将 jar 添加到 Spring STS 中的构建路径
步骤 6 将 drools 类从 .grails 文件夹复制到您自己的应用程序中的相应文件夹
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\grails-app\domain\DroolsRule.groovy
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\grails-app\services\DroolsService.groovy
(记住并更改这两个文件中的包以匹配您自己的应用程序包结构)
我有兴趣看看其他人是否遇到过类似的问题,因为它花了同时弄清楚如何做到这一点。当然应该有比这更简单的方法来让它工作吗?
I was wondering if anybody else had experienced problems when installing the drools plugin for grails, becuase I had to do several manual steps to get this working and I thought that it would just install and work straight away.
To get this working I had to do the following steps:
Step 1 - Install drools plugin
grails install-plugin drools
Step 2 - Try running app
grails run-app
(A SAXParser exception prevented my app from starting up)
Step 3 - Remove Jar file to fix SAXParser Exception
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\lib
remove file - xml-apis-1.0.b2.jar
Step 4 - copy jar files from .grails folder to your own app folder
copy from
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\lib
to wherever the lib folder in your workspace is
Step 5 add jars to build path in Spring STS
Step 6 copy drools classes from .grails folder to appropriate folder in your own app
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\grails-app\domain\DroolsRule.groovy
.grails\1.2.2\projects\<your-project>\plugins\drools-0.3\grails-app\services\DroolsService.groovy
(remember and change the package in these 2 files to match your own applications package structure)
I am interested to see if other people have had similar problems because it took a while to figure out how to do this. Surely there should be an easier way of getting it to work than this ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经用 grails 1.1.1 和 drools-0.3 尝试过,它的工作原理如 http://www 中所述.grails.org/Drools+Plugin
您的问题可能特定于 grails 版本。
I have tried this with grails 1.1.1 and drools-0.3 and it worked as mentioned at http://www.grails.org/Drools+Plugin
Your issue must be probably specific to grails version.