lucene-solr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r824364 - in /lucene/solr/trunk: ./ contrib/clustering/ contrib/clustering/example/conf/ contrib/dataimporthandler/ contrib/extraction/ example/example-DIH/solr/mail/conf/ example/solr/ example/solr/conf/ src/common/org/apache/solr/common/u...
Date Mon, 12 Oct 2009 14:41:53 GMT
Author: yonik
Date: Mon Oct 12 14:41:51 2009
New Revision: 824364

URL: http://svn.apache.org/viewvc?rev=824364&view=rev
Log:
SOLR-1449: solrconfig.xml syntax to add classpath elements from outside of instanceDir

Added:
    lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/
    lucene/solr/trunk/src/test/test-files/lib-dirs/README   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/a/
    lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/
    lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/
    lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/b/
    lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/
    lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/
    lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/c/
    lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/
    lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/
    lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/d/
    lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/
    lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt   (with props)
    lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/
    lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt   (with props)
    lucene/solr/trunk/src/test/test-files/solr/lib/
    lucene/solr/trunk/src/test/test-files/solr/lib/README   (with props)
    lucene/solr/trunk/src/test/test-files/solr/lib/classes/
    lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt   (with props)
Modified:
    lucene/solr/trunk/CHANGES.txt
    lucene/solr/trunk/build.xml
    lucene/solr/trunk/contrib/clustering/build.xml
    lucene/solr/trunk/contrib/clustering/example/conf/solrconfig.xml
    lucene/solr/trunk/contrib/dataimporthandler/build.xml
    lucene/solr/trunk/contrib/extraction/build.xml
    lucene/solr/trunk/example/example-DIH/solr/mail/conf/solrconfig.xml
    lucene/solr/trunk/example/solr/README.txt
    lucene/solr/trunk/example/solr/conf/solrconfig.xml
    lucene/solr/trunk/src/common/org/apache/solr/common/util/FileUtils.java
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
    lucene/solr/trunk/src/java/org/apache/solr/core/SolrResourceLoader.java
    lucene/solr/trunk/src/test/org/apache/solr/core/TestConfig.java
    lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml

Modified: lucene/solr/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/CHANGES.txt?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/CHANGES.txt (original)
+++ lucene/solr/trunk/CHANGES.txt Mon Oct 12 14:41:51 2009
@@ -364,6 +364,10 @@
 
 85. SOLR-1478: Enable sort by Lucene docid.  (ehatcher)
 
+86. SOLR-1449: Add <lib> elements to solrconfig.xml to specifying additional
+    classpath directories and regular expressions. (hossman via yonik)
+
+
 Optimizations
 ----------------------
  1. SOLR-374: Use IndexReader.reopen to save resources by re-using parts of the

Modified: lucene/solr/trunk/build.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/build.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/build.xml (original)
+++ lucene/solr/trunk/build.xml Mon Oct 12 14:41:51 2009
@@ -205,7 +205,7 @@
          <path refid="compile.classpath"/>
          <path refid="compile.classpath.solrj"/>
           <fileset dir="contrib">
-            <include name="**/lib/**.jar"/>
+            <include name="**/lib/**/*.jar"/>
           </fileset>
          <pathelement location="${dest}/client/solrj"/>
       </path>
@@ -374,11 +374,7 @@
         description="Runs the core unit tests."
         depends="test-core, test-contrib" />
 
-  <target name="solr-cell-example" depends="compile">
-    <ant antfile="contrib/extraction/build.xml" inheritall="false" target="example" />
-  </target>
-  
-  <target name="junit" depends="compileTests,solr-cell-example">
+  <target name="junit" depends="compileTests,dist-contrib">
     
     <!-- no description so it doesn't show up in -projecthelp -->  
     <mkdir dir="${junit.output.dir}"/>

Modified: lucene/solr/trunk/contrib/clustering/build.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/clustering/build.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/clustering/build.xml (original)
+++ lucene/solr/trunk/contrib/clustering/build.xml Mon Oct 12 14:41:51 2009
@@ -48,6 +48,10 @@
   <target name="clean">
     <delete failonerror="false" dir="${dest}"/>
 
+    <!-- example doesn't create this anymore, but clean it up
+         if it's still there from an old build
+      -->
+    <delete dir="example/lib" />
   </target>
   <target name="clean-downloads">
     <delete>
