(SolrResourceLoader loader)
| 911 | throw new SolrException( |
| 912 | SolrException.ErrorCode.SERVER_ERROR, "Multiple plugins configured for type: " + type); |
| 913 | } |
| 914 | |
| 915 | private void initLibs(SolrResourceLoader loader) { |
| 916 | // TODO Want to remove SolrResourceLoader.getInstancePath; it can be on a Standalone subclass. |
| 917 | // For Zk subclass, it's needed for the time being as well. We could remove that one if we |
| 918 | // remove "instancePath/lib" in SolrCloud. Can wait till 9.0. |
| 919 | Path instancePath = loader.getInstancePath(); |
| 920 | List<URL> urls = new ArrayList<>(); |
| 921 | |
| 922 | Path libPath = instancePath.resolve("lib"); |
| 923 | if (Files.exists(libPath)) { |
| 924 | try { |
| 925 | urls.addAll(SolrResourceLoader.getURLs(libPath)); |
| 926 | } catch (IOException e) { |
| 927 | log.warn("Couldn't add files from {} to classpath: {}", libPath, e); |
| 928 | } |
| 929 | } |
| 930 | if (!urls.isEmpty()) { |
| 931 | loader.addToClassLoader(urls); |
| 932 | loader.reloadLuceneSPI(); |
| 933 | } |
| 934 | |
| 935 | List<ConfigNode> nodes = root.getAll("lib"); |
| 936 | if (nodes != null && nodes.size() > 0) { |
| 937 | log.warn("<lib/> entries no longer supported in solrconfig.xml; ignoring..."); |
| 938 | } |
| 939 | } |
| 940 |
no test coverage detected