eclipse插件和maven依赖关系中存在的“groovy-all”jar之间的兼容性问题 [英] Compatibility issue between the 'groovy-all' jars present in eclipse plugin and maven dependency
问题描述
groovy.lang.GroovyRuntimeException: strong>冲突的模块版本。模块[groovy-all载入2.3.7版本,您正在尝试加载版本2.3.10
所以,为了匹配剩下的罐子有两个选项:
- 降级版本的spock-core依赖关系
- 将eclipse插件groovy-all jar升级到2.3.10
第一个选项是不可能的,因为没有这样的spock-核心依赖提供我groovy-all 2.3.7 jar。所以,请指导我如何将我的groovy eclipse插件从2.3.7升级到2.3.10。
PS 我已经设置了groovy我的项目的编译器级别为2.3。而且,我在Luna,开普勒,Juno eclipse面临同样的问题。
您可以降级Spock依赖关系。只需将groovy-all的排除添加到您的Spock依赖关系中即可。然后明确添加一个依赖关系groovy-all 2.3.7
< dependency> ;
...
<排除>
< exclude>
< groupId> org.codehaus.groovy< / groupId>
< artifactId> groovy-all< / artifactId>
< / exclusion>
< / exclusions>
...
< / dependency>
In my POM, there is a dependency: spock-core 1.0-groovy-2.3, which adds groovy-all 2.3.10 to my project. And, my eclipse groovy plugin contains groovy-all 2.3.7 jar. So, whenever I try to run my groovy spec file, following error is thrown:
groovy.lang.GroovyRuntimeException: Conflicting module versions. Module [groovy-all is loaded in version 2.3.7 and you are trying to load version 2.3.10
So, inorder to match the jars I am left with two options:
- Downgrade the version of spock-core dependency
- Upgrade eclipse plugin groovy-all jar to 2.3.10
First option is NOT possible as there is no such spock-core dependency which could provide me groovy-all 2.3.7 jar. So, please guide me as how I should upgrade my groovy eclipse plugin from 2.3.7 to 2.3.10.
P.S. I have set groovy compiler level as 2.3 for my project. And, I am facing the same issue on Luna, Kepler, Juno eclipse.
You can "downgrade" the Spock dependency. Simply add an exclude of "groovy-all" to your Spock dependency. Then explicitly add a dependency on groovy-all 2.3.7
The exclusion can be added as follows:
<dependency>
...
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
...
</dependency>
这篇关于eclipse插件和maven依赖关系中存在的“groovy-all”jar之间的兼容性问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!