@@ -112,17 +116,11 @@
     </solr-javac>
   </target>
 
-  <target name="example" depends="build">
-    <mkdir dir="${example.local}/lib"/>
-    <copy file="${dest}/${fullnamever}.jar" todir="${example.local}/lib"/>
-    <copy todir="${example.local}/lib">
-      <fileset dir="lib">
-        <include name="*.jar"/>
-      </fileset>
-      <fileset dir="lib/downloads">
-        <include name="*.jar"/>
-      </fileset>
-    </copy>
+  <target name="example" depends="build,dist">
+    <!-- this task use to copy lib's but that's no longer needed because
+         ../lib and ../lib/downloads are now included explicitly by
+         example/conf/solrconfig.xml
+      -->
   </target>
 
 

Modified: lucene/solr/trunk/contrib/clustering/example/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/clustering/example/conf/solrconfig.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/clustering/example/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/contrib/clustering/example/conf/solrconfig.xml Mon Oct 12 14:41:51 2009
@@ -26,6 +26,13 @@
      -->
   <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
 
+  <lib dir="../../../dist/" regex="apache-solr-clustering-(\d|\.)+-.*\.jar" />
+  <lib dir="../lib" />
+  <!-- these jars are not inlcuded in the release because of their licenses,
+       they will be downlodded when 'ant example' is run
+    -->
+  <lib dir="../lib/downloads/" />
+  
   <!-- Used to specify an alternate directory to hold all index data
        other than the default ./data under the Solr home.
        If replication is in use, this should match the replication configuration. -->
@@ -555,4 +562,4 @@
     -->
   </admin>
 
-</config>
\ No newline at end of file
+</config>

Modified: lucene/solr/trunk/contrib/dataimporthandler/build.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/dataimporthandler/build.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/dataimporthandler/build.xml (original)
+++ lucene/solr/trunk/contrib/dataimporthandler/build.xml Mon Oct 12 14:41:51 2009
@@ -73,6 +73,9 @@
     </delete>
     <!-- Clean up examples -->
     <delete failonerror="false">
+      <!-- we no longer copy things into this directory, but we still clean it up
+           the files are still there from a previous checkout
+        -->
       <fileset dir="${example}/example-DIH/solr/mail/lib" includes="*.jar" />
     </delete>
   </target>
@@ -197,14 +200,11 @@
     </sequential>
   </target>
 
-  <target name="example" depends="build">
-    <!-- Copy the jar into example-DIH/solr/mail/lib -->
-    <copy file="target/apache-${ant.project.name}-extras-${version}.jar" todir="${example}/example-DIH/solr/mail/lib"/>
-    <copy todir="${example}/example-DIH/solr/mail/lib">
-      <fileset dir="lib">
-        <include name="**/*.jar"/>
-      </fileset>
-    </copy>
+  <target name="example" depends="build,dist">
+    <!--
+        this target use to copy libs, but that is no longer needed.
+        now we just depend on dist to ensure the extra's jar exists.
+     -->
   </target>
   
 </project>

Modified: lucene/solr/trunk/contrib/extraction/build.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/contrib/extraction/build.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/contrib/extraction/build.xml (original)
+++ lucene/solr/trunk/contrib/extraction/build.xml Mon Oct 12 14:41:51 2009
@@ -114,13 +114,7 @@
   </target>
 
   <target name="example" depends="build">
-    <!-- Copy the jar into example/solr/lib -->
-    <copy file="${dest}/${fullnamever}.jar" todir="${example}/solr/lib"/>
-    <copy todir="${example}/solr/lib">
-      <fileset dir="lib">
-        <include name="**/*.jar"/>
-      </fileset>
-    </copy>
+    <!-- :NOOP: this use to copy libs but now we can refer to them by path -->
   </target>
 
   <target name="javadoc">
@@ -142,4 +136,4 @@
   </target>
 
 
-</project>
\ No newline at end of file
+</project>

Modified: lucene/solr/trunk/example/example-DIH/solr/mail/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/example/example-DIH/solr/mail/conf/solrconfig.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/example/example-DIH/solr/mail/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/example/example-DIH/solr/mail/conf/solrconfig.xml Mon Oct 12 14:41:51 2009
@@ -25,6 +25,9 @@
          -Dsolr.abortOnConfigurationError=false
      -->
   <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
