librelist archives

« back to archive

Lucene 3.6.0 dependency conflict for plugins

Lucene 3.6.0 dependency conflict for plugins

James Aley
2013-08-27 @ 10:40

I'm writing a documentation plugin for Leiningen, for which I'd really like
to make use of a recent version of Lucene, say 4.4.0. As I want this code
to run as a plugin, I need to run with eval-in-leiningen set to true.

Leiningen has an indirect dependency on Lucene 3.6.0 through maven-indexer.
When my code attempts to use anything from the org.apache.lucene.document.*
package, I get a VerifyError.

What's the best way to work around this? As far as I know, there's not a
way to put in exclusions for Leiningen's dependencies itself, and even if
there was, that may presumably break something?

I guess I could just rewrite my code to use Lucene 3.6.0, but this doesn't
really feel like a great solution, as it's just a dependency conflict
waiting to happen in later Leiningen versions should the maven-indexer
version be bumped later.

Any suggestions greatly appreciated!