diff --git a/dev-tools/eclipse/dot.classpath b/dev-tools/eclipse/dot.classpath index 012e05c282e..0f123e6a3f6 100644 --- a/dev-tools/eclipse/dot.classpath +++ b/dev-tools/eclipse/dot.classpath @@ -110,14 +110,22 @@ - - - - + + + + + + + + + + + + diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index 7317820622d..e7331d9249a 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -440,6 +440,8 @@ Other Changes * SOLR-3202: Dropping Support for JSP. New Admin UI is all client side (ryan) +* SOLR-3159: Upgrade example and tests to run with Jetty 8 (ryan) + Documentation ---------------------- diff --git a/solr/build.xml b/solr/build.xml index 1cbc75f3fe8..1c14ce1ade4 100644 --- a/solr/build.xml +++ b/solr/build.xml @@ -180,8 +180,7 @@ - - + diff --git a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java index c66c58f00fc..0ba5b363838 100644 --- a/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java +++ b/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java @@ -18,23 +18,24 @@ package org.apache.solr.client.solrj.embedded; import java.io.IOException; +import java.util.EnumSet; import java.util.Random; +import javax.servlet.DispatcherType; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.apache.solr.servlet.SolrDispatchFilter; -import org.mortbay.component.LifeCycle; -import org.mortbay.jetty.Connector; -import org.mortbay.jetty.Handler; -import org.mortbay.jetty.Server; -import org.mortbay.jetty.bio.SocketConnector; -import org.mortbay.jetty.servlet.Context; -import org.mortbay.jetty.servlet.FilterHolder; -import org.mortbay.jetty.servlet.HashSessionIdManager; -import org.mortbay.log.Logger; -import org.mortbay.thread.QueuedThreadPool; +import org.eclipse.jetty.server.*; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.bio.SocketConnector; +import org.eclipse.jetty.server.session.HashSessionIdManager; +import org.eclipse.jetty.servlet.FilterHolder; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.util.component.LifeCycle; +import org.eclipse.jetty.util.log.Logger; +import org.eclipse.jetty.util.thread.QueuedThreadPool; /** * Run solr using jetty @@ -122,7 +123,7 @@ public class JettySolrRunner { } // Initialize the servlets - final Context root = new Context(server, context, Context.SESSIONS); + final ServletContextHandler root = new ServletContextHandler(server,context,ServletContextHandler.SESSIONS); server.addLifeCycleListener(new LifeCycle.Listener() { public void lifeCycleStopping(LifeCycle arg0) { @@ -147,12 +148,10 @@ public class JettySolrRunner { schemaFilename); // SolrDispatchFilter filter = new SolrDispatchFilter(); // FilterHolder fh = new FilterHolder(filter); - dispatchFilter = root.addFilter(SolrDispatchFilter.class, "*", - Handler.REQUEST); + dispatchFilter = root.addFilter(SolrDispatchFilter.class, "*", EnumSet.of(DispatcherType.REQUEST) ); if (solrConfigFilename != null) System.clearProperty("solrconfig"); if (schemaFilename != null) System.clearProperty("schema"); System.clearProperty("solr.solr.home"); - } public void lifeCycleFailure(LifeCycle arg0, Throwable arg1) { @@ -305,21 +304,9 @@ class NoLog implements Logger { debug = enabled; } - public void info(String msg, Object arg0, Object arg1) { - } - public void debug(String msg, Throwable th) { } - public void debug(String msg, Object arg0, Object arg1) { - } - - public void warn(String msg, Object arg0, Object arg1) { - } - - public void warn(String msg, Throwable th) { - } - public Logger getLogger(String name) { if ((name == null && this.name == null) || (name != null && name.equals(this.name))) @@ -331,4 +318,53 @@ class NoLog implements Logger { public String toString() { return "NOLOG[" + name + "]"; } + + @Override + public void debug(Throwable arg0) { + + } + + @Override + public void debug(String arg0, Object... arg1) { + + } + + @Override + public String getName() { + return toString(); + } + + @Override + public void ignore(Throwable arg0) { + + } + + @Override + public void info(Throwable arg0) { + + } + + @Override + public void info(String arg0, Object... arg1) { + + } + + @Override + public void info(String arg0, Throwable arg1) { + + } + + @Override + public void warn(Throwable arg0) { + + } + + @Override + public void warn(String arg0, Object... arg1) { + + } + + @Override + public void warn(String arg0, Throwable arg1) { + } } diff --git a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java index 34f54679fc9..2a90fd441ee 100644 --- a/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java +++ b/solr/core/src/test/org/apache/solr/cloud/ChaosMonkey.java @@ -34,7 +34,7 @@ import org.apache.solr.common.cloud.ZkStateReader; import org.apache.solr.core.CoreContainer; import org.apache.solr.servlet.SolrDispatchFilter; import org.apache.zookeeper.KeeperException; -import org.mortbay.jetty.servlet.FilterHolder; +import org.eclipse.jetty.servlet.FilterHolder; /** * The monkey can stop random or specific jetties used with SolrCloud. diff --git a/solr/example/etc/jetty.xml b/solr/example/etc/jetty.xml index e455d0dd06c..f287280d8a1 100755 --- a/solr/example/etc/jetty.xml +++ b/solr/example/etc/jetty.xml @@ -1,57 +1,37 @@ - + - + - - - - - org.mortbay.jetty.Request.maxFormContentSize - 1000000 - + - - + + 10 10000 - 20 + false - - - - - - - - + 50000 @@ -80,148 +60,85 @@ - - - - - - - - - - - - - - - - - - - - + - + - + - + - + - - - - - - - - - - - - - - - - /contexts - 5 - - - - - - - - - - - - - - - - - - - - - /webapps - false - true - false - /etc/webdefault.xml - - - - - - - - - - - - - - - - - - - - - true - false - false + true + true 1000 + false + false + + + + + + + + + + + + org.eclipse.jetty.server.webapp.ContainerIncludeJarPattern + .*/servlet-api-[^/]*\.jar$ + + + + + + + + + + + + + + + /webapps + /etc/webdefault.xml + 1 + /contexts + true + + + + diff --git a/solr/example/etc/webdefault.xml b/solr/example/etc/webdefault.xml index b8d01141697..213138b35fe 100644 --- a/solr/example/etc/webdefault.xml +++ b/solr/example/etc/webdefault.xml @@ -1,118 +1,126 @@ - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Default web.xml file. This file is applied to a Web application before it's own WEB_INF/web.xml file + + + + + + org.eclipse.jetty.servlet.listener.ELContextCleaner + + + + + + + + org.eclipse.jetty.servlet.listener.IntrospectorCleaner + + - - - org.mortbay.jetty.webapp.NoTLDJarPattern - start.jar|ant-.*\.jar|dojo-.*\.jar|jetty-.*\.jar|jsp-api-.*\.jar|junit-.*\.jar|servlet-api-.*\.jar|dnsns\.jar|rt\.jar|jsse\.jar|tools\.jar|sunpkcs11\.jar|sunjce_provider\.jar|xerces.*\.jar - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + default - org.mortbay.jetty.servlet.DefaultServlet + org.eclipse.jetty.servlet.DefaultServlet + + aliases + false + acceptRanges true @@ -135,15 +143,11 @@ maxCachedFileSize - 10000000 + 200000000 maxCachedFiles - 1000 - - - cacheType - both + 2048 gzip @@ -152,7 +156,13 @@ useFileMappedBuffer true - + + 0 - + + + + default + / + - default / - @@ -250,20 +263,22 @@ - + jsp org.apache.jasper.servlet.JspServlet - logVerbosityLevel - DEBUG + logVerbosityLevel + DEBUG - fork - false + fork + false - xpoweredBy - false + xpoweredBy + false @@ -305,26 +320,11 @@ - @@ -337,7 +337,7 @@ - + - arISO-8859-6 - beISO-8859-5 - bgISO-8859-5 - caISO-8859-1 - csISO-8859-2 - daISO-8859-1 - deISO-8859-1 - elISO-8859-7 - enISO-8859-1 - esISO-8859-1 - etISO-8859-1 - fiISO-8859-1 - frISO-8859-1 - hrISO-8859-2 - huISO-8859-2 - isISO-8859-1 - itISO-8859-1 - iwISO-8859-8 - jaShift_JIS - koEUC-KR - ltISO-8859-2 - lvISO-8859-2 - mkISO-8859-5 - nlISO-8859-1 - noISO-8859-1 - plISO-8859-2 - ptISO-8859-1 - roISO-8859-2 - ruISO-8859-5 - shISO-8859-5 - skISO-8859-2 - slISO-8859-2 - sqISO-8859-2 - srISO-8859-5 - svISO-8859-1 - trISO-8859-9 - ukISO-8859-5 - zhGB2312 - zh_TWBig5 + + ar + ISO-8859-6 + + + be + ISO-8859-5 + + + bg + ISO-8859-5 + + + ca + ISO-8859-1 + + + cs + ISO-8859-2 + + + da + ISO-8859-1 + + + de + ISO-8859-1 + + + el + ISO-8859-7 + + + en + ISO-8859-1 + + + es + ISO-8859-1 + + + et + ISO-8859-1 + + + fi + ISO-8859-1 + + + fr + ISO-8859-1 + + + hr + ISO-8859-2 + + + hu + ISO-8859-2 + + + is + ISO-8859-1 + + + it + ISO-8859-1 + + + iw + ISO-8859-8 + + + ja + Shift_JIS + + + ko + EUC-KR + + + lt + ISO-8859-2 + + + lv + ISO-8859-2 + + + mk + ISO-8859-5 + + + nl + ISO-8859-1 + + + no + ISO-8859-1 + + + pl + ISO-8859-2 + + + pt + ISO-8859-1 + + + ro + ISO-8859-2 + + + ru + ISO-8859-5 + + + sh + ISO-8859-5 + + + sk + ISO-8859-2 + + + sl + ISO-8859-2 + + + sq + ISO-8859-2 + + + sr + ISO-8859-5 + + + sv + ISO-8859-1 + + + tr + ISO-8859-9 + + + uk + ISO-8859-5 + + + zh + GB2312 + + + zh_TW + Big5 + - + Disable TRACE @@ -405,6 +522,6 @@ - + diff --git a/solr/example/lib/jetty-6.1.26-patched-JETTY-1340.jar b/solr/example/lib/jetty-6.1.26-patched-JETTY-1340.jar deleted file mode 100644 index 16de87a3020..00000000000 --- a/solr/example/lib/jetty-6.1.26-patched-JETTY-1340.jar +++ /dev/null @@ -1,2 +0,0 @@ -AnyObjectId[6be492c92fd7b36ed008e8461c8657cc6bd27c2a] was removed in git history. -Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-continuation-8.1.1.v20120215.jar b/solr/example/lib/jetty-continuation-8.1.1.v20120215.jar new file mode 100644 index 00000000000..ea2fad74957 --- /dev/null +++ b/solr/example/lib/jetty-continuation-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[321153c4eaa3b6799abcd7a282ad335d2e5770a4] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-deploy-8.1.1.v20120215.jar b/solr/example/lib/jetty-deploy-8.1.1.v20120215.jar new file mode 100644 index 00000000000..ac68aec60e7 --- /dev/null +++ b/solr/example/lib/jetty-deploy-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[c37954738237cc6b86ecead3a2a987179de5a90b] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-http-8.1.1.v20120215.jar b/solr/example/lib/jetty-http-8.1.1.v20120215.jar new file mode 100644 index 00000000000..d9a6f911f3f --- /dev/null +++ b/solr/example/lib/jetty-http-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[3a2b3f0cb4a84e9ed6289071c15f5be696a5f733] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-io-8.1.1.v20120215.jar b/solr/example/lib/jetty-io-8.1.1.v20120215.jar new file mode 100644 index 00000000000..063d095f449 --- /dev/null +++ b/solr/example/lib/jetty-io-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[d9f67c24e45d29325b836793e7e73ad6e0751dfa] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-jmx-8.1.1.v20120215.jar b/solr/example/lib/jetty-jmx-8.1.1.v20120215.jar new file mode 100644 index 00000000000..fb8e9fb094c --- /dev/null +++ b/solr/example/lib/jetty-jmx-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[4ae70016e73544581885ebeebefc82f65b9b0f59] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-security-8.1.1.v20120215.jar b/solr/example/lib/jetty-security-8.1.1.v20120215.jar new file mode 100644 index 00000000000..da7dd69da70 --- /dev/null +++ b/solr/example/lib/jetty-security-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[f75dbd1afbfc267031ac1d52fbb30274aa80293f] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-server-8.1.1.v20120215.jar b/solr/example/lib/jetty-server-8.1.1.v20120215.jar new file mode 100644 index 00000000000..884075ca814 --- /dev/null +++ b/solr/example/lib/jetty-server-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[0a313af27ee278a0e054d47225ceff2ad839a907] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-servlet-8.1.1.v20120215.jar b/solr/example/lib/jetty-servlet-8.1.1.v20120215.jar new file mode 100644 index 00000000000..4a810fe7f80 --- /dev/null +++ b/solr/example/lib/jetty-servlet-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[aec7b8f95ab733336a0072999e800d8aa00b6868] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-util-6.1.26-patched-JETTY-1340.jar b/solr/example/lib/jetty-util-6.1.26-patched-JETTY-1340.jar deleted file mode 100644 index 0304e37bbf7..00000000000 --- a/solr/example/lib/jetty-util-6.1.26-patched-JETTY-1340.jar +++ /dev/null @@ -1,2 +0,0 @@ -AnyObjectId[1a9ace88dd00cf94e17d231805cc8bdc60886376] was removed in git history. -Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-util-8.1.1.v20120215.jar b/solr/example/lib/jetty-util-8.1.1.v20120215.jar new file mode 100644 index 00000000000..007197293d0 --- /dev/null +++ b/solr/example/lib/jetty-util-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[096f6cf92bd5b3827d904899c5bae0994919aef5] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-util-LICENSE-ASL.txt b/solr/example/lib/jetty-util-LICENSE-ASL.txt deleted file mode 100644 index d6456956733..00000000000 --- a/solr/example/lib/jetty-util-LICENSE-ASL.txt +++ /dev/null @@ -1,202 +0,0 @@ - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - - APPENDIX: How to apply the Apache License to your work. - - To apply the Apache License to your work, attach the following - boilerplate notice, with the fields enclosed by brackets "[]" - replaced with your own identifying information. (Don't include - the brackets!) The text should be enclosed in the appropriate - comment syntax for the file format. We also recommend that a - file or class name and description of purpose be included on the - same "printed page" as the copyright notice for easier - identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed 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. diff --git a/solr/example/lib/jetty-util-NOTICE.txt b/solr/example/lib/jetty-util-NOTICE.txt deleted file mode 100644 index 21d4ed3d0ee..00000000000 --- a/solr/example/lib/jetty-util-NOTICE.txt +++ /dev/null @@ -1,36 +0,0 @@ -============================================================== - Jetty Web Container - Copyright 1995-2009 Mort Bay Consulting Pty Ltd -============================================================== - -The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd -unless otherwise noted. It is licensed under the apache 2.0 -license. - -The javax.servlet package used by Jetty is copyright -Sun Microsystems, Inc and Apache Software Foundation. It is -distributed under the Common Development and Distribution License. -You can obtain a copy of the license at -https://glassfish.dev.java.net/public/CDDLv1.0.html. - -The UnixCrypt.java code ~Implements the one way cryptography used by -Unix systems for simple password protection. Copyright 1996 Aki Yoshida, -modified April 2001 by Iris Van den Broeke, Daniel Deville. -Permission to use, copy, modify and distribute UnixCrypt -for non-commercial or commercial purposes and without fee is -granted provided that the copyright notice appears in all copies. - -The default JSP implementation is provided by the Glassfish JSP engine -from project Glassfish http://glassfish.dev.java.net. Copyright 2005 -Sun Microsystems, Inc. and portions Copyright Apache Software Foundation. - -Some portions of the code are Copyright: - 2006 Tim Vernum - 1999 Jason Gilbert. - -The jboss integration module contains some LGPL code. - -The win32 Java Service Wrapper (v3.2.3) is Copyright (c) 1999, 2006 -Tanuki Software, Inc. and 2001 Silver Egg Technology. It is -covered by an open license which is viewable at -http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/extras/win32service/LICENSE.txt diff --git a/solr/example/lib/jetty-webapp-8.1.1.v20120215.jar b/solr/example/lib/jetty-webapp-8.1.1.v20120215.jar new file mode 100644 index 00000000000..bf06dff4fe2 --- /dev/null +++ b/solr/example/lib/jetty-webapp-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[0c8aa4af4cb1cf8eeb224436703c170ac000f2cc] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/jetty-xml-8.1.1.v20120215.jar b/solr/example/lib/jetty-xml-8.1.1.v20120215.jar new file mode 100644 index 00000000000..07785a8d2ed --- /dev/null +++ b/solr/example/lib/jetty-xml-8.1.1.v20120215.jar @@ -0,0 +1,2 @@ +AnyObjectId[9df8fbdf339bb009af06ee457b763e2019245d49] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/servlet-api-2.5-20081211.jar b/solr/example/lib/servlet-api-2.5-20081211.jar deleted file mode 100644 index 7db0068dda9..00000000000 --- a/solr/example/lib/servlet-api-2.5-20081211.jar +++ /dev/null @@ -1,2 +0,0 @@ -AnyObjectId[b0537c4dbdfbaeaf91078d79a32d01110f8f1de4] was removed in git history. -Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/lib/servlet-api-3.0.jar b/solr/example/lib/servlet-api-3.0.jar new file mode 100644 index 00000000000..422a2041cf4 --- /dev/null +++ b/solr/example/lib/servlet-api-3.0.jar @@ -0,0 +1,2 @@ +AnyObjectId[b135409682ee2173ee74cc9e9b00469d7fa0a27e] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/example/start.jar b/solr/example/start.jar index b2fca2178f2..ae239cfd8ac 100755 --- a/solr/example/start.jar +++ b/solr/example/start.jar @@ -1,2 +1,2 @@ -AnyObjectId[d3a94bcfae630a90d4103437bd3c2da0d37d98c9] was removed in git history. +AnyObjectId[fa5ede63c7f6f696ab00ef0ec8f03c35ff2c98f3] was removed in git history. Apache SVN contains full history. \ No newline at end of file diff --git a/solr/lib/servlet-api-2.4.jar b/solr/lib/servlet-api-2.4.jar deleted file mode 100755 index 9e7f1e85a59..00000000000 --- a/solr/lib/servlet-api-2.4.jar +++ /dev/null @@ -1,2 +0,0 @@ -AnyObjectId[018d6effad3823d0ea59f1b58ab154fc2652f418] was removed in git history. -Apache SVN contains full history. \ No newline at end of file diff --git a/solr/lib/servlet-api-3.0.jar b/solr/lib/servlet-api-3.0.jar new file mode 100644 index 00000000000..422a2041cf4 --- /dev/null +++ b/solr/lib/servlet-api-3.0.jar @@ -0,0 +1,2 @@ +AnyObjectId[b135409682ee2173ee74cc9e9b00469d7fa0a27e] was removed in git history. +Apache SVN contains full history. \ No newline at end of file diff --git a/solr/lib/servlet-api-LICENSE-ASL.txt b/solr/lib/servlet-api-LICENSE-ASL.txt index 5495b3c5123..d6456956733 100644 --- a/solr/lib/servlet-api-LICENSE-ASL.txt +++ b/solr/lib/servlet-api-LICENSE-ASL.txt @@ -1 +1,202 @@ -TODO: fill in + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. diff --git a/solr/lib/servlet-api-NOTICE.txt b/solr/lib/servlet-api-NOTICE.txt index de6f8021188..21d4ed3d0ee 100644 --- a/solr/lib/servlet-api-NOTICE.txt +++ b/solr/lib/servlet-api-NOTICE.txt @@ -1,5 +1,36 @@ -Apache Tomcat -Copyright 1999-2007 The Apache Software Foundation +============================================================== + Jetty Web Container + Copyright 1995-2009 Mort Bay Consulting Pty Ltd +============================================================== -This product includes software developed by -The Apache Software Foundation (http://www.apache.org/). +The Jetty Web Container is Copyright Mort Bay Consulting Pty Ltd +unless otherwise noted. It is licensed under the apache 2.0 +license. + +The javax.servlet package used by Jetty is copyright +Sun Microsystems, Inc and Apache Software Foundation. It is +distributed under the Common Development and Distribution License. +You can obtain a copy of the license at +https://glassfish.dev.java.net/public/CDDLv1.0.html. + +The UnixCrypt.java code ~Implements the one way cryptography used by +Unix systems for simple password protection. Copyright 1996 Aki Yoshida, +modified April 2001 by Iris Van den Broeke, Daniel Deville. +Permission to use, copy, modify and distribute UnixCrypt +for non-commercial or commercial purposes and without fee is +granted provided that the copyright notice appears in all copies. + +The default JSP implementation is provided by the Glassfish JSP engine +from project Glassfish http://glassfish.dev.java.net. Copyright 2005 +Sun Microsystems, Inc. and portions Copyright Apache Software Foundation. + +Some portions of the code are Copyright: + 2006 Tim Vernum + 1999 Jason Gilbert. + +The jboss integration module contains some LGPL code. + +The win32 Java Service Wrapper (v3.2.3) is Copyright (c) 1999, 2006 +Tanuki Software, Inc. and 2001 Silver Egg Technology. It is +covered by an open license which is viewable at +http://svn.codehaus.org/jetty/jetty/branches/jetty-6.1/extras/win32service/LICENSE.txt diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java index 057cee55f9b..a5ea9ad6fdb 100644 --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/CommonsHttpSolrServer.java @@ -473,7 +473,7 @@ public class CommonsHttpSolrServer extends SolrServer if(err!=null) { reason = (String)err.get("msg"); // TODO? get the trace? - } + } } catch(Exception ex) {} if(reason == null) { diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/StartSolrJetty.java b/solr/solrj/src/test/org/apache/solr/client/solrj/StartSolrJetty.java index 50c16196c02..c5fa072f9a6 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/StartSolrJetty.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/StartSolrJetty.java @@ -17,10 +17,10 @@ package org.apache.solr.client.solrj; -import org.mortbay.jetty.Connector; -import org.mortbay.jetty.Server; -import org.mortbay.jetty.bio.SocketConnector; -import org.mortbay.jetty.webapp.WebAppContext; +import org.eclipse.jetty.server.Connector; +import org.eclipse.jetty.server.Server; +import org.eclipse.jetty.server.bio.SocketConnector; +import org.eclipse.jetty.webapp.WebAppContext; /** * @since solr 1.3 @@ -31,6 +31,9 @@ public class StartSolrJetty { //System.setProperty("solr.solr.home", "../../../example/solr"); + javax.servlet.FilterRegistration xx; + + Server server = new Server(); SocketConnector connector = new SocketConnector(); // Set some timeout options to make debugging easier. @@ -52,7 +55,7 @@ public class StartSolrJetty // mBeanContainer.start(); // } - server.addHandler(bb); + server.setHandler(bb); try { System.out.println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP"); diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java index 111a5b8801c..7abe578e1f9 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java @@ -26,14 +26,16 @@ import org.apache.lucene.util.LuceneTestCase; import org.apache.lucene.util.SystemPropertiesRestoreRule; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.util.ExternalPaths; -import org.junit.Rule; -import org.junit.rules.RuleChain; -import org.junit.rules.TestRule; -import org.mortbay.jetty.Connector; -import org.mortbay.jetty.Server; -import org.mortbay.jetty.bio.SocketConnector; -import org.mortbay.jetty.servlet.HashSessionIdManager; -import org.mortbay.jetty.webapp.WebAppContext; +import org.eclipse.jetty.server.*; +import org.eclipse.jetty.server.bio.SocketConnector; +import org.eclipse.jetty.server.session.HashSessionIdManager; +import org.eclipse.jetty.servlet.FilterHolder; +import org.eclipse.jetty.servlet.ServletContextHandler; +import org.eclipse.jetty.util.component.LifeCycle; +import org.eclipse.jetty.util.log.Logger; +import org.eclipse.jetty.util.thread.QueuedThreadPool; +import org.eclipse.jetty.webapp.WebAppContext; +import org.junit.Ignore; /** * diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java index ccaff2876d7..f8577d9f526 100755 --- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java +++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java @@ -242,7 +242,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase { protected static String getClassName() { return getTestClass().getName(); - } + } protected static String getSimpleClassName() { return getTestClass().getSimpleName();