+
+  <lib dir="../../../../contrib/dataimporthandler/lib/" regex=".*jar$" />
+  <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras.*jar" />
   
   <indexDefaults>
    <!-- Values here affect all index writers and act as a default unless overridden. -->

Modified: lucene/solr/trunk/example/solr/README.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/example/solr/README.txt?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/example/solr/README.txt (original)
+++ lucene/solr/trunk/example/solr/README.txt Mon Oct 12 14:41:51 2009
@@ -45,7 +45,9 @@
         This directory is optional.  If it exists, Solr will load any Jars
         found in this directory and use them to resolve any "plugins"
         specified in your solrconfig.xml or schema.xml (ie: Analyzers,
-        Request Handlers, etc...)
+        Request Handlers, etc...).  Alternatively you can use the <lib>
+        syntax in solrconfig.xml to direct Solr to your plugins.  See the
+        example solrconfig.xml file for details.
 
    bin/
         This directory is optional.  It is the default location used for

Modified: lucene/solr/trunk/example/solr/conf/solrconfig.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/example/solr/conf/solrconfig.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/example/solr/conf/solrconfig.xml (original)
+++ lucene/solr/trunk/example/solr/conf/solrconfig.xml Mon Oct 12 14:41:51 2009
@@ -32,6 +32,36 @@
      -->
   <abortOnConfigurationError>${solr.abortOnConfigurationError:true}</abortOnConfigurationError>
 
+  <!-- lib directives can be used to instruct Solr to load an Jars identified
+       and use them to resolve any "plugins" specified in your solrconfig.xml or
+       schema.xml (ie: Analyzers, Request Handlers, etc...).
+
+       All directories and paths are resolved relative the instanceDir.
+
+       If a "./lib" directory exists in your instanceDir, all files found in it
+       are included as if you had used the following syntax...
+       
+              <lib dir="./lib" />
+    -->
+  <!-- A dir option by itself adds any files found in the directory to the
+       classpath, this is useful for including all jars in a directory.
+    -->
+  <lib dir="../../contrib/extraction/lib" />
+  <!-- When a regex is specified in addition to a directory, only the files in that
+       directory which completely match the regex (anchored on both ends)
+       will be included.
+    -->
+  <lib dir="../../dist/" regex="apache-solr-cell-(\d|\.)+-.*\.jar" />
+  <!-- If a dir option (with or without a regex) is used and nothing is found
+       that matches, it will be ignored
+    -->
+  <lib dir="/total/crap/dir/ignored" /> 
+  <!-- an exact path can be used to specify a specific file.  This will cause
+       a serious error to be logged if it can't be loaded.
+    -->
+  <lib path="../a-jar-that-does-not-exist.jar" /> 
+
+  
   <!-- Used to specify an alternate directory to hold all index data
        other than the default ./data under the Solr home.
        If replication is in use, this should match the replication configuration. -->

Modified: lucene/solr/trunk/src/common/org/apache/solr/common/util/FileUtils.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/common/org/apache/solr/common/util/FileUtils.java?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/src/common/org/apache/solr/common/util/FileUtils.java (original)
+++ lucene/solr/trunk/src/common/org/apache/solr/common/util/FileUtils.java Mon Oct 12 14:41:51 2009
@@ -37,7 +37,7 @@
    * of "base")
    * </p>
    */
