Skip to content

Apache Lucene open-source search software

SOLR-2365: Move DIH jars out of solr.war

Yonik Seeley77258e59ac6d
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 2a839163145..cb24aaefb3a 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -54,7 +54,6 @@ Upgrading from Solr 3.1-dev
their solrconfig.xml file.
-
Detailed Change List
----------------------
@@ -268,6 +267,11 @@ Upgrading from Solr 1.4
arbitrarily. Solr will now fail on any attempt to sort, or apply a
function to, multi-valued fields
+* The DataImportHandler jars are no longer included in the solr
+ WAR and should be added in Solr's lib directory, or referenced
+ via the <lib> directive in solrconfig.xml.
+
+
Detailed Change List
----------------------
@@ -788,6 +792,8 @@ Other Changes
* SOLR-2340: Add version infos to message in JavaBinCodec when throwing
exception. (koji)
+* SOLR-2365: Move DIH jars out of solr.war (David Smiley via yonik)
+
Build
----------------------
diff --git a/solr/contrib/dataimporthandler/build.xml b/solr/contrib/dataimporthandler/build.xml
index 7772fcbb4e8..5b9ddc18dec 100644
--- a/solr/contrib/dataimporthandler/build.xml
+++ b/solr/contrib/dataimporthandler/build.xml
@@ -276,7 +276,7 @@
<fileset dir="src/main/webapp" includes="**" />
</copy>
<mkdir dir="../../build/web/WEB-INF/lib"/>
- <copy file="target/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"></copy>
+ <!--<copy file="target/${fullnamever}.jar" todir="${solr-path}/build/web/WEB-INF/lib"></copy>-->
<copy file="target/${fullnamever}.jar" todir="${solr-path}/dist"></copy>
<copy file="target/apache-${ant.project.name}-extras-${version}.jar" todir="${solr-path}/dist"></copy>
</target>
diff --git a/solr/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp b/solr/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp
index 3b9d71c1914..574ef67509e 100644
--- a/solr/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp
+++ b/solr/contrib/dataimporthandler/src/main/webapp/admin/dataimport.jsp
@@ -1,6 +1,5 @@
<%@ page import="org.apache.solr.request.SolrRequestHandler" %>
<%@ page import="java.util.Map" %>
-<%@ page import="org.apache.solr.handler.dataimport.DataImportHandler" %>
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
<%--
Licensed to the Apache Software Foundation (ASF) under one or more
@@ -36,7 +35,7 @@ Select handler:
<ul>
<%
for (String key : handlers.keySet()) {
- if (handlers.get(key) instanceof DataImportHandler) { %>
+ if (handlers.get(key).getClass().getName().equals("org.apache.solr.handler.dataimport.DataImportHandler")) { %>
<li><a href="dataimport.jsp?handler=<%=key%>"><%=key%></a></li>
<%
}
diff --git a/solr/example/example-DIH/solr/db/conf/solrconfig.xml b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
index e46d8fe299d..d90bb28c3c1 100644
--- a/solr/example/example-DIH/solr/db/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/db/conf/solrconfig.xml
@@ -28,6 +28,8 @@
<jmx />
+ <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+
<indexDefaults>
<!-- Values here affect all index writers and act as a default unless overridden. -->
<useCompoundFile>false</useCompoundFile>
diff --git a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
index 19a4ebac562..ac30c45bad9 100644
--- a/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/mail/conf/solrconfig.xml
@@ -27,7 +27,7 @@
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
<lib dir="../../../../contrib/dataimporthandler/lib/" regex=".*jar$" />
- <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras-\d.*\.jar" />
+ <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
<indexDefaults>
<!-- Values here affect all index writers and act as a default unless overridden. -->
diff --git a/solr/example/example-DIH/solr/rss/conf/solrconfig.xml b/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
index 054e6f3bb2b..e5ced63200d 100644
--- a/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/rss/conf/solrconfig.xml
@@ -28,6 +28,8 @@
<jmx />
+ <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
+
<indexDefaults>
<!-- Values here affect all index writers and act as a default unless overridden. -->
<useCompoundFile>false</useCompoundFile>
diff --git a/solr/example/example-DIH/solr/tika/conf/solrconfig.xml b/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
index c4dae4cb5cb..36a03cff662 100644
--- a/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
+++ b/solr/example/example-DIH/solr/tika/conf/solrconfig.xml
@@ -27,13 +27,7 @@
<luceneMatchVersion>LUCENE_40</luceneMatchVersion>
<lib dir="../../../../contrib/extraction/lib" />
- <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-extras-\d.*\.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. -->
- <dataDir>${solr.data.dir:./solr/data}</dataDir>
-
+ <lib dir="../../../../dist/" regex="apache-solr-dataimporthandler-.*\.jar" />
<indexDefaults>
<!-- Values here affect all index writers and act as a default unless overridden. -->