Hi Zaccheo,
I don't think this is possible, this is something related with the classloader behavior, and even if there's a "priority" rule in the JVM, I wouldn't rely on that in my application. That could be good in a dev environment where you can specify the "order" of the imported libraries (e.g. Eclipse), but definitely not so good outside (IMO).

As far as I know, there's no a built-in way to declare the version of custom components, but you could adopt the same approach of Lucene, with something like a Version class that drives the behavior of your component.
In this way you will have

 * always one jar (better: unique classes FQNs), so no classloader issues
 * a behavior that changes depending on the configuration

Best,
Andrea

On 03/02/17 10:57, Zaccheo Bagnati wrote:
Hi all,
I developed a custom DocTransformer that is loaded from a .jar in the core
"lib" directory. It works but I have now a problem with versioning:
1. if lib directory contains different versions of the same .jar which one
is loaded? I tried putting both myplugins-1.0.0.jar and myplugins-1.0.1.jar
and I noticed that the oldest one is loaded. Is there a way to force
specific jar version to be loaded in solrconfig?
2. More in general: is it possible to expose in solr the version number for
custom plugins?
Thank you in advance


Reply via email to