<!-- 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" />
<lib dir="../../contrib/clustering/lib/" />
<lib dir="../../contrib/velocity/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" />
<lib dir="../../dist/" regex="apache-solr-clustering-\d.*\.jar" />
<lib dir="../../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
<lib dir="../../dist/" regex="apache-solr-langid-\d.*\.jar" />
<lib dir="../../dist/" regex="apache-solr-velocity-\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="../../contrib/clustering/lib/" />
<lib dir="/total/crap/dir/ignored" />
可以看到,lib引入了apache-solr-3.5.0目录下contrib和dist两个目录下的包,当使用apache-solr-3.5.0\example\solr作为solr.home时,可以正确的找到这些包。另外配置solr.home时,需要把这些文件也引入进来。把apache-solr-3.5.0目录下contrib和dist两个文件夹一起复制到C:\apache-solr目录下,然后打开C:\apache-solr\solr\conf目下的solrconfig.xml,修改如下:
<!-- 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" />
<lib dir="../contrib/clustering/lib/" />
<lib dir="../contrib/velocity/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" />
<lib dir="../dist/" regex="apache-solr-clustering-\d.*\.jar" />
<lib dir="../dist/" regex="apache-solr-dataimporthandler-\d.*\.jar" />
<lib dir="../dist/" regex="apache-solr-langid-\d.*\.jar" />
<lib dir="../dist/" regex="apache-solr-velocity-\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="../contrib/clustering/lib/" />
<lib dir="/total/crap/dir/ignored" />