From 2ea46096b912ea5707cf9cea3821ce243db6d40b Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Wed, 19 Nov 2008 18:49:06 +0000 Subject: [PATCH] SOLR-871: Removed dependancy on stax-utils.jar. If you using solr.jar and running java 6, you can also remove woodstox and geronimo. (ryan) git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@719022 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 3 +++ client/java/solrj/solr-solrj-pom.xml.template | 12 +----------- lib/stax-utils.jar | 2 -- .../solr/handler/AnalysisRequestHandler.java | 3 +-- .../solr/handler/XmlUpdateRequestHandler.java | 3 +-- src/maven/solr-common-pom.xml.template | 9 +++++---- src/maven/solr-core-pom.xml.template | 14 ++------------ .../solr/handler/AnalysisRequestHandlerTest.java | 5 +---- .../solr/handler/XmlUpdateRequestHandlerTest.java | 6 +----- 9 files changed, 15 insertions(+), 42 deletions(-) delete mode 100644 lib/stax-utils.jar diff --git a/CHANGES.txt b/CHANGES.txt index 9d70b01c110..c02abfa6268 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -136,6 +136,9 @@ Other Changes 4. SOLR-852: Refactored common code in CSVRequestHandler and XMLUpdateRequestHandler (gsingers, ehatcher) + 5. SOLR-871: Removed dependancy on stax-utils.jar. If you using solr.jar and running + java 6, you can also remove woodstox and geronimo. (ryan) + Build ---------------------- diff --git a/client/java/solrj/solr-solrj-pom.xml.template b/client/java/solrj/solr-solrj-pom.xml.template index cad9e0d083f..9dde3111606 100644 --- a/client/java/solrj/solr-solrj-pom.xml.template +++ b/client/java/solrj/solr-solrj-pom.xml.template @@ -61,11 +61,6 @@ commons-io 1.3.2 - - commons-logging - commons-logging - 1.0.4 - commons-fileupload commons-fileupload @@ -82,12 +77,7 @@ org.apache.geronimo.specs geronimo-stax-api_1.0_spec 1.0.1 - - - stax-utils - stax-utils - snapshot-20040917 - + diff --git a/lib/stax-utils.jar b/lib/stax-utils.jar deleted file mode 100644 index 0582965060a..00000000000 --- a/lib/stax-utils.jar +++ /dev/null @@ -1,2 +0,0 @@ -AnyObjectId[cd0573d31467410867251dad9df12ebeb97443ab] was removed in git history. -Apache SVN contains full history. \ No newline at end of file diff --git a/src/java/org/apache/solr/handler/AnalysisRequestHandler.java b/src/java/org/apache/solr/handler/AnalysisRequestHandler.java index e5a95abe03e..2c315b1de3d 100644 --- a/src/java/org/apache/solr/handler/AnalysisRequestHandler.java +++ b/src/java/org/apache/solr/handler/AnalysisRequestHandler.java @@ -16,7 +16,6 @@ package org.apache.solr.handler; * limitations under the License. */ -import javanet.staxutils.BaseXMLInputFactory; import org.apache.commons.io.IOUtils; import org.apache.lucene.analysis.Analyzer; import org.apache.lucene.analysis.Token; @@ -60,7 +59,7 @@ public class AnalysisRequestHandler extends RequestHandlerBase { public void init(NamedList args) { super.init(args); - inputFactory = BaseXMLInputFactory.newInstance(); + inputFactory = XMLInputFactory.newInstance(); try { // The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe // XMLInputFactory, as that implementation tries to cache and reuse the diff --git a/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java b/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java index 443c295fc81..eeb4b9d3512 100644 --- a/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java +++ b/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java @@ -17,7 +17,6 @@ package org.apache.solr.handler; -import javanet.staxutils.BaseXMLInputFactory; import org.apache.solr.common.SolrException; import org.apache.solr.common.params.MapSolrParams; import org.apache.solr.common.params.SolrParams; @@ -68,7 +67,7 @@ public class XmlUpdateRequestHandler extends ContentStreamHandlerBase { public void init(NamedList args) { super.init(args); - inputFactory = BaseXMLInputFactory.newInstance(); + inputFactory = XMLInputFactory.newInstance(); try { // The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe // XMLInputFactory, as that implementation tries to cache and reuse the diff --git a/src/maven/solr-common-pom.xml.template b/src/maven/solr-common-pom.xml.template index f9edba280e9..4239b1c196c 100644 --- a/src/maven/solr-common-pom.xml.template +++ b/src/maven/solr-common-pom.xml.template @@ -39,10 +39,10 @@ - org.slf4j - slf4j-api - 1.5.3 - + org.slf4j + slf4j-api + 1.5.5 + diff --git a/src/maven/solr-core-pom.xml.template b/src/maven/solr-core-pom.xml.template index e18833d1ea6..ee91dd25201 100644 --- a/src/maven/solr-core-pom.xml.template +++ b/src/maven/solr-core-pom.xml.template @@ -93,11 +93,6 @@ commons-io 1.3.2 - - commons-logging - commons-logging - 1.0.4 - @@ -106,7 +101,7 @@ @maven_version@ - + woodstox wstx-asl @@ -116,12 +111,7 @@ org.apache.geronimo.specs geronimo-stax-api_1.0_spec 1.0.1 - - - stax-utils - stax-utils - snapshot-20040917 - + diff --git a/src/test/org/apache/solr/handler/AnalysisRequestHandlerTest.java b/src/test/org/apache/solr/handler/AnalysisRequestHandlerTest.java index 3d3747897c0..c51d626d59f 100644 --- a/src/test/org/apache/solr/handler/AnalysisRequestHandlerTest.java +++ b/src/test/org/apache/solr/handler/AnalysisRequestHandlerTest.java @@ -16,18 +16,15 @@ package org.apache.solr.handler; * limitations under the License. */ -import javanet.staxutils.BaseXMLInputFactory; -import org.apache.lucene.analysis.Token; import org.apache.solr.common.util.NamedList; import org.apache.solr.util.AbstractSolrTestCase; import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; import java.io.StringReader; -import java.util.List; public class AnalysisRequestHandlerTest extends AbstractSolrTestCase { - private XMLInputFactory inputFactory = BaseXMLInputFactory.newInstance(); + private XMLInputFactory inputFactory = XMLInputFactory.newInstance(); @Override public String getSchemaFile() { diff --git a/src/test/org/apache/solr/handler/XmlUpdateRequestHandlerTest.java b/src/test/org/apache/solr/handler/XmlUpdateRequestHandlerTest.java index ac48188f894..5f4b95eb4df 100644 --- a/src/test/org/apache/solr/handler/XmlUpdateRequestHandlerTest.java +++ b/src/test/org/apache/solr/handler/XmlUpdateRequestHandlerTest.java @@ -4,18 +4,14 @@ import org.apache.solr.util.AbstractSolrTestCase; import java.io.StringReader; import java.util.Collection; -import javanet.staxutils.BaseXMLInputFactory; - import javax.xml.stream.XMLInputFactory; import javax.xml.stream.XMLStreamReader; -import junit.framework.TestCase; - import org.apache.solr.common.SolrInputDocument; public class XmlUpdateRequestHandlerTest extends AbstractSolrTestCase { - private XMLInputFactory inputFactory = BaseXMLInputFactory.newInstance(); + private XMLInputFactory inputFactory = XMLInputFactory.newInstance(); protected XmlUpdateRequestHandler handler; @Override public String getSchemaFile() { return "schema.xml"; }