-  public static File resolvePath(File base, String path) throws IOException {
+  public static File resolvePath(File base, String path) {
     File r = new File(path);
     return r.isAbsolute() ? r : new File(base, path);
   }

Added: lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java (added)
+++ lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java Mon Oct 12 14:41:51 2009
@@ -0,0 +1,43 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.common.util;
+
+import java.io.File;
+import java.io.FileFilter;
+import java.util.regex.*;
+
+/**
+ * Accepts any file whose name matches the pattern
+ * @version $Id$
+ */
+public final class RegexFileFilter implements FileFilter {
+
+  final Pattern pattern;
+  public RegexFileFilter(String regex) {
+    this(Pattern.compile(regex));
+  }
+  public RegexFileFilter(Pattern regex) {
+    pattern = regex;
+  }
+  public boolean accept(File f) {
+    return pattern.matcher(f.getName()).matches();
+  }
+  public String toString() {
+    return "regex:" + pattern.toString();
+  }
+}

Propchange: lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/common/org/apache/solr/common/util/RegexFileFilter.java
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrConfig.java Mon Oct 12 14:41:51 2009
@@ -17,6 +17,8 @@
 
 package org.apache.solr.core;
 
+import org.apache.solr.common.util.DOMUtil;
+import org.apache.solr.common.util.RegexFileFilter;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.handler.PingRequestHandler;
 import org.apache.solr.handler.component.SearchComponent;
@@ -49,6 +51,7 @@
 import java.util.*;
 import java.util.regex.Pattern;
 import java.util.regex.Matcher;
+import java.io.FileFilter;
 import java.io.IOException;
 import java.io.InputStream;
 
@@ -125,6 +128,7 @@
   SolrConfig(SolrResourceLoader loader, String name, InputStream is)
   throws ParserConfigurationException, IOException, SAXException {
     super(loader, name, is, "/config/");
+    initLibs();
     defaultIndexConfig = new SolrIndexConfig(this, null, null);
     mainIndexConfig = new SolrIndexConfig(this, "mainIndex", defaultIndexConfig);
     reopenReaders = getBool("mainIndex/reopenReaders", true);
@@ -425,4 +429,31 @@
     List<PluginInfo> result = pluginStore.get(type);
     return result == null || result.isEmpty() ? null: result.get(0);
   }
+  
+  private void initLibs() {
+    
+    NodeList nodes = (NodeList) evaluate("lib", XPathConstants.NODESET);
+    if (nodes==null || nodes.getLength()==0)
+      return;
+    
+    log.info("Adding specified lib dirs to ClassLoader");
+    
+     for (int i=0; i<nodes.getLength(); i++) {
+       Node node = nodes.item(i);
+
+       String baseDir = DOMUtil.getAttr(node, "dir");
+       String path = DOMUtil.getAttr(node, "path");
+       if (null != baseDir) {
+         // :TODO: add support for a simpler 'glob' mutually eclusive of regex
+         String regex = DOMUtil.getAttr(node, "regex");
+         FileFilter filter = (null == regex) ? null : new RegexFileFilter(regex);
+         getResourceLoader().addToClassLoader(baseDir, filter);
+       } else if (null != path) {
+         getResourceLoader().addToClassLoader(path);
+       } else {
+         throw new RuntimeException
+           ("lib: missing mandatory attributes: 'dir' or 'path'");
+       }
+     }
+  }
 }

Modified: lucene/solr/trunk/src/java/org/apache/solr/core/SolrResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/java/org/apache/solr/core/SolrResourceLoader.java?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/src/java/org/apache/solr/core/SolrResourceLoader.java (original)
+++ lucene/solr/trunk/src/java/org/apache/solr/core/SolrResourceLoader.java Mon Oct 12 14:41:51 2009
@@ -19,6 +19,7 @@
 
 import java.io.BufferedReader;
 import java.io.File;
+import java.io.FileFilter;
 import java.io.FileInputStream;
 import java.io.IOException;
 import java.io.InputStream;
@@ -42,6 +43,7 @@
 import org.apache.solr.analysis.CharFilterFactory;
 import org.apache.solr.analysis.TokenFilterFactory;
 import org.apache.solr.analysis.TokenizerFactory;
+import org.apache.solr.common.util.FileUtils;
 import org.apache.solr.common.ResourceLoader;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.handler.component.SearchComponent;
@@ -63,7 +65,7 @@
   static final String base = "org.apache" + "." + project;
   static final String[] packages = {"","analysis.","schema.","handler.","search.","update.","core.","request.","update.processor.","util.", "spelling.", "handler.component.", "handler.dataimport"};
 
-  private final ClassLoader classLoader;
+  private URLClassLoader classLoader;
   private final String instanceDir;
   private String dataDir;
   
@@ -90,7 +92,10 @@
       this.instanceDir = normalizeDir(instanceDir);
     }
     log.info("Solr home set to '" + this.instanceDir + "'");
-    this.classLoader = createClassLoader(new File(this.instanceDir + "lib/"), parent);
+    
+    this.classLoader = createClassLoader(null, parent);
+    addToClassLoader("./lib/", null);
+    
     this.coreProperties = coreProperties;
   }
 
@@ -106,28 +111,85 @@
   {
     this(instanceDir, parent, null);
   }
