The plugin itself is responsible for returning information about itself via an overridden method IIRC, so you have control over what version is reported.
As for the other, a slight variant on King's process would be to put your custom jars in a different directory then used the <lib.../> directive in solrconfig to explicitly load a specific jar rather than the regex. But separate directories would work as well, a matter of taste really. Best, Erick On Fri, Feb 3, 2017 at 8:21 AM, King Rhoton <krho...@adobe.com> wrote: > What we ended up doing was creating separate directories for each version of > a plugin we had written, and in each collection's solrconfig,xml, we add the > path to the specific directory we wanted that collection to use via the "<lib > dir=..." tag. > >> On Feb 3, 2017, at 2:40 AM, Andrea Gazzarini <gxs...@gmail.com> wrote: >> >> 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 >>> >> > > > ----- > King Rhoton, c/o Adobe, 601 Townsend, SF, CA 94103 > 415-832-4480 x24480 > S&P support requests should go to search-...@adobe.com >