[ https://issues.apache.org/jira/browse/SOLR-1449?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Hoss Man updated SOLR-1449: --------------------------- Attachment: SOLR-1449.patch Example of how this might work. It provides support for "regex" based jar selectors in a specified directory (so we can point at jars w/o hardcoding version numbers all over the place) and leaves the door open to a simpler glob style syntax to be added later. syntax... {noformat} <!-- all jars in a directory --> <lib dir="../../dist/solr-cell-lib/" /> <!-- any jar in the directory matching the regex --> <lib dir="../../dist/" regex="apache-solr-cell-(\d|\.)+-.*\.jar" /> {noformat} Internally the parsing code is confined to SolrConfig.xml, but a new method has been added to SolrResourceLoader that repalces the ClassLoader with a new one where the parent is fixed on the previous classloader -- it seems a little sketchy, and i would have much rather had SOlrConfig use some new ClassLoaderUtils to build up a comprehensive ClassLoader and then provide it when constructing SolrResourceLoader -- expect SolrConfig doesn't get to construct SOlrResourceLoader. The patch modifies the build.xml file just enough to demonstrate using the solr-cell libs into the example w/o copying them, but i didn't systematicly fix all the other palces we could use this. I also didn't test the patch exhaustively. Note: I've marked this issue as Fix for 1.4 to try and give it some visibility before the release since there seems to be some interest in getting the release size smaller -- but unless adequate eyeballs give it a thumbs up and help do some more rigerous testing i'm leary to try and inlcude it now. (The term "Classloader Hell" exists for a reason -- the upside is i'm 95% sure that even if there winds up being a bug in the nested classloaders, anyone using the existing method (ie: copies their libs) should still work, since that code path should be the same. > solrconfig.xml syntax to add classpath elements from outside of instanceDir > --------------------------------------------------------------------------- > > Key: SOLR-1449 > URL: https://issues.apache.org/jira/browse/SOLR-1449 > Project: Solr > Issue Type: Improvement > Reporter: Hoss Man > Fix For: 1.4 > > Attachments: SOLR-1449.patch > > > the idea has been discussed numerous times that it would be nice if there was > a way to configure a core to load plugins from specific jars (or "classes" > style directories) by path w/o needing to copy them to the "./lib" dir in > the instanceDir. > The current workaround is "symlinks" but that doesn't really help the > situation of the Solr Release artifacts, where we wind up making numerous > copies of jars to support multiple example directories (you can't have > reliable symlinks in zip files) -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.