-    
-  static ClassLoader createClassLoader(File f, ClassLoader loader) {
-    if( loader == null ) {
-      loader = Thread.currentThread().getContextClassLoader();
-    }
-    if (f.canRead() && f.isDirectory()) {
-      File[] jarFiles = f.listFiles();
-      URL[] jars = new URL[jarFiles.length];
-      try {
-        for (int j = 0; j < jarFiles.length; j++) {
-          jars[j] = jarFiles[j].toURI().toURL();
-          log.info("Adding '" + jars[j].toString() + "' to Solr classloader");
+
+  /**
+   * Adds every file/dir found in the baseDir which passes the specified Filter
+   * to the ClassLoader used by this ResourceLoader.  This method <b>MUST</b>
+   * only be called prior to using this ResourceLoader to get any resources, otherwise
+   * it's behavior will be non-deterministic.
+   *
+   * @param baseDir base directory whose children (either jars or directories of
+   *                classes) will be in the classpath, will be resolved relative
+   *                the instance dir.
+   * @param filter The filter files must satisfy, if null all files will be accepted.
+   */
+  void addToClassLoader(final String baseDir, final FileFilter filter) {
+    File base = FileUtils.resolvePath(new File(getInstanceDir()), baseDir);
+    this.classLoader = replaceClassLoader(classLoader, base, filter);
+  }
+  
+  /**
+   * Adds the specific file/dir specified to the ClassLoader used by this
+   * ResourceLoader.  This method <b>MUST</b>
+   * only be called prior to using this ResourceLoader to get any resources, otherwise
+   * it's behavior will be non-deterministic.
+   *
+   * @param path A jar file (or directory of classes) to be added to the classpath,
+   *             will be resolved relative the instance dir.
+   */
+  void addToClassLoader(final String path) {
+    final File file = FileUtils.resolvePath(new File(getInstanceDir()), path);
+    if (file.canRead()) {
+      this.classLoader = replaceClassLoader(classLoader, file.getParentFile(),
+                                            new FileFilter() {
+                                              public boolean accept(File pathname) {
+                                                return pathname.equals(file);
+                                              }
+                                            });
+    } else {
+      log.error("Can't find (or read) file to add to classloader: " + file);
+    }
+  }
+  
+  private static URLClassLoader replaceClassLoader(final URLClassLoader oldLoader,
+                                                   final File base,
+                                                   final FileFilter filter) {
+    if (null != base && base.canRead() && base.isDirectory()) {
+      File[] files = base.listFiles(filter);
+      
+      if (null == files || 0 == files.length) return oldLoader;
+      
+      URL[] oldElements = oldLoader.getURLs();
+      URL[] elements = new URL[oldElements.length + files.length];
+      System.arraycopy(oldElements, 0, elements, 0, oldElements.length);
+      
+      for (int j = 0; j < files.length; j++) {
+        try {
+          URL element = files[j].toURI().normalize().toURL();
+          log.info("Adding '" + element.toString() + "' to classloader");
+          elements[oldElements.length + j] = element;
+        } catch (MalformedURLException e) {
+          SolrException.log(log, "Can't add element to classloader: " + files[j], e);
         }
-        return URLClassLoader.newInstance(jars, loader);
-      } catch (MalformedURLException e) {
-        SolrException.log(log,"Can't construct solr lib class loader", e);
       }
+      return URLClassLoader.newInstance(elements, oldLoader.getParent());
     }
-    log.info("Reusing parent classloader");
-    return loader;
+    // are we still here?
+    return oldLoader;
   }
-
+  
+  /**
+   * Convenience method for getting a new ClassLoader using all files found
+   * in the specified lib directory.
+   */
+  static URLClassLoader createClassLoader(final File libDir, ClassLoader parent) {
+    if ( null == parent ) {
+      parent = Thread.currentThread().getContextClassLoader();
+    }
+    return replaceClassLoader(URLClassLoader.newInstance(new URL[0], parent),
+                              libDir, null);
+  }
+  
   public SolrResourceLoader( String instanceDir )
   {
     this( instanceDir, null, null );
@@ -553,6 +615,4 @@
     }
     throw new SolrException( SolrException.ErrorCode.SERVER_ERROR, builder.toString() );
   }
-
-
 }

Modified: lucene/solr/trunk/src/test/org/apache/solr/core/TestConfig.java
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/org/apache/solr/core/TestConfig.java?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/org/apache/solr/core/TestConfig.java (original)
+++ lucene/solr/trunk/src/test/org/apache/solr/core/TestConfig.java Mon Oct 12 14:41:51 2009
@@ -1,120 +1,146 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.apache.solr.core;
-
-import org.apache.lucene.index.IndexWriter;
-import org.apache.solr.handler.admin.ShowFileRequestHandler;
-import org.apache.solr.search.SolrIndexReader;
-import org.apache.solr.search.SolrIndexSearcher;
-import org.apache.solr.update.DirectUpdateHandler2;
-import org.apache.solr.update.SolrIndexConfig;
-import org.apache.solr.util.AbstractSolrTestCase;
-import org.apache.solr.util.RefCounted;
-import org.w3c.dom.Node;
-import org.w3c.dom.NodeList;
-
-import javax.xml.xpath.XPathConstants;
-import java.io.IOException;
-
-public class TestConfig extends AbstractSolrTestCase {
-
-  public String getSchemaFile() {
-    return "schema.xml";
-  }
-
-  //public String getSolrConfigFile() { return "solrconfig.xml"; }
-  public String getSolrConfigFile() {
-    return "solrconfig-termindex.xml";
-  }
-
-  public void testJavaProperty() {
-    // property values defined in build.xml
-
-    String s = solrConfig.get("propTest");
-    assertEquals("prefix-proptwo-suffix", s);
-
-    s = solrConfig.get("propTest/@attr1", "default");
-    assertEquals("propone-${literal}", s);
-
-    s = solrConfig.get("propTest/@attr2", "default");
-    assertEquals("default-from-config", s);
-
-    s = solrConfig.get("propTest[@attr2='default-from-config']", "default");
-    assertEquals("prefix-proptwo-suffix", s);
-
-    NodeList nl = (NodeList) solrConfig.evaluate("propTest", XPathConstants.NODESET);
-    assertEquals(1, nl.getLength());
-    assertEquals("prefix-proptwo-suffix", nl.item(0).getTextContent());
-
-    Node node = solrConfig.getNode("propTest", true);
-    assertEquals("prefix-proptwo-suffix", node.getTextContent());
-  }
-
-  public void testLucene23Upgrades() throws Exception {
-    double bufferSize = solrConfig.getDouble("indexDefaults/ramBufferSizeMB");
-    assertTrue(bufferSize + " does not equal: " + 32, bufferSize == 32);
-    String mergePolicy = solrConfig.get("indexDefaults/mergePolicy/@class");
-    assertTrue(mergePolicy + " is not equal to " + SolrIndexConfig.DEFAULT_MERGE_POLICY_CLASSNAME, mergePolicy.equals(SolrIndexConfig.DEFAULT_MERGE_POLICY_CLASSNAME) == true);
-    String mergeSched = solrConfig.get("indexDefaults/mergeScheduler/@class");
-    assertTrue(mergeSched + " is not equal to " + SolrIndexConfig.DEFAULT_MERGE_SCHEDULER_CLASSNAME, mergeSched.equals(SolrIndexConfig.DEFAULT_MERGE_SCHEDULER_CLASSNAME) == true);
-    boolean luceneAutoCommit = solrConfig.getBool("indexDefaults/luceneAutoCommit");
-    assertTrue(luceneAutoCommit + " does not equal: " + false, luceneAutoCommit == false);
-  }
-
-  // sometime if the config referes to old things, it must be replaced with new stuff
-  public void testAutomaticDeprecationSupport() {
-    // make sure the "admin/file" handler is registered
-    ShowFileRequestHandler handler = (ShowFileRequestHandler) h.getCore().getRequestHandler("/admin/file");
-    assertTrue("file handler should have been automatically registered", handler != null);
-
-    //System.out.println( handler.getHiddenFiles() );
-    // should not contain: <gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles>
-    assertFalse(handler.getHiddenFiles().contains("scheam.xml".toUpperCase()));
-    assertTrue(handler.getHiddenFiles().contains("PROTWORDS.TXT"));
-  }
-
-  public void testTermIndexInterval() throws Exception {
-    class ExposeWriterHandler extends DirectUpdateHandler2 {
-      public ExposeWriterHandler() throws IOException {
-        super(h.getCore());
-      }
-
-      public IndexWriter getWriter() throws IOException {
-        forceOpenWriter();
-        return writer;
-      }
-    }
-    
-    IndexWriter writer = new ExposeWriterHandler().getWriter();
-    int interval = writer.getTermIndexInterval();
-    assertEquals(256, interval);
-  }
-
-  public void testTermIndexDivisor() throws Exception {
-    IndexReaderFactory irf = h.getCore().getIndexReaderFactory();
-    StandardIndexReaderFactory sirf = (StandardIndexReaderFactory) irf;
-    assertEquals(12, sirf.termInfosIndexDivisor);
-    RefCounted<SolrIndexSearcher> refCounted = h.getCore().getSearcher();
-    SolrIndexReader solrReader = refCounted.get().getReader();
-    assertEquals(12, solrReader.getTermInfosIndexDivisor());
-  }
-
-
-}
-
-
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.solr.core;
+
+import org.apache.lucene.index.IndexWriter;
+import org.apache.solr.handler.admin.ShowFileRequestHandler;
+import org.apache.solr.search.SolrIndexReader;
+import org.apache.solr.search.SolrIndexSearcher;
+import org.apache.solr.update.DirectUpdateHandler2;
+import org.apache.solr.update.SolrIndexConfig;
+import org.apache.solr.util.AbstractSolrTestCase;
+import org.apache.solr.util.RefCounted;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+import javax.xml.xpath.XPathConstants;
+import java.io.IOException;
+import java.io.InputStream;
+
+public class TestConfig extends AbstractSolrTestCase {
+
+  public String getSchemaFile() {
+    return "schema.xml";
+  }
+
+  //public String getSolrConfigFile() { return "solrconfig.xml"; }
+  public String getSolrConfigFile() {
+    return "solrconfig-termindex.xml";
+  }
+
+  public void testLib() throws IOException {
+    SolrResourceLoader loader = h.getCore().getResourceLoader();
+    InputStream data = null;
+    String[] expectedFiles = new String[] { "empty-file-main-lib.txt",
+            "empty-file-a1.txt",
+            "empty-file-a2.txt",
+            "empty-file-b1.txt",
+            "empty-file-b2.txt",
+            "empty-file-c1.txt" };
+    for (String f : expectedFiles) {
+      data = loader.openResource(f);
+      assertNotNull("Should have found file " + f, data);
+      data.close();
+    }
+    String[] unexpectedFiles = new String[] { "empty-file-c2.txt",
+            "empty-file-d2.txt" };
+    for (String f : unexpectedFiles) {
+      data = null;
+      try {
+        data = loader.openResource(f);
+      } catch (Exception e) { /* :NOOP: (un)expected */ }
+      assertNull("should not have been able to find " + f, data);
+    }
+  }
+
+  public void testJavaProperty() {
+    // property values defined in build.xml
+
+    String s = solrConfig.get("propTest");
+    assertEquals("prefix-proptwo-suffix", s);
+
+    s = solrConfig.get("propTest/@attr1", "default");
+    assertEquals("propone-${literal}", s);
+
+    s = solrConfig.get("propTest/@attr2", "default");
+    assertEquals("default-from-config", s);
+
+    s = solrConfig.get("propTest[@attr2='default-from-config']", "default");
+    assertEquals("prefix-proptwo-suffix", s);
+
+    NodeList nl = (NodeList) solrConfig.evaluate("propTest", XPathConstants.NODESET);
+    assertEquals(1, nl.getLength());
+    assertEquals("prefix-proptwo-suffix", nl.item(0).getTextContent());
+
+    Node node = solrConfig.getNode("propTest", true);
+    assertEquals("prefix-proptwo-suffix", node.getTextContent());
+  }
+
+  public void testLucene23Upgrades() throws Exception {
+    double bufferSize = solrConfig.getDouble("indexDefaults/ramBufferSizeMB");
+    assertTrue(bufferSize + " does not equal: " + 32, bufferSize == 32);
+    String mergePolicy = solrConfig.get("indexDefaults/mergePolicy/@class");
+    assertTrue(mergePolicy + " is not equal to " + SolrIndexConfig.DEFAULT_MERGE_POLICY_CLASSNAME, mergePolicy.equals(SolrIndexConfig.DEFAULT_MERGE_POLICY_CLASSNAME) == true);
+    String mergeSched = solrConfig.get("indexDefaults/mergeScheduler/@class");
+    assertTrue(mergeSched + " is not equal to " + SolrIndexConfig.DEFAULT_MERGE_SCHEDULER_CLASSNAME, mergeSched.equals(SolrIndexConfig.DEFAULT_MERGE_SCHEDULER_CLASSNAME) == true);
+    boolean luceneAutoCommit = solrConfig.getBool("indexDefaults/luceneAutoCommit");
+    assertTrue(luceneAutoCommit + " does not equal: " + false, luceneAutoCommit == false);
+  }
+
+  // sometime if the config referes to old things, it must be replaced with new stuff
+  public void testAutomaticDeprecationSupport() {
+    // make sure the "admin/file" handler is registered
+    ShowFileRequestHandler handler = (ShowFileRequestHandler) h.getCore().getRequestHandler("/admin/file");
+    assertTrue("file handler should have been automatically registered", handler != null);
+
+    //System.out.println( handler.getHiddenFiles() );
+    // should not contain: <gettableFiles>solrconfig.xml scheam.xml admin-extra.html</gettableFiles>
+    assertFalse(handler.getHiddenFiles().contains("scheam.xml".toUpperCase()));
+    assertTrue(handler.getHiddenFiles().contains("PROTWORDS.TXT"));
+  }
+
+  public void testTermIndexInterval() throws Exception {
+    class ExposeWriterHandler extends DirectUpdateHandler2 {
+      public ExposeWriterHandler() throws IOException {
+        super(h.getCore());
+      }
+
+      public IndexWriter getWriter() throws IOException {
+        forceOpenWriter();
+        return writer;
+      }
+    }
+    
+    IndexWriter writer = new ExposeWriterHandler().getWriter();
+    int interval = writer.getTermIndexInterval();
+    assertEquals(256, interval);
+  }
+
+  public void testTermIndexDivisor() throws Exception {
+    IndexReaderFactory irf = h.getCore().getIndexReaderFactory();
+    StandardIndexReaderFactory sirf = (StandardIndexReaderFactory) irf;
+    assertEquals(12, sirf.termInfosIndexDivisor);
+    RefCounted<SolrIndexSearcher> refCounted = h.getCore().getSearcher();
+    SolrIndexReader solrReader = refCounted.get().getReader();
+    assertEquals(12, solrReader.getTermInfosIndexDivisor());
+  }
+
+
+}
+
+

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/README
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/README?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/README (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/README Mon Oct 12 14:41:51 2009
@@ -0,0 +1,18 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+Items under this directory are used by TestConfig.testLibs()

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/a/a1/empty-file-a1.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/a/a2/empty-file-a2.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/b/b1/empty-file-b1.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/b/b2/empty-file-b2.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/c/c1/empty-file-c1.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/c/c2/empty-file-c2.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/d/d1/empty-file-d1.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Added: lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt (added)
+++ lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/lib-dirs/d/d2/empty-file-d2.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL

Modified: lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml?rev=824364&r1=824363&r2=824364&view=diff
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml (original)
+++ lucene/solr/trunk/src/test/test-files/solr/conf/solrconfig-termindex.xml Mon Oct 12 14:41:51 2009
@@ -24,6 +24,12 @@
 
 <config>
 
+  <!-- see TestConfig.testLib() -->
+  <lib dir="../lib-dirs/a" />
+  <lib dir="../lib-dirs/b" regex="b." />
+  <lib dir="../lib-dirs/c" regex="c1" />
+  <lib path="../lib-dirs/d/d1/" />
+  
   <jmx />
 
   <!-- Used to specify an alternate directory to hold all index data.

Added: lucene/solr/trunk/src/test/test-files/solr/lib/README
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/lib/README?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/lib/README (added)
+++ lucene/solr/trunk/src/test/test-files/solr/lib/README Mon Oct 12 14:41:51 2009
@@ -0,0 +1,18 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You under the Apache License, Version 2.0
+ (the "License"); you may not use this file except in compliance with
+ the License.  You may obtain a copy of the License at
+
+     http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+-->
+
+Items under this directory are used by TestConfig.testLibs()

Propchange: lucene/solr/trunk/src/test/test-files/solr/lib/README
------------------------------------------------------------------------------
    svn:eol-style = native

Added: lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt
URL: http://svn.apache.org/viewvc/lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt?rev=824364&view=auto
==============================================================================
--- lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt (added)
+++ lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt Mon Oct 12 14:41:51 2009
@@ -0,0 +1 @@
+

Propchange: lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: lucene/solr/trunk/src/test/test-files/solr/lib/classes/empty-file-main-lib.txt
------------------------------------------------------------------------------
    svn:keywords = Date Author Id Revision HeadURL



Mime
View raw message