How can I have two different versions of the same dependency on a project

I’m working on a project which have a lot of external dependencies, and I’m having a problem with the mina-core lib. In one project the required version is 1.04 and another one requires 2.0.4, the problem is that these versions are incompatible with each other, so if I try to pack the EAR with the 1.04 version the other lib doesn’t work, and vice versa.

Is there a way to resolve this issue?

As a workaround I’m packing the old lib inside the server’s lib dir and it works as expected.

What exactly are you trying to accomplish? Package both versions in the Ear?