Reputation: 48807
I'm working on two projects A
and B
:
A
is a Maven project that has Guava as dependency, and is packaged into a JAR;B
is a classic web project (i.e. without Maven), is packaged into a WAR, and uses A
's JAR.A
and B
both are Eclipse projects. To make B
able to use A
's classes without having to re-package A
each time, I right-clicked on B
in Eclipse > Properties > Deployment Assembly > Add > Project > A
.
B
thus compiles, but on runtime, when I call a class of A
that uses Guava, I get a java.lang.NoClassDefFoundError
caused by a java.lang.ClassNotFoundException
, since B
doesn't have Guava into its classpath (even though he has A
).
Any idea how to proceed?
Upvotes: 0
Views: 358
Reputation: 4608
You should add guava-library in the deployment assembly. =)
Upvotes: 1