What to do if a jar includes a conflicting version of another jar?

We’re using yuicompressor to minify our css and javascript in our build script, and now we’re attempting to add less compilation via lesscss. Lesscss depends on the latest version of Rhino, but it turns out that the yuicompressor jar includes a custom version of Rhino that is incompatible.

What’s the best way to accomplish this so that the two don’t conflict with each other?