Problem with Classpath

已查看 25 次
跳至第一个未读帖子

Christopher Micallef

未读,
2011年6月16日 07:02:072011/6/16
收件人 fornax-...@googlegroups.com
Hi all,

I have the following problem in my project. One of my dependencies uses the Guava library which is a super set of the Google Collections library.
The Google Collections library is a dependency of one of the Fornax plugins. When I run clean install on my project I get the following error:

12:23:07,290  INFO CompositeComponent:100 - Workflow: executing workflow sculptorworkflow.mwe in workflow.mwe:3
12:23:07,291  INFO CompositeComponent:100 - MweReader: loading file from classpath:/model.btdesign
[ERROR] NoSuchMethodError occurred while running workflow: com.google.common.collect.Multimaps.newArrayListMultimap()Lcom/google/common/collect/ArrayListMultimap;

Reason being that the Multimaps class sued from the class file is the one in the Guava library which does not have the method 'newArrayListMultimap'.

I cannot exclude Guava since I will get errors at runtime and I cannot exclude Google Collections since like that my project will not build.

Anyone has any suggestions on what can be done? At this point even a hack will do.

Regards
Chris

Jörg Reichert

未读,
2011年6月17日 03:11:392011/6/17
收件人 Fornax-Platform
Hi Christopher,

as per pom always the hole classplath is used, it is not possible to
exclude the guava dependency when running the fornax-oaw-m2-plugin.
So you have to extract the fornax-oaw-m2-plugin in a separate pom that
can be placed in the same project and that specifies a dependency to
the former pom. The new created pom can define a classpath without the
guava library so the MWE Runner will use the google.collect 0.8
library instead.

Hope that helps.

Joerg

On 16 Jun., 13:02, Christopher Micallef <krosmical...@gmail.com>
wrote:
> Hi all,
>
> I have the following problem in my project. One of my dependencies uses the
> Guava library which is a super set of the Google Collections library.
> The Google Collections library is a dependency of one of the Fornax plugins.
> When I run clean install on my project I get the following error:
>
> 12:23:07,290  INFO CompositeComponent:100 - Workflow: executing workflow
> sculptorworkflow.mwe in workflow.mwe:3
> 12:23:07,291  INFO CompositeComponent:100 - MweReader: loading file from
> classpath:/model.btdesign
> [ERROR] NoSuchMethodError occurred while running workflow:
> com.google.common.collect.Multimaps.newArrayListMultimap()Lcom/google/commo­n/collect/ArrayListMultimap;
回复全部
回复作者
转发
0 个新帖子