I'm writing some kind of framework, and within want to provide a specific feature that uses lucene
(take lucene as an example of any feature here).
So in my framework I definitely have to maven
include the lucene library as dependency
to be able to build the feature upon.
Now I don't want to create a submodule for every feature, but rather have everything packed in a single jar library. And if the user wants to use the lucene-feature, he might activate it using Spring
, and would also have to include the lucene libs with maven.
But how can I achive this? So far I have the lucene library in my framework, and if I use this as a dependency, automatically the lucene libs are imported too, even if the feature is not used. How can I prevent this?