Drools 6 sisu-番石榴与番石榴冲突 [英] Drools 6 sisu-guava conflicts with guava
问题描述
我们最近从Drools 5升级到Drools 6,并遇到了令人不安的冲突问题.
We have recently upgraded from Drools 5 to Drools 6 and have run into disturbing conflict issues.
我们已将kie-ci
导入到项目中. kie-ci
引入sisu-guava
. sisu-guava
更改了Google番石榴中某些类的可访问性.不幸的是,它使用的软件包名称与Google的番石榴相同.
We have kie-ci
imported into out project. kie-ci
brings in sisu-guava
. sisu-guava
changes the accessibility of some of the classes from google's guava. Unfortunately, it uses the same package name as google's guava.
由于我们在项目中使用的是谷歌的番石榴,因此我们遇到了类冲突.
尝试从项目中删除sisu-guava
(使用maven排除方法)会导致可访问性异常,因为kie-ci代码尝试访问在sisu-guava
中是公共的但在Google番石榴中是私有的类.
Since we're working with google's guava in our project, we are running into conflicts of classes.
An attempt to remove sisu-guava
from the project (using a maven exclusion) results in accessibility exceptions, as the kie-ci code attempt to access classes which are public in sisu-guava
but are private in google's guava.
任何想法如何解决这个问题.
Any idea how to get round this.
推荐答案
我似乎在使用Drools 6.2时也遇到了同样的问题. Drools依赖于番石榴10.0.1,因为我的项目依赖于番石榴16,而maven选择了版本16(正确).
I seem to have the same problem using drools 6.2. Drools is dependent on guava 10.0.1, where as my project had a dependency on guava 16 and maven was picking the version 16 (correctly).
在检查依赖关系树时,我发现对番石榴的流口水依赖关系是由"org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M5:runtime"决定的.
On inspecting the dependency tree, I find that the drools dependency on guava is dictated by "org.eclipse.sisu:org.eclipse.sisu.plexus:jar:0.0.0.M5:runtime".
存在org.eclipse.sisu.plexus的较新版本,因此我在项目的pom中添加了以下内容,以获取最新版本:
There is a newer version of org.eclipse.sisu.plexus, so I added the following to my project's pom to pick up the latest version, which is:
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<version>0.3.1</version>
</dependency>
</dependencies>
</dependencyManagement>
现在,似乎对番石榴没有依赖性,因为流口水并且问题得以解决,我的项目可以使用番石榴16版.
Now, there does not seem to be a dependency on guava, for drools and the problem is solved and my project can use version 16 of guava.
这篇关于Drools 6 sisu-番石榴与番石榴冲突的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!