You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2015/04/26 17:22:14 UTC

svn commit: r1676114 [1/2] - in /lucene/dev/branches/branch_5x: ./ dev-tools/ dev-tools/maven/lucene/replicator/ dev-tools/maven/solr/ dev-tools/scripts/ lucene/ lucene/licenses/ lucene/replicator/ lucene/replicator/src/test/org/apache/lucene/replicato...

Author: shalin
Date: Sun Apr 26 15:22:12 2015
New Revision: 1676114

URL: http://svn.apache.org/r1676114
Log:
SOLR-4839: Upgrade Jetty to 9.2.10.v20150310 and restlet-jee to 2.3.0. Also fixes SOLR-7449. Merges commits r1649552,1649571,1649584,1649689,1650169,1657495,1675261,1675337,1675619,1676102,1676113 from trunk.

Added:
    lucene/dev/branches/branch_5x/lucene/licenses/javax.servlet-api-3.1.0.jar.sha1   (with props)
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-continuation-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/lucene/licenses/jetty-continuation-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-http-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/lucene/licenses/jetty-http-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-io-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/lucene/licenses/jetty-io-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-server-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/lucene/licenses/jetty-server-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-servlet-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/lucene/licenses/jetty-servlet-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-util-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/lucene/licenses/jetty-util-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/javax.servlet-api-3.1.0.jar.sha1
      - copied unchanged from r1649552, lucene/dev/trunk/solr/licenses/javax.servlet-api-3.1.0.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-continuation-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-continuation-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-deploy-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-deploy-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-http-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-http-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-io-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-io-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-jmx-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-jmx-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-rewrite-9.2.10.v20150310.jar.sha1   (with props)
    lucene/dev/branches/branch_5x/solr/licenses/jetty-security-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-security-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-server-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-server-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-servlet-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-servlet-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-servlets-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-servlets-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-util-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-util-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-webapp-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-webapp-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-xml-9.2.10.v20150310.jar.sha1
      - copied unchanged from r1675261, lucene/dev/trunk/solr/licenses/jetty-xml-9.2.10.v20150310.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/org.restlet-2.3.0.jar.sha1
      - copied unchanged from r1649552, lucene/dev/trunk/solr/licenses/org.restlet-2.3.0.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/org.restlet.ext.servlet-2.3.0.jar.sha1
      - copied unchanged from r1649552, lucene/dev/trunk/solr/licenses/org.restlet.ext.servlet-2.3.0.jar.sha1
    lucene/dev/branches/branch_5x/solr/server/etc/jetty-http.xml
      - copied, changed from r1649552, lucene/dev/trunk/solr/server/etc/jetty-http.xml
    lucene/dev/branches/branch_5x/solr/server/etc/jetty-https.xml
      - copied, changed from r1649552, lucene/dev/trunk/solr/server/etc/jetty-https.xml
    lucene/dev/branches/branch_5x/solr/server/etc/jetty-ssl.xml
      - copied, changed from r1649552, lucene/dev/trunk/solr/server/etc/jetty-ssl.xml
    lucene/dev/branches/branch_5x/solr/server/modules/
      - copied from r1649552, lucene/dev/trunk/solr/server/modules/
    lucene/dev/branches/branch_5x/solr/server/resources/jetty-logging.properties
      - copied, changed from r1649552, lucene/dev/trunk/solr/server/resources/jetty-logging.properties
Removed:
    lucene/dev/branches/branch_5x/lucene/licenses/javax.servlet-api-3.0.1.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-continuation-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-http-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-io-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-server-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-servlet-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/lucene/licenses/jetty-util-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/javax.servlet-api-3.0.1.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-continuation-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-deploy-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-http-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-io-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-jmx-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-rewrite-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-security-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-server-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-servlet-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-util-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-webapp-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/jetty-xml-8.1.10.v20130312.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/org.restlet-2.1.1.jar.sha1
    lucene/dev/branches/branch_5x/solr/licenses/org.restlet.ext.servlet-2.1.1.jar.sha1
    lucene/dev/branches/branch_5x/solr/server/start.ini
Modified:
    lucene/dev/branches/branch_5x/   (props changed)
    lucene/dev/branches/branch_5x/dev-tools/   (props changed)
    lucene/dev/branches/branch_5x/dev-tools/maven/lucene/replicator/pom.xml.template
    lucene/dev/branches/branch_5x/dev-tools/maven/solr/pom.xml.template
    lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py
    lucene/dev/branches/branch_5x/lucene/   (props changed)
    lucene/dev/branches/branch_5x/lucene/common-build.xml   (contents, props changed)
    lucene/dev/branches/branch_5x/lucene/ivy-versions.properties   (contents, props changed)
    lucene/dev/branches/branch_5x/lucene/licenses/   (props changed)
    lucene/dev/branches/branch_5x/lucene/replicator/   (props changed)
    lucene/dev/branches/branch_5x/lucene/replicator/ivy.xml
    lucene/dev/branches/branch_5x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
    lucene/dev/branches/branch_5x/solr/   (props changed)
    lucene/dev/branches/branch_5x/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/branch_5x/solr/bin/   (props changed)
    lucene/dev/branches/branch_5x/solr/bin/solr
    lucene/dev/branches/branch_5x/solr/bin/solr.cmd
    lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd
    lucene/dev/branches/branch_5x/solr/bin/solr.in.sh
    lucene/dev/branches/branch_5x/solr/core/   (props changed)
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
    lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
    lucene/dev/branches/branch_5x/solr/licenses/   (props changed)
    lucene/dev/branches/branch_5x/solr/licenses/start.jar.sha1
    lucene/dev/branches/branch_5x/solr/server/   (props changed)
    lucene/dev/branches/branch_5x/solr/server/build.xml
    lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml
    lucene/dev/branches/branch_5x/solr/server/etc/jetty.xml
    lucene/dev/branches/branch_5x/solr/server/ivy.xml
    lucene/dev/branches/branch_5x/solr/server/modules/http.mod
    lucene/dev/branches/branch_5x/solr/server/modules/https.mod
    lucene/dev/branches/branch_5x/solr/server/modules/server.mod
    lucene/dev/branches/branch_5x/solr/server/modules/ssl.mod
    lucene/dev/branches/branch_5x/solr/solrj/   (props changed)
    lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/StartSolrJetty.java
    lucene/dev/branches/branch_5x/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/JettyWebappTest.java

Modified: lucene/dev/branches/branch_5x/dev-tools/maven/lucene/replicator/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/dev-tools/maven/lucene/replicator/pom.xml.template?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/dev-tools/maven/lucene/replicator/pom.xml.template (original)
+++ lucene/dev/branches/branch_5x/dev-tools/maven/lucene/replicator/pom.xml.template Sun Apr 26 15:22:12 2015
@@ -68,11 +68,6 @@
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
         <artifactId>maven-surefire-plugin</artifactId>
-        <configuration>
-          <systemPropertyVariables>
-            <tests.jettyConnector>${tests.jettyConnector}</tests.jettyConnector>
-          </systemPropertyVariables>
-        </configuration>
       </plugin>
     </plugins>
   </build>

Modified: lucene/dev/branches/branch_5x/dev-tools/maven/solr/pom.xml.template
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/dev-tools/maven/solr/pom.xml.template?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/dev-tools/maven/solr/pom.xml.template (original)
+++ lucene/dev/branches/branch_5x/dev-tools/maven/solr/pom.xml.template Sun Apr 26 15:22:12 2015
@@ -103,7 +103,6 @@
           <artifactId>maven-surefire-plugin</artifactId>
           <configuration>
             <systemPropertyVariables>
-              <tests.jettyConnector>${tests.jettyConnector}</tests.jettyConnector>
               <tests.disableHdfs>${tests.disableHdfs}</tests.disableHdfs>
             </systemPropertyVariables>
           </configuration>

Modified: lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py (original)
+++ lucene/dev/branches/branch_5x/dev-tools/scripts/smokeTestRelease.py Sun Apr 26 15:22:12 2015
@@ -59,7 +59,7 @@ def unshortenURL(url):
     response = h.getresponse()
     if int(response.status/100) == 3 and response.getheader('Location'):
       return response.getheader('Location')
-  return url  
+  return url
 
 # TODO
 #   + verify KEYS contains key that signed the release
@@ -100,7 +100,7 @@ def getHREFs(urlString):
     print('\nFAILED to open url %s' % urlString)
     traceback.print_exc()
     raise
-  
+
   for subUrl, text in reHREF.findall(html):
     fullURL = urllib.parse.urljoin(urlString, subUrl)
     links.append((text, fullURL))
@@ -125,7 +125,7 @@ def download(name, urlString, tmpDir, qu
     t = time.time()-startTime
     sizeMB = os.path.getsize(fileName)/1024./1024.
     print('    %.1f MB in %.2f sec (%.1f MB/sec)' % (sizeMB, t, sizeMB/t))
-  
+
 def attemptDownload(urlString, fileName):
   fIn = urllib.request.urlopen(urlString)
   fOut = open(fileName, 'wb')
@@ -177,19 +177,19 @@ def checkJARMetaData(desc, jarFile, svnR
           raise RuntimeError('%s is missing %s' % (desc, name))
       except KeyError:
         raise RuntimeError('%s is missing %s' % (desc, name))
-      
+
     s = decodeUTF8(z.read(MANIFEST_FILE_NAME))
-    
+
     for verify in (
-      'Specification-Vendor: The Apache Software Foundation',
-      'Implementation-Vendor: The Apache Software Foundation',
+            'Specification-Vendor: The Apache Software Foundation',
+            'Implementation-Vendor: The Apache Software Foundation',
       # Make sure 1.7 compiler was used to build release bits:
       'X-Compile-Source-JDK: 1.7',
-      # Make sure 1.8 ant was used to build release bits: (this will match 1.8+)
-      'Ant-Version: Apache Ant 1.8',
+            # Make sure 1.8 ant was used to build release bits: (this will match 1.8+)
+            'Ant-Version: Apache Ant 1.8',
       # Make sure .class files are 1.7 format:
       'X-Compile-Target-JDK: 1.7',
-      'Specification-Version: %s' % version,
+            'Specification-Version: %s' % version,
       # Make sure the release was compiled with 1.7:
       'Created-By: 1.7'):
       if s.find(verify) == -1:
@@ -213,7 +213,7 @@ def checkJARMetaData(desc, jarFile, svnR
       desc2 = desc
 
     justFileName = os.path.split(desc2)[1]
-    
+
     if justFileName.lower().find('solr') != -1:
       if SOLR_LICENSE is None:
         raise RuntimeError('BUG in smokeTestRelease!')
@@ -239,7 +239,7 @@ def checkJARMetaData(desc, jarFile, svnR
 
 def normSlashes(path):
   return path.replace(os.sep, '/')
-    
+
 def checkAllJARs(topDir, project, svnRevision, version, tmpDir, baseURL):
   print('    verify JAR metadata/identity/no javax.* or java.* classes...')
   if project == 'solr':
@@ -250,12 +250,14 @@ def checkAllJARs(topDir, project, svnRev
 
     normRoot = normSlashes(root)
 
+    if project == 'solr' and normRoot.endswith('/server/lib'):
+      # Solr's example intentionally ships servlet JAR:
+      continue
+
     for file in files:
       if file.lower().endswith('.jar'):
         if project == 'solr':
-          if (normRoot.endswith('/contrib/dataimporthandler-extras/lib') and (file.startswith('javax.mail-') or file.startswith('activation-'))) \
-              or (normRoot.endswith('/test-framework/lib') and file.startswith('jersey-')) \
-              or (normRoot.endswith('/server/lib/ext') and file.startswith('javax.servlet')):
+          if (normRoot.endswith('/contrib/dataimporthandler-extras/lib') and (file.startswith('javax.mail-') or file.startswith('activation-'))) or (normRoot.endswith('/test-framework/lib') and file.startswith('jersey-')):
             print('      **WARNING**: skipping check of %s/%s: it has javax.* classes' % (root, file))
             continue
         else:
@@ -301,19 +303,19 @@ def checkSolrWAR(warFileName, svnRevisio
                            io.BytesIO(jarInsideWarContents),
                            svnRevision,
                            version)
-        if name.lower().find('lucene') != -1:              
+        if name.lower().find('lucene') != -1:
           jarInsideWarFilename = os.path.basename(name)
           if jarInsideWarFilename not in distFilenames:
             raise RuntimeError('Artifact %s in %s is not present in Lucene binary distribution'
-                              % (name, warFileName))
+                               % (name, warFileName))
           distJarName = distFilenames[jarInsideWarFilename]
           with open(distJarName, "rb", buffering=0) as distJarFile:
             distJarContents = distJarFile.readall()
           if jarInsideWarContents != distJarContents:
             raise RuntimeError('Artifact %s in %s is not identical to %s in Lucene binary distribution'
-                              % (name, warFileName, distJarName))
-          
-        
+                               % (name, warFileName, distJarName))
+
+
 def checkSigs(project, urlString, version, tmpDir, isSigned):
 
   print('  test basics...')
@@ -326,7 +328,7 @@ def checkSigs(project, urlString, versio
   if isSigned:
     expectedSigs.append('asc')
   expectedSigs.extend(['md5', 'sha1'])
-  
+
   artifacts = []
   for text, subURL in ents:
     if text == 'KEYS':
@@ -374,7 +376,7 @@ def checkSigs(project, urlString, versio
   actual = [x[0] for x in artifacts]
   if expected != actual:
     raise RuntimeError('%s: wrong artifacts: expected %s but got %s' % (project, expected, actual))
-                
+
   if keysURL is None:
     raise RuntimeError('%s is missing KEYS' % project)
 
@@ -416,7 +418,7 @@ def checkSigs(project, urlString, versio
       f = open(logFile, encoding='UTF-8')
       for line in f.readlines():
         if line.lower().find('warning') != -1 \
-        and line.find('WARNING: This key is not certified with a trusted signature') == -1:
+                and line.find('WARNING: This key is not certified with a trusted signature') == -1:
           print('      GPG: %s' % line.strip())
       f.close()
 
@@ -472,7 +474,7 @@ def checkChangesContent(s, version, name
   m = r.search(s)
   if m is not None:
     raise RuntimeError('incorrect issue (_ instead of -) in %s: %s' % (name, m.group(1)))
-    
+
   if s.lower().find('not yet released') != -1:
     raise RuntimeError('saw "not yet released" in %s' % name)
 
@@ -481,7 +483,7 @@ def checkChangesContent(s, version, name
       sub = 'Lucene %s' % version
     else:
       sub = version
-      
+
     if s.find(sub) == -1:
       # benchmark never seems to include release info:
       if name.find('/benchmark/') == -1:
@@ -549,17 +551,17 @@ def run(command, logFile):
     print('\ncommand "%s" failed:' % command)
     printFileContents(logFile)
     raise RuntimeError('command "%s" failed; see log file %s' % (command, logPath))
-    
+
 def verifyDigests(artifact, urlString, tmpDir):
   print('    verify md5/sha1 digests')
   md5Expected, t = load(urlString + '.md5').strip().split()
   if t != '*'+artifact:
     raise RuntimeError('MD5 %s.md5 lists artifact %s but expected *%s' % (urlString, t, artifact))
-  
+
   sha1Expected, t = load(urlString + '.sha1').strip().split()
   if t != '*'+artifact:
     raise RuntimeError('SHA1 %s.sha1 lists artifact %s but expected *%s' % (urlString, t, artifact))
-  
+
   m = hashlib.md5()
   s = hashlib.sha1()
   f = open('%s/%s' % (tmpDir, artifact), 'rb')
@@ -638,7 +640,7 @@ def verifyUnpacked(java, project, artifa
 
   os.chdir(unpackPath)
   isSrc = artifact.find('-src') != -1
-  
+
   l = os.listdir(unpackPath)
   textFiles = ['LICENSE', 'NOTICE', 'README']
   if project == 'lucene':
@@ -724,14 +726,14 @@ def verifyUnpacked(java, project, artifa
       checkJavadocpathFull('%s/build/docs' % unpackPath)
 
       if java.run_java8:
-        print("    run tests w/ Java 8 and testArgs='%s'..." % testArgs)
-        java.run_java8('ant clean test %s' % testArgs, '%s/test.log' % unpackPath)
-        java.run_java8('ant jar', '%s/compile.log' % unpackPath)
-        testDemo(java.run_java8, isSrc, version, '1.8')
-
-        print('    generate javadocs w/ Java 8...')
-        java.run_java8('ant javadocs', '%s/javadocs.log' % unpackPath)
-        checkJavadocpathFull('%s/build/docs' % unpackPath)
+      print("    run tests w/ Java 8 and testArgs='%s'..." % testArgs)
+      java.run_java8('ant clean test %s' % testArgs, '%s/test.log' % unpackPath)
+      java.run_java8('ant jar', '%s/compile.log' % unpackPath)
+      testDemo(java.run_java8, isSrc, version, '1.8')
+
+      print('    generate javadocs w/ Java 8...')
+      java.run_java8('ant javadocs', '%s/javadocs.log' % unpackPath)
+      checkJavadocpathFull('%s/build/docs' % unpackPath)
 
     else:
       os.chdir('solr')
@@ -749,16 +751,16 @@ def verifyUnpacked(java, project, artifa
       testSolrExample(unpackPath, java.java7_home, True)
 
       if java.run_java8:
-        print("    run tests w/ Java 8 and testArgs='%s'..." % testArgs)
-        java.run_java8('ant clean test -Dtests.slow=false %s' % testArgs, '%s/test.log' % unpackPath)
+      print("    run tests w/ Java 8 and testArgs='%s'..." % testArgs)
+      java.run_java8('ant clean test -Dtests.slow=false %s' % testArgs, '%s/test.log' % unpackPath)
+
+      print('    generate javadocs w/ Java 8...')
+      java.run_java8('ant clean javadocs', '%s/javadocs.log' % unpackPath)
+      checkJavadocpathFull('%s/solr/build/docs' % unpackPath, False)
 
-        print('    generate javadocs w/ Java 8...')
-        java.run_java8('ant clean javadocs', '%s/javadocs.log' % unpackPath)
-        checkJavadocpathFull('%s/solr/build/docs' % unpackPath, False)
-
-        print('    test solr example w/ Java 8...')
-        java.run_java8('ant clean example', '%s/antexample.log' % unpackPath)
-        testSolrExample(unpackPath, java.java8_home, True)
+      print('    test solr example w/ Java 8...')
+      java.run_java8('ant clean example', '%s/antexample.log' % unpackPath)
+      testSolrExample(unpackPath, java.java8_home, True)
 
       os.chdir('..')
       print('    check NOTICE')
@@ -771,7 +773,7 @@ def verifyUnpacked(java, project, artifa
     if project == 'lucene':
       testDemo(java.run_java7, isSrc, version, '1.7')
       if java.run_java8:
-        testDemo(java.run_java8, isSrc, version, '1.8')
+      testDemo(java.run_java8, isSrc, version, '1.8')
 
       print('    check Lucene\'s javadoc JAR')
       checkJavadocpath('%s/docs' % unpackPath)
@@ -789,14 +791,14 @@ def verifyUnpacked(java, project, artifa
       testSolrExample(java7UnpackPath, java.java7_home, False)
 
       if java.run_java8:
-        print('    copying unpacked distribution for Java 8 ...')
-        java8UnpackPath = '%s-java8' % unpackPath
-        if os.path.exists(java8UnpackPath):
-          shutil.rmtree(java8UnpackPath)
-        shutil.copytree(unpackPath, java8UnpackPath)
-        os.chdir(java8UnpackPath)
-        print('    test solr example w/ Java 8...')
-        testSolrExample(java8UnpackPath, java.java8_home, False)
+      print('    copying unpacked distribution for Java 8 ...')
+      java8UnpackPath = '%s-java8' % unpackPath
+      if os.path.exists(java8UnpackPath):
+        shutil.rmtree(java8UnpackPath)
+      shutil.copytree(unpackPath, java8UnpackPath)
+      os.chdir(java8UnpackPath)
+      print('    test solr example w/ Java 8...')
+      testSolrExample(java8UnpackPath, java.java8_home, False)
 
       os.chdir(unpackPath)
 
@@ -805,7 +807,7 @@ def verifyUnpacked(java, project, artifa
   if project == 'lucene' and isSrc:
     print('  confirm all releases have coverage in TestBackwardsCompatibility')
     confirmAllReleasesAreTestedForBackCompat(unpackPath)
-    
+
 
 def testNotice(unpackPath):
   solrNotice = open('%s/NOTICE.txt' % unpackPath, encoding='UTF-8').read()
@@ -818,10 +820,10 @@ def testNotice(unpackPath):
 
 """ + luceneNotice + """---
 """
-  
+
   if solrNotice.find(expected) == -1:
     raise RuntimeError('Solr\'s NOTICE.txt does not have the verbatim copy, plus header/footer, of Lucene\'s NOTICE.txt')
-  
+
 def readSolrOutput(p, startupEvent, failureEvent, logFile):
   f = open(logFile, 'wb')
   try:
@@ -837,7 +839,7 @@ def readSolrOutput(p, startupEvent, fail
       f.flush()
       #print('SOLR: %s' % line.strip())
       if not startupEvent.isSet():
-        if line.find(b'Started SocketConnector@0.0.0.0:8983') != -1:
+        if line.find(b'Started ServerConnector@') != -1 and line.find(b'{HTTP/1.1}{0.0.0.0:8983}') != -1:
           startupEvent.set()
         elif p.poll() is not None:
           failureEvent.set()
@@ -851,7 +853,7 @@ def readSolrOutput(p, startupEvent, fail
     startupEvent.set()
   finally:
     f.close()
-    
+
 def testSolrExample(unpackPath, javaPath, isSrc):
   logFile = '%s/solr-example.log' % unpackPath
   if isSrc:
@@ -868,9 +870,9 @@ def testSolrExample(unpackPath, javaPath
 
   # Stop Solr running on port 8983 (in case a previous run didn't shutdown cleanly)
   try:
-      subprocess.call(['bin/solr','stop','-p','8983'])
+    subprocess.call(['bin/solr','stop','-p','8983'])
   except:
-      print('      Stop failed due to: '+sys.exc_info()[0])
+    print('      Stop failed due to: '+sys.exc_info()[0])
 
   print('      starting Solr on port 8983 from %s' % unpackPath)
   server = subprocess.Popen(['bin/solr', '-f', '-p', '8983'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, stdin=subprocess.PIPE, env=env)
@@ -937,7 +939,7 @@ def testSolrExample(unpackPath, javaPath
     os.chdir(unpackPath+'/solr')
   else:
     os.chdir(unpackPath)
-    
+
 # the weaker check: we can use this on java6 for some checks,
 # but its generated HTML is hopelessly broken so we cannot run
 # the link checking that checkJavadocpathFull does.
@@ -946,7 +948,7 @@ def checkJavadocpath(path, failOnMissing
   # we fail here if its screwed up
   if failOnMissing and checkJavaDocs.checkPackageSummaries(path, 'package'):
     raise RuntimeError('missing javadocs package summaries!')
-    
+
   # now check for level='class'
   if checkJavaDocs.checkPackageSummaries(path):
     # disabled: RM cannot fix all this, see LUCENE-3887
@@ -997,7 +999,7 @@ def testDemo(run_java, isSrc, version, j
 
 def removeTrailingZeros(version):
   return re.sub(r'(\.0)*$', '', version)
-  
+
 def checkMaven(baseURL, tmpDir, svnRevision, version, isSigned):
   # Locate the release branch in subversion
   m = re.match('(\d+)\.(\d+)', version) # Get Major.minor version components
@@ -1040,7 +1042,7 @@ def getBinaryDistFilesForMavenChecks(tmp
   for project in ('lucene', 'solr'):
     distFiles[project] = getBinaryDistFiles(project, tmpDir, version, baseURL)
   return distFiles
-    
+
 def getBinaryDistFiles(project, tmpDir, version, baseURL):
   distribution = '%s-%s.tgz' % (project, version)
   if not os.path.exists('%s/%s' % (tmpDir, distribution)):
@@ -1094,12 +1096,12 @@ def checkIdenticalMavenArtifacts(distFil
         artifactFilename = os.path.basename(artifact)
         if artifactFilename not in distFilenames:
           raise RuntimeError('Maven artifact %s is not present in %s binary distribution'
-                            % (artifact, project))
+                             % (artifact, project))
         else:
           identical = filecmp.cmp(artifact, distFilenames[artifactFilename], shallow=False)
           if not identical:
             raise RuntimeError('Maven artifact %s is not identical to %s in %s binary distribution'
-                              % (artifact, distFilenames[artifactFilename], project))
+                               % (artifact, distFilenames[artifactFilename], project))
 
 def verifyMavenDigests(artifacts):
   print("    verify Maven artifacts' md5/sha1 digests...")
@@ -1176,8 +1178,8 @@ def verifyMavenSigs(baseURL, tmpDir, art
       f = open(logFile, encoding='UTF-8')
       for line in f.readlines():
         if line.lower().find('warning') != -1 \
-           and line.find('WARNING: This key is not certified with a trusted signature') == -1 \
-           and line.find('WARNING: using insecure memory') == -1:
+                and line.find('WARNING: This key is not certified with a trusted signature') == -1 \
+                and line.find('WARNING: using insecure memory') == -1:
           print('      GPG: %s' % line.strip())
       f.close()
 
@@ -1190,8 +1192,8 @@ def verifyMavenSigs(baseURL, tmpDir, art
       f = open(logFile, encoding='UTF-8')
       for line in f.readlines():
         if line.lower().find('warning') != -1 \
-           and line.find('WARNING: This key is not certified with a trusted signature') == -1 \
-           and line.find('WARNING: using insecure memory') == -1:
+                and line.find('WARNING: This key is not certified with a trusted signature') == -1 \
+                and line.find('WARNING: using insecure memory') == -1:
           print('      GPG: %s' % line.strip())
       f.close()
 
@@ -1218,10 +1220,10 @@ def verifyDeployedPOMsCoordinates(artifa
       treeRoot = ET.parse(POM).getroot()
       groupId, artifactId, packaging, POMversion = getPOMcoordinate(treeRoot)
       POMpath = '%s/%s/%s/%s-%s.pom' \
-              % (groupId.replace('.', '/'), artifactId, version, artifactId, version)
+                % (groupId.replace('.', '/'), artifactId, version, artifactId, version)
       if not POM.endswith(POMpath):
         raise RuntimeError("Mismatch between POM coordinate %s:%s:%s and filepath: %s"
-                          % (groupId, artifactId, POMversion, POM))
+                           % (groupId, artifactId, POMversion, POM))
       # Verify that the corresponding artifact exists
       artifact = POM[:-3] + packaging
       if artifact not in artifacts[project]:
@@ -1245,8 +1247,8 @@ def verifyArtifactPerPOMtemplate(POMtemp
         groupId, artifactId, packaging, POMversion = getPOMcoordinate(treeRoot)
         # Ignore POMversion, since its value will not have been interpolated
         artifact = '%s/maven/%s/%s/%s/%s-%s.%s' \
-                 % (tmpDir, groupId.replace('.', '/'), artifactId,
-                    version, artifactId, version, packaging)
+                   % (tmpDir, groupId.replace('.', '/'), artifactId,
+                      version, artifactId, version, packaging)
         if artifact not in artifacts['lucene'] and artifact not in artifacts['solr']:
           raise RuntimeError('Missing artifact %s' % artifact)
 
@@ -1304,7 +1306,7 @@ def make_java_config(parser, java8_home)
     s = subprocess.check_output('%s; java -version' % cmd_prefix,
                                 shell=True, stderr=subprocess.STDOUT).decode('utf-8')
     if s.find(' version "%s.' % version) == -1:
-      parser.error('got wrong version for java %s:\n%s' % (version, s)) 
+      parser.error('got wrong version for java %s:\n%s' % (version, s))
     def run_java(cmd, logfile):
       run('%s; %s' % (cmd_prefix, cmd), logfile)
     return run_java
@@ -1314,7 +1316,7 @@ def make_java_config(parser, java8_home)
   run_java7 = _make_runner(java7_home, '1.7')
   run_java8 = None
   if java8_home is not None:
-    run_java8 = _make_runner(java8_home, '1.8')
+  run_java8 = _make_runner(java8_home, '1.8')
 
   jc = namedtuple('JavaConfig', 'run_java7 java7_home run_java8 java8_home')
   return jc(run_java7, java7_home, run_java8, java8_home)
@@ -1358,7 +1360,7 @@ def parse_config():
     if revision_match is None:
       parser.error('Could not find revision in URL')
     c.revision = revision_match.group(1)
-  
+
   c.java = make_java_config(parser, c.test_java8)
 
   if c.tmp_dir:
@@ -1437,7 +1439,7 @@ def confirmAllReleasesAreTestedForBackCo
         tup = 4, 0, 0, 1
       else:
         raise RuntimeError('could not parse version %s' % name)
-          
+
       testedIndices.add(tup)
 
   l = list(testedIndices)
@@ -1476,18 +1478,18 @@ def main():
   c = parse_config()
   print('NOTE: output encoding is %s' % sys.stdout.encoding)
   smokeTest(c.java, c.url, c.revision, c.version, c.tmp_dir, c.is_signed, ' '.join(c.test_args))
-  
+
 def smokeTest(java, baseURL, svnRevision, version, tmpDir, isSigned, testArgs):
 
   startTime = datetime.datetime.now()
-  
+
   if FORCE_CLEAN:
     if os.path.exists(tmpDir):
       raise RuntimeError('temp dir %s exists; please remove first' % tmpDir)
 
   if not os.path.exists(tmpDir):
     os.makedirs(tmpDir)
-  
+
   lucenePath = None
   solrPath = None
   print()
@@ -1496,7 +1498,7 @@ def smokeTest(java, baseURL, svnRevision
   if newBaseURL != baseURL:
     print('  unshortened: %s' % newBaseURL)
     baseURL = newBaseURL
-    
+
   for text, subURL in getDirEntries(baseURL):
     if text.lower().find('lucene') != -1:
       lucenePath = subURL

Modified: lucene/dev/branches/branch_5x/lucene/common-build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/common-build.xml?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/common-build.xml (original)
+++ lucene/dev/branches/branch_5x/lucene/common-build.xml Sun Apr 26 15:22:12 2015
@@ -1073,7 +1073,6 @@
                 <propertyref prefix="tests.badapples" />
                 <propertyref prefix="tests.bwcdir" />
                 <propertyref prefix="tests.timeoutSuite" />
-                <propertyref prefix="tests.jettyConnector" />
                 <propertyref prefix="tests.disableHdfs" />
                 <propertyref prefix="tests.filter" />
                 <propertyref prefix="tests.leavetmpdir" />

Modified: lucene/dev/branches/branch_5x/lucene/ivy-versions.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/ivy-versions.properties?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/ivy-versions.properties (original)
+++ lucene/dev/branches/branch_5x/lucene/ivy-versions.properties Sun Apr 26 15:22:12 2015
@@ -71,7 +71,7 @@ com.sun.jersey.version = 1.9
 /jakarta-regexp/jakarta-regexp = 1.4
 /javax.activation/activation = 1.1.1
 /javax.inject/javax.inject= 1
-/javax.servlet/javax.servlet-api = 3.0.1
+/javax.servlet/javax.servlet-api = 3.1.0
 /javax.servlet/servlet-api = 2.4
 /jdom/jdom = 1.0
 /joda-time/joda-time = 2.2
@@ -183,7 +183,7 @@ org.codehaus.jackson.version = 1.9.13
 /org.codehaus.woodstox/woodstox-core-asl = 4.4.1
 /org.easymock/easymock = 3.0
 
-org.eclipse.jetty.version = 8.1.10.v20130312
+org.eclipse.jetty.version = 9.2.10.v20150310
 /org.eclipse.jetty/jetty-continuation = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-deploy = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-http = ${org.eclipse.jetty.version}
@@ -193,6 +193,7 @@ org.eclipse.jetty.version = 8.1.10.v2013
 /org.eclipse.jetty/jetty-security = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-server = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-servlet = ${org.eclipse.jetty.version}
+/org.eclipse.jetty/jetty-servlets = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-start = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-util = ${org.eclipse.jetty.version}
 /org.eclipse.jetty/jetty-webapp = ${org.eclipse.jetty.version}
@@ -228,7 +229,7 @@ org.ow2.asm.version = 4.1
 /org.ow2.asm/asm = ${org.ow2.asm.version}
 /org.ow2.asm/asm-commons = ${org.ow2.asm.version}
 
-org.restlet.jee.version = 2.1.1
+org.restlet.jee.version = 2.3.0
 /org.restlet.jee/org.restlet = ${org.restlet.jee.version}
 /org.restlet.jee/org.restlet.ext.servlet = ${org.restlet.jee.version}
 

Added: lucene/dev/branches/branch_5x/lucene/licenses/javax.servlet-api-3.1.0.jar.sha1
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/licenses/javax.servlet-api-3.1.0.jar.sha1?rev=1676114&view=auto
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/licenses/javax.servlet-api-3.1.0.jar.sha1 (added)
+++ lucene/dev/branches/branch_5x/lucene/licenses/javax.servlet-api-3.1.0.jar.sha1 Sun Apr 26 15:22:12 2015
@@ -0,0 +1 @@
+3cd63d075497751784b2fa84be59432f4905bf7c

Modified: lucene/dev/branches/branch_5x/lucene/replicator/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/replicator/ivy.xml?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/replicator/ivy.xml (original)
+++ lucene/dev/branches/branch_5x/lucene/replicator/ivy.xml Sun Apr 26 15:22:12 2015
@@ -32,6 +32,7 @@
     <dependency org="org.apache.httpcomponents" name="httpcore" rev="${/org.apache.httpcomponents/httpcore}" conf="http"/>
     
     <dependency org="org.eclipse.jetty" name="jetty-server" rev="${/org.eclipse.jetty/jetty-server}" conf="jetty"/>
+    <dependency org="javax.servlet" name="javax.servlet-api" rev="${/javax.servlet/javax.servlet-api}" conf="jetty"/>
     <dependency org="org.eclipse.jetty" name="jetty-servlet" rev="${/org.eclipse.jetty/jetty-servlet}" conf="jetty"/>
     <dependency org="org.eclipse.jetty" name="jetty-util" rev="${/org.eclipse.jetty/jetty-util}" conf="jetty"/>
     <dependency org="org.eclipse.jetty" name="jetty-io" rev="${/org.eclipse.jetty/jetty-io}" conf="jetty"/>
@@ -40,8 +41,6 @@
 
     <dependency org="commons-logging" name="commons-logging" rev="${/commons-logging/commons-logging}" conf="logging"/>
 
-    <dependency org="javax.servlet" name="javax.servlet-api" rev="${/javax.servlet/javax.servlet-api}" conf="jetty"/>
-
     <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
   </dependencies>
 

Modified: lucene/dev/branches/branch_5x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java (original)
+++ lucene/dev/branches/branch_5x/lucene/replicator/src/test/org/apache/lucene/replicator/ReplicatorTestCase.java Sun Apr 26 15:22:12 2015
@@ -24,12 +24,13 @@ import org.apache.http.impl.conn.Pooling
 import org.apache.lucene.util.LuceneTestCase;
 import org.eclipse.jetty.server.Connector;
 import org.eclipse.jetty.server.Handler;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.bio.SocketConnector;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.SslConnectionFactory;
 import org.eclipse.jetty.server.session.HashSessionIdManager;
-import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
-import org.eclipse.jetty.server.ssl.SslSocketConnector;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
 import org.junit.AfterClass;
@@ -51,12 +52,6 @@ public abstract class ReplicatorTestCase
    * {@link #serverPort(Server)}.
    */
   public static synchronized Server newHttpServer(Handler handler) throws Exception {
-    Server server = new Server(0);
-    
-    server.setHandler(handler);
-    
-    final String connectorName = System.getProperty("tests.jettyConnector", "SelectChannel");
-    
     // if this property is true, then jetty will be configured to use SSL
     // leveraging the same system properties as java to specify
     // the keystore/truststore if they are set
@@ -78,7 +73,7 @@ public abstract class ReplicatorTestCase
         (System.getProperty("javax.net.ssl.keyStorePassword"));
       }
       if (null != System.getProperty("javax.net.ssl.trustStore")) {
-        sslcontext.setTrustStore
+        sslcontext.setKeyStorePath
         (System.getProperty("javax.net.ssl.trustStore"));
       }
       if (null != System.getProperty("javax.net.ssl.trustStorePassword")) {
@@ -88,34 +83,36 @@ public abstract class ReplicatorTestCase
       sslcontext.setNeedClientAuth(Boolean.getBoolean("tests.jettySsl.clientAuth"));
     }
     
-    final Connector connector;
-    final QueuedThreadPool threadPool;
-    if ("SelectChannel".equals(connectorName)) {
-      final SelectChannelConnector c = useSsl ? new SslSelectChannelConnector(sslcontext) : new SelectChannelConnector();
-      c.setReuseAddress(true);
-      c.setLowResourcesMaxIdleTime(1500);
-      connector = c;
-      threadPool = (QueuedThreadPool) c.getThreadPool();
-    } else if ("Socket".equals(connectorName)) {
-      final SocketConnector c = useSsl ? new SslSocketConnector(sslcontext) : new SocketConnector();
-      c.setReuseAddress(true);
+    final QueuedThreadPool threadPool = new QueuedThreadPool();
+    threadPool.setDaemon(true);
+    threadPool.setMaxThreads(10000);
+    threadPool.setIdleTimeout(5000);
+    threadPool.setStopTimeout(30000);
+
+    Server server = new Server(threadPool);
+    server.setStopAtShutdown(true);
+    server.manage(threadPool);
+
+
+    final ServerConnector connector;
+    if (useSsl) {
+      HttpConfiguration configuration = new HttpConfiguration();
+      configuration.setSecureScheme("https");
+      configuration.addCustomizer(new SecureRequestCustomizer());
+      ServerConnector c = new ServerConnector(server, new SslConnectionFactory(sslcontext, "http/1.1"),
+          new HttpConnectionFactory(configuration));
       connector = c;
-      threadPool = (QueuedThreadPool) c.getThreadPool();
     } else {
-      throw new IllegalArgumentException("Illegal value for system property 'tests.jettyConnector': " + connectorName);
+      ServerConnector c = new ServerConnector(server, new HttpConnectionFactory());
+      connector = c;
     }
     
     connector.setPort(0);
     connector.setHost("127.0.0.1");
-    if (threadPool != null) {
-      threadPool.setDaemon(true);
-      threadPool.setMaxThreads(10000);
-      threadPool.setMaxIdleTimeMs(5000);
-      threadPool.setMaxStopTimeMs(30000);
-    }
-    
+
     server.setConnectors(new Connector[] {connector});
     server.setSessionIdManager(new HashSessionIdManager(new Random(random().nextLong())));
+    server.setHandler(handler);
     
     server.start();
     
@@ -124,12 +121,12 @@ public abstract class ReplicatorTestCase
   
   /** Returns a {@link Server}'s port. */
   public static int serverPort(Server server) {
-    return server.getConnectors()[0].getLocalPort();
+    return ((ServerConnector)server.getConnectors()[0]).getLocalPort();
   }
   
   /** Returns a {@link Server}'s host. */
   public static String serverHost(Server server) {
-    return server.getConnectors()[0].getHost();
+    return ((ServerConnector)server.getConnectors()[0]).getHost();
   }
   
   /**

Modified: lucene/dev/branches/branch_5x/solr/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/CHANGES.txt?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/CHANGES.txt (original)
+++ lucene/dev/branches/branch_5x/solr/CHANGES.txt Sun Apr 26 15:22:12 2015
@@ -26,6 +26,16 @@ Upgrading from Solr 5.1
 * SOLR-7336: Added Replica.getState() and removed ZkStateReader state-related constants.
   You should use Replica.State to compare a replica's state. (Shai Erera)
 
+* SOLR-4839: The way SSL support is configured has been changed. Before this release,
+  the SOLR_SSL_OPTS property configured in solr.in.sh (linux/mac) or solr.in.cmd (windows)
+  was used to enable/disable SSL but starting in 5.2.0, new properties named as
+  SOLR_SSL_KEY_STORE, SOLR_SSL_KEY_STORE_PASSWORD, SOLR_SSL_TRUST_STORE,
+  SOLR_SSL_TRUST_STORE_PASSWORD, SOLR_SSL_NEED_CLIENT_AUTH and SOLR_SSL_WANT_CLIENT_AUTH
+  have been introduced. Furthermore, it is now possible to configure the HTTP client with
+  different SSL properties than the ones used for Jetty using the same files. It is no longer
+  allowed to configure the SOLR_SSL_OPTS property inside solr.in.sh or solr.in.cmd. Please refer
+  to the "Enabling SSL" page in Solr Reference Guide for complete details.
+
 Detailed Change List
 ----------------------
 
@@ -130,6 +140,9 @@ Bug Fixes
 
 * SOLR-7469: Fix check-licenses to correctly detect if start.jar.sha1 is incorrect (hossman)
 
+* SOLR-7449: solr/server/etc/jetty-https-ssl.xml hard codes the key store file and password rather
+  than pulling them from the sysprops defined in solr/bin/solr.in.{sh,cmd}
+
 Optimizations
 ----------------------
 
@@ -182,6 +195,9 @@ Other Changes
 * SOLR-5213: Log when shard splitting unexpectedly leads to documents going to
   no or multiple shards (Christine Poerschke, Ramkumar Aiyengar)
 
+* SOLR-4839: Upgrade Jetty to 9.2.10.v20150310 and restlet-jee to 2.3.0
+  (Bill Bell, Timothy Potter, Uwe Schindler, Mark Miller, shalin)
+
 ==================  5.1.0 ==================
 
 Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release

Modified: lucene/dev/branches/branch_5x/solr/bin/solr
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr Sun Apr 26 15:22:12 2015
@@ -136,20 +136,34 @@ fi
   exit 1
 }
 
-# URL scheme for contacting Solr
+# Select HTTP OR HTTPS related configurations
 SOLR_URL_SCHEME=http
-if [ -n "$SOLR_SSL_OPTS" ]; then
-  SOLR_URL_SCHEME=https
-fi
-
-# Which Jetty config file to use - leave blank to use the default: etc/jetty.xml
 SOLR_JETTY_CONFIG=()
-if [ -n "$SOLR_SSL_OPTS" ]; then
-  SOLR_JETTY_CONFIG+=("$SOLR_TIP/server/etc/jetty-https-ssl.xml")
+SOLR_SSL_OPTS=""
+if [ -n "$SOLR_SSL_KEY_STORE" ]; then
+  SOLR_JETTY_CONFIG+=("--module=https")
+  SOLR_URL_SCHEME=https
+  SOLR_SSL_OPTS=" -Dsolr.jetty.keystore=$SOLR_SSL_KEY_STORE \
+    -Dsolr.jetty.keystore.password=$SOLR_SSL_KEY_STORE_PASSWORD \
+    -Dsolr.jetty.truststore=$SOLR_SSL_TRUST_STORE \
+    -Dsolr.jetty.truststore.password=$SOLR_SSL_TRUST_STORE_PASSWORD \
+    -Dsolr.jetty.ssl.needClientAuth=$SOLR_SSL_NEED_CLIENT_AUTH \
+    -Dsolr.jetty.ssl.wantClientAuth=$SOLR_SSL_WANT_CLIENT_AUTH"
+  if [ -n "$SOLR_SSL_CLIENT_KEY_STORE" ]; then
+    SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_CLIENT_KEY_STORE \
+      -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_CLIENT_KEY_STORE_PASSWORD \
+      -Djavax.net.ssl.trustStore=$SOLR_SSL_CLIENT_TRUST_STORE \
+      -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD"
+  else
+    SOLR_SSL_OPTS+=" -Djavax.net.ssl.keyStore=$SOLR_SSL_KEY_STORE \
+      -Djavax.net.ssl.keyStorePassword=$SOLR_SSL_KEY_STORE_PASSWORD \
+      -Djavax.net.ssl.trustStore=$SOLR_SSL_TRUST_STORE \
+      -Djavax.net.ssl.trustStorePassword=$SOLR_SSL_TRUST_STORE_PASSWORD"
+  fi
+else
+  SOLR_JETTY_CONFIG+=("--module=http")
 fi
 
-SOLR_JETTY_CONFIG+=('OPTIONS=default,rewrite')
-
 function print_usage() {
   CMD="$1"
   ERROR_MSG="$2"
@@ -449,13 +463,11 @@ function stop_solr() {
   SOLR_PORT="$2"
   STOP_PORT=`expr $SOLR_PORT - 1000`
   STOP_KEY="$3"
-  
-  
   SOLR_PID="$4"
 
   if [ "$SOLR_PID" != "" ]; then
     echo -e "Sending stop command to Solr running on port $SOLR_PORT ... waiting 5 seconds to allow Jetty process $SOLR_PID to stop gracefully."
-    "$JAVA" $SOLR_SSL_OPTS -jar "$DIR/start.jar" "${SOLR_JETTY_CONFIG[@]}" "STOP.PORT=$STOP_PORT" "STOP.KEY=$STOP_KEY" --stop || true
+    "$JAVA" $SOLR_SSL_OPTS -jar "$DIR/start.jar" "STOP.PORT=$STOP_PORT" "STOP.KEY=$STOP_KEY" --stop || true
     (sleep 5) &
     spinner $!
     rm -f "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
@@ -1125,10 +1137,12 @@ fi
 if [[ "$SCRIPT_CMD" == "start" ]]; then
   # see if Solr is already running
   SOLR_PID=`solr_pid_by_port "$SOLR_PORT"`
+
   if [ -z "$SOLR_PID" ]; then
     # not found using the pid file ... but use ps to ensure not found
     SOLR_PID=`ps auxww | grep start\.jar | grep -w $SOLR_PORT | grep -v grep | awk '{print $2}' | sort -r`
   fi
+
   if [ "$SOLR_PID" != "" ]; then
     echo -e "\nPort $SOLR_PORT is already being used by another process (pid: $SOLR_PID)\nPlease choose a different port using the -p option.\n"
     exit 1
@@ -1297,11 +1311,8 @@ function launch_solr() {
 
   # If SSL-related system props are set, add them to SOLR_OPTS
   if [ -n "$SOLR_SSL_OPTS" ]; then
-    # If using SSL and jetty.ssl.port not set explicitly, use the jetty.port
-    SSL_PORT_PROP="-Djetty.ssl.port=$SOLR_PORT"
-    if [ -n "$SOLR_SSL_PORT" ]; then
-      SSL_PORT_PROP="-Djetty.ssl.port=$SOLR_SSL_PORT"
-    fi
+    # If using SSL and solr.jetty.https.port not set explicitly, use the jetty.port
+    SSL_PORT_PROP="-Dsolr.jetty.https.port=$SOLR_PORT"
     SOLR_OPTS+=($SOLR_SSL_OPTS "$SSL_PORT_PROP")
   fi
 
@@ -1349,7 +1360,7 @@ function launch_solr() {
     "${REMOTE_JMX_OPTS[@]}" "${CLOUD_MODE_OPTS[@]}" \
     "-Djetty.port=$SOLR_PORT" "-DSTOP.PORT=$stop_port" "-DSTOP.KEY=$STOP_KEY" \
     "${SOLR_HOST_ARG[@]}" "-Duser.timezone=$SOLR_TIMEZONE" \
-    "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.install.dir=$SOLR_TIP" \
+    "-Djetty.home=$SOLR_SERVER_DIR" "-Dsolr.solr.home=$SOLR_HOME" "-Dsolr.install.dir=$SOLR_TIP" \
     "${LOG4J_CONFIG[@]}" "${SOLR_OPTS[@]}")
 
   if [ "$SOLR_MODE" == "solrcloud" ]; then
@@ -1364,8 +1375,8 @@ function launch_solr() {
   else
     # run Solr in the background
     nohup "$JAVA" "${SOLR_START_OPTS[@]}" $SOLR_ADDL_ARGS -jar start.jar \
-      "-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" "${SOLR_JETTY_CONFIG[@]}" \
-	    1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
+	"-XX:OnOutOfMemoryError=$SOLR_TIP/bin/oom_solr.sh $SOLR_PORT $SOLR_LOGS_DIR" "${SOLR_JETTY_CONFIG[@]}" \
+	1>"$SOLR_LOGS_DIR/solr-$SOLR_PORT-console.log" 2>&1 & echo $! > "$SOLR_PID_DIR/solr-$SOLR_PORT.pid"
 
     # no lsof on cygwin though
     if hash lsof 2>/dev/null ; then  # hash returns true if lsof is on the path

Modified: lucene/dev/branches/branch_5x/solr/bin/solr.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.cmd?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.cmd (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.cmd Sun Apr 26 15:22:12 2015
@@ -36,14 +36,23 @@ REM command line args
 IF "%SOLR_INCLUDE%"=="" set "SOLR_INCLUDE=%SOLR_TIP%\bin\solr.in.cmd"
 IF EXIST "%SOLR_INCLUDE%" CALL "%SOLR_INCLUDE%"
 
-REM URL scheme for contacting Solr
+REM Select HTTP OR HTTPS related configurations
 set SOLR_URL_SCHEME=http
-IF DEFINED SOLR_SSL_OPTS set SOLR_URL_SCHEME=https
-IF NOT DEFINED SOLR_SSL_OPTS set SOLR_SSL_OPTS=
-
-REM Which Jetty config file to use - leave blank to use the default: etc/jetty.xml
-set "SOLR_JETTY_CONFIG=%SOLR_TIP%\server\etc\jetty.xml"
-IF NOT "%SOLR_SSL_OPTS%"=="" set "SOLR_JETTY_CONFIG=%SOLR_TIP%\server\etc\jetty-https-ssl.xml"
+set "SOLR_JETTY_CONFIG=--module=http"
+set "SOLR_SSL_OPTS= "
+IF DEFINED SOLR_SSL_KEY_STORE (
+  set "SOLR_JETTY_CONFIG=--module=https"
+  set SOLR_URL_SCHEME=https
+  set "SCRIPT_ERROR=Solr server directory %SOLR_SERVER_DIR% not found!"
+  set "SOLR_SSL_OPTS=-Dsolr.jetty.keystore=%SOLR_SSL_KEY_STORE% -Dsolr.jetty.keystore.password=%SOLR_SSL_KEY_STORE_PASSWORD% -Dsolr.jetty.truststore=%SOLR_SSL_TRUST_STORE% -Dsolr.jetty.truststore.password=%SOLR_SSL_TRUST_STORE_PASSWORD% -Dsolr.jetty.ssl.needClientAuth=%SOLR_SSL_NEED_CLIENT_AUTH% -Dsolr.jetty.ssl.wantClientAuth=%SOLR_SSL_WANT_CLIENT_AUTH%"
+  IF DEFINED SOLR_SSL_CLIENT_KEY_STORE  (
+    set "SOLR_SSL_OPTS=%SOLR_SSL_OPTS% -Djavax.net.ssl.keyStore=%SOLR_SSL_CLIENT_KEY_STORE% -Djavax.net.ssl.keyStorePassword=%SOLR_SSL_CLIENT_KEY_STORE_PASSWORD% -Djavax.net.ssl.trustStore=%SOLR_SSL_CLIENT_TRUST_STORE% -Djavax.net.ssl.trustStorePassword=%SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD%"
+  ) ELSE (
+    set "SOLR_SSL_OPTS=%SOLR_SSL_OPTS% -Djavax.net.ssl.keyStore=%SOLR_SSL_KEY_STORE% -Djavax.net.ssl.keyStorePassword=%SOLR_SSL_KEY_STORE_PASSWORD% -Djavax.net.ssl.trustStore=%SOLR_SSL_TRUST_STORE% -Djavax.net.ssl.trustStorePassword=%SOLR_SSL_TRUST_STORE_PASSWORD%"
+  )
+) ELSE (
+  set SOLR_SSL_OPTS=
+)
 
 REM Verify Java is available
 IF DEFINED SOLR_JAVA_HOME set "JAVA_HOME=%SOLR_JAVA_HOME%"
@@ -668,7 +677,7 @@ IF "%SCRIPT_CMD%"=="stop" (
                   set found_it=1
                   @echo Stopping Solr process %%k running on port !SOME_SOLR_PORT!
                   set /A STOP_PORT=!SOME_SOLR_PORT! - 1000
-                  "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" "%SOLR_JETTY_CONFIG%" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop
+                  "%JAVA%" %SOLR_SSL_OPTS% -Djetty.home="%SOLR_SERVER_DIR%" -jar "%SOLR_SERVER_DIR%\start.jar" STOP.PORT=!STOP_PORT! STOP.KEY=%STOP_KEY% --stop
                   del "%SOLR_TIP%"\bin\solr-!SOME_SOLR_PORT!.port
                   timeout /T 5
                   REM Kill it if it is still running after the graceful shutdown
@@ -865,8 +874,7 @@ IF NOT "%SOLR_ADDL_ARGS%"=="" set "START
 IF NOT "%SOLR_HOST_ARG%"=="" set "START_OPTS=%START_OPTS% %SOLR_HOST_ARG%"
 IF NOT "%SOLR_OPTS%"=="" set "START_OPTS=%START_OPTS% %SOLR_OPTS%"
 IF NOT "%SOLR_SSL_OPTS%"=="" (
-  set "SSL_PORT_PROP=-Djetty.ssl.port=%SOLR_PORT%"
-  IF DEFINED SOLR_SSL_PORT set "SSL_PORT_PROP=-Djetty.ssl.port=%SOLR_SSL_PORT%"
+  set "SSL_PORT_PROP=-Dsolr.jetty.https.port=%SOLR_PORT%"
   set "START_OPTS=%START_OPTS% %SOLR_SSL_OPTS% !SSL_PORT_PROP!"
 )
 
@@ -890,10 +898,10 @@ IF "%FG%"=="1" (
   title "Solr-%SOLR_PORT%"
   echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port
   "%JAVA%" %SERVEROPT% -Xss256k %SOLR_JAVA_MEM% %START_OPTS% -Xloggc:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^
-    -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" OPTIONS=default,rewrite
+    -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%"
 ) ELSE (
   START /B "Solr-%SOLR_PORT%" /D "%SOLR_SERVER_DIR%" "%JAVA%" %SERVEROPT% -Xss256k %SOLR_JAVA_MEM% %START_OPTS% -Xloggc:"!SOLR_LOGS_DIR!"/solr_gc.log -Dlog4j.configuration="%LOG4J_CONFIG%" -DSTOP.PORT=!STOP_PORT! -DSTOP.KEY=%STOP_KEY% ^
-    -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" OPTIONS=default,rewrite > "!SOLR_LOGS_DIR!\solr-%SOLR_PORT%-console.log"
+    -Djetty.port=%SOLR_PORT% -Dsolr.solr.home="%SOLR_HOME%" -Dsolr.install.dir="%SOLR_TIP%" -Djetty.home="%SOLR_SERVER_DIR%" -Djava.io.tmpdir="%SOLR_SERVER_DIR%\tmp" -jar start.jar "%SOLR_JETTY_CONFIG%" > "!SOLR_LOGS_DIR!\solr-%SOLR_PORT%-console.log"
   echo %SOLR_PORT%>"%SOLR_TIP%"\bin\solr-%SOLR_PORT%.port
 )
 
@@ -1389,4 +1397,4 @@ REM Safe echo which does not mess with (
 set "eout=%1"
 set eout=%eout:"=%
 echo !eout!
-GOTO :eof
+GOTO :eof
\ No newline at end of file

Modified: lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.in.cmd Sun Apr 26 15:22:12 2015
@@ -82,11 +82,16 @@ REM set SOLR_PORT=8983
 
 REM Uncomment to set SSL-related system properties
 REM Be sure to update the paths to the correct keystore for your environment
-REM set SOLR_SSL_OPTS=-Djavax.net.ssl.keyStore=etc\solr-ssl.keystore.jks ^
-REM  -Djavax.net.ssl.keyStorePassword=secret ^
-REM  -Djavax.net.ssl.trustStore=etc\solr-ssl.keystore.jks ^
-REM  -Djavax.net.ssl.trustStorePassword=secret
+REM set SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks
+REM set SOLR_SSL_KEY_STORE_PASSWORD=secret
+REM set SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks
+REM set SOLR_SSL_TRUST_STORE_PASSWORD=secret
+REM set SOLR_SSL_NEED_CLIENT_AUTH=false
+REM set SOLR_SSL_WANT_CLIENT_AUTH=false
 
-REM Uncomment to set a specific SSL port (-Djetty.ssl.port=N); if not set
-REM and you are using SSL, then the start script will use SOLR_PORT for the SSL port
-REM set SOLR_SSL_PORT=
+REM Uncomment if you want to override previously defined SSL values for HTTP client
+REM otherwise keep them commented and the above values will automatically be set for HTTP clients
+REM set SOLR_SSL_CLIENT_KEY_STORE=
+REM set SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
+REM setSOLR_SSL_CLIENT_TRUST_STORE=
+REM setSOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=
\ No newline at end of file

Modified: lucene/dev/branches/branch_5x/solr/bin/solr.in.sh
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/bin/solr.in.sh?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/bin/solr.in.sh (original)
+++ lucene/dev/branches/branch_5x/solr/bin/solr.in.sh Sun Apr 26 15:22:12 2015
@@ -97,11 +97,16 @@ ENABLE_REMOTE_JMX_OPTS="false"
 
 # Uncomment to set SSL-related system properties
 # Be sure to update the paths to the correct keystore for your environment
-#SOLR_SSL_OPTS="-Djavax.net.ssl.keyStore=etc/solr-ssl.keystore.jks \
-#-Djavax.net.ssl.keyStorePassword=secret \
-#-Djavax.net.ssl.trustStore=etc/solr-ssl.keystore.jks \
-#-Djavax.net.ssl.trustStorePassword=secret"
+#SOLR_SSL_KEY_STORE=etc/solr-ssl.keystore.jks
+#SOLR_SSL_KEY_STORE_PASSWORD=secret
+#SOLR_SSL_TRUST_STORE=etc/solr-ssl.keystore.jks
+#SOLR_SSL_TRUST_STORE_PASSWORD=secret
+#SOLR_SSL_NEED_CLIENT_AUTH=false
+#SOLR_SSL_WANT_CLIENT_AUTH=false
 
-# Uncomment to set a specific SSL port (-Djetty.ssl.port=N); if not set
-# and you are using SSL, then the start script will use SOLR_PORT for the SSL port
-#SOLR_SSL_PORT=
+# Uncomment if you want to override previously defined SSL values for HTTP client
+# otherwise keep them commented and the above values will automatically be set for HTTP clients
+#SOLR_SSL_CLIENT_KEY_STORE=
+#SOLR_SSL_CLIENT_KEY_STORE_PASSWORD=
+#SOLR_SSL_CLIENT_TRUST_STORE=
+#SOLR_SSL_CLIENT_TRUST_STORE_PASSWORD=

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/JettySolrRunner.java Sun Apr 26 15:22:12 2015
@@ -19,17 +19,18 @@ package org.apache.solr.client.solrj.emb
 
 import org.apache.solr.servlet.SolrDispatchFilter;
 import org.eclipse.jetty.server.Connector;
+import org.eclipse.jetty.server.HttpConfiguration;
+import org.eclipse.jetty.server.HttpConnectionFactory;
+import org.eclipse.jetty.server.LowResourceMonitor;
+import org.eclipse.jetty.server.SecureRequestCustomizer;
 import org.eclipse.jetty.server.Server;
-import org.eclipse.jetty.server.bio.SocketConnector;
-import org.eclipse.jetty.server.handler.GzipHandler;
-import org.eclipse.jetty.server.nio.SelectChannelConnector;
+import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.SslConnectionFactory;
 import org.eclipse.jetty.server.session.HashSessionIdManager;
-import org.eclipse.jetty.server.ssl.SslConnector;
-import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
-import org.eclipse.jetty.server.ssl.SslSocketConnector;
 import org.eclipse.jetty.servlet.FilterHolder;
 import org.eclipse.jetty.servlet.ServletContextHandler;
 import org.eclipse.jetty.servlet.ServletHolder;
+import org.eclipse.jetty.servlets.GzipFilter;
 import org.eclipse.jetty.util.component.LifeCycle;
 import org.eclipse.jetty.util.ssl.SslContextFactory;
 import org.eclipse.jetty.util.thread.QueuedThreadPool;
@@ -238,17 +239,15 @@ public class JettySolrRunner {
 
   private void init(int port) {
 
-    server = new Server(port);
+    QueuedThreadPool qtp = new QueuedThreadPool();
+    qtp.setMaxThreads(10000);
+    qtp.setIdleTimeout((int) TimeUnit.SECONDS.toMillis(5));
+    qtp.setStopTimeout((int) TimeUnit.MINUTES.toMillis(1));
+    server = new Server(qtp);
+    server.manage(qtp);
     server.setStopAtShutdown(config.stopAtShutdown);
-    if (!config.stopAtShutdown) {
-      server.setGracefulShutdown(0);
-    }
-
-    System.setProperty("solr.solr.home", solrHome);
 
     if (System.getProperty("jetty.testMode") != null) {
-      final String connectorName = System.getProperty("tests.jettyConnector", "SelectChannel");
-
       // if this property is true, then jetty will be configured to use SSL
       // leveraging the same system properties as java to specify
       // the keystore/truststore if they are set unless specific config
@@ -256,56 +255,43 @@ public class JettySolrRunner {
       //
       // This means we will use the same truststore, keystore (and keys) for
       // the server as well as any client actions taken by this JVM in
-      // talking to that server, but for the purposes of testing that should 
+      // talking to that server, but for the purposes of testing that should
       // be good enough
       final SslContextFactory sslcontext = SSLConfig.createContextFactory(config.sslConfig);
 
-      final Connector connector;
-      if ("SelectChannel".equals(connectorName)) {
-        final SelectChannelConnector c = sslcontext != null
-          ? new SslSelectChannelConnector(sslcontext)
-          : new SelectChannelConnector();
-        c.setReuseAddress(true);
-        c.setLowResourcesMaxIdleTime(1500);
-        c.setSoLingerTime(0);
-        connector = c;
-      } else if ("Socket".equals(connectorName)) {
-        final SocketConnector c = sslcontext != null
-          ? new SslSocketConnector(sslcontext)
-          : new SocketConnector();
-        c.setReuseAddress(true);
-        c.setSoLingerTime(0);
-        connector = c;
+      ServerConnector connector;
+      if (sslcontext != null) {
+        HttpConfiguration configuration = new HttpConfiguration();
+        configuration.setSecureScheme("https");
+        configuration.addCustomizer(new SecureRequestCustomizer());
+        connector = new ServerConnector(server, new SslConnectionFactory(sslcontext, "http/1.1"),
+                new HttpConnectionFactory(configuration));
       } else {
-        throw new IllegalArgumentException("Illegal value for system property 'tests.jettyConnector': " + connectorName);
+        connector = new ServerConnector(server, new HttpConnectionFactory());
       }
 
+      connector.setReuseAddress(true);
+      connector.setSoLingerTime(0);
       connector.setPort(port);
       connector.setHost("127.0.0.1");
 
-      // Connectors by default inherit server's thread pool.
-      QueuedThreadPool qtp = new QueuedThreadPool();
-      qtp.setMaxThreads(10000);
-      qtp.setMaxIdleTimeMs((int) TimeUnit.MILLISECONDS.toMillis(200));
-      qtp.setMaxStopTimeMs((int) TimeUnit.MINUTES.toMillis(1));
-      server.setThreadPool(qtp);
+      // Enable Low Resources Management
+      LowResourceMonitor lowResources = new LowResourceMonitor(server);
+      lowResources.setLowResourcesIdleTimeout(1500);
+      lowResources.setMaxConnections(10000);
+      server.addBean(lowResources);
 
       server.setConnectors(new Connector[] {connector});
       server.setSessionIdManager(new HashSessionIdManager(new Random()));
     } else {
-      if (server.getThreadPool() == null) {
-        // Connectors by default inherit server's thread pool.
-        QueuedThreadPool qtp = new QueuedThreadPool();
-        qtp.setMaxThreads(10000);
-        qtp.setMaxIdleTimeMs((int) TimeUnit.SECONDS.toMillis(5));
-        qtp.setMaxStopTimeMs((int) TimeUnit.SECONDS.toMillis(1));
-        server.setThreadPool(qtp);
-      }
+      ServerConnector connector = new ServerConnector(server, new HttpConnectionFactory());
+      connector.setPort(port);
+      server.setConnectors(new Connector[] {connector});
     }
 
     // Initialize the servlets
     final ServletContextHandler root = new ServletContextHandler(server, config.context, ServletContextHandler.SESSIONS);
-    root.setHandler(new GzipHandler());
+    root.addFilter(GzipFilter.class, "*", EnumSet.of(DispatcherType.REQUEST));
     server.addLifeCycleListener(new LifeCycle.Listener() {
 
       @Override
@@ -339,15 +325,16 @@ public class JettySolrRunner {
         extraFilters = new LinkedList<>();
         for (Class<? extends Filter> filterClass : config.extraFilters.keySet()) {
           extraFilters.add(root.addFilter(filterClass, config.extraFilters.get(filterClass),
-              EnumSet.of(DispatcherType.REQUEST)));
+                  EnumSet.of(DispatcherType.REQUEST)));
         }
 
-        dispatchFilter = root.addFilter(SolrDispatchFilter.class, "*", EnumSet.of(DispatcherType.REQUEST) );
         for (ServletHolder servletHolder : config.extraServlets.keySet()) {
           String pathSpec = config.extraServlets.get(servletHolder);
           root.addServlet(servletHolder, pathSpec);
         }
 
+        dispatchFilter = root.addFilter(SolrDispatchFilter.class, "*", EnumSet.of(DispatcherType.REQUEST) );
+
       }
 
       @Override
@@ -458,7 +445,7 @@ public class JettySolrRunner {
     if (0 == conns.length) {
       throw new RuntimeException("Jetty Server has no Connectors");
     }
-    return (proxyPort != -1) ? proxyPort : conns[0].getLocalPort();
+    return (proxyPort != -1) ? proxyPort : ((ServerConnector) conns[0]).getLocalPort();
   }
   
   /**
@@ -493,17 +480,17 @@ public class JettySolrRunner {
       if (0 == conns.length) {
         throw new IllegalStateException("Jetty Server has no Connectors");
       }
-      Connector c = conns[0];
+      ServerConnector c = (ServerConnector) conns[0];
       if (c.getLocalPort() < 0) {
-        throw new IllegalStateException("Jetty Connector is not open: " + 
-                                        c.getLocalPort());
+        throw new IllegalStateException("Jetty Connector is not open: " +
+                c.getLocalPort());
       }
-      protocol = (c instanceof SslConnector) ? "https" : "http";
+      protocol = c.getDefaultProtocol().equals("SSL-http/1.1")  ? "https" : "http";
       return new URL(protocol, c.getHost(), c.getLocalPort(), config.context);
 
     } catch (MalformedURLException e) {
       throw new  IllegalStateException
-        ("Java could not make sense of protocol: " + protocol, e);
+              ("Java could not make sense of protocol: " + protocol, e);
     }
   }
 

Modified: lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/java/org/apache/solr/client/solrj/embedded/SSLConfig.java Sun Apr 26 15:22:12 2015
@@ -87,7 +87,7 @@ public class SSLConfig {
     if (sslConfig.getKeyStorePassword() != null)
       factory.setKeyStorePassword(sslConfig.getKeyStorePassword());
     if (sslConfig.getTrustStore() != null)
-      factory.setTrustStore(System.getProperty(sslConfig.getTrustStore()));
+      factory.setTrustStorePath(System.getProperty(sslConfig.getTrustStore()));
     if (sslConfig.getTrustStorePassword() != null)
       factory.setTrustStorePassword(sslConfig.getTrustStorePassword());
 
@@ -108,7 +108,7 @@ public class SSLConfig {
           (System.getProperty("javax.net.ssl.keyStorePassword"));
     }
     if (null != System.getProperty("javax.net.ssl.trustStore")) {
-      sslcontext.setTrustStore
+      sslcontext.setTrustStorePath
           (System.getProperty("javax.net.ssl.trustStore"));
     }
     if (null != System.getProperty("javax.net.ssl.trustStorePassword")) {

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/servlet/SolrRequestParserTest.java Sun Apr 26 15:22:12 2015
@@ -36,6 +36,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.Vector;
 
+import javax.servlet.ReadListener;
 import javax.servlet.ServletInputStream;
 import javax.servlet.http.HttpServletRequest;
 
@@ -225,10 +226,7 @@ public class SolrRequestParserTest exten
       HttpServletRequest request = getMock("/solr/select", contentType, postBytes.length);
       expect(request.getMethod()).andReturn("POST").anyTimes();
       expect(request.getQueryString()).andReturn(getParams).anyTimes();
-      expect(request.getInputStream()).andReturn(new ServletInputStream() {
-        private final ByteArrayInputStream in = new ByteArrayInputStream(postBytes);
-        @Override public int read() { return in.read(); }
-      });
+      expect(request.getInputStream()).andReturn(new ByteServletInputStream(postBytes));
       replay(request);
       
       MultipartRequestParser multipart = new MultipartRequestParser( 2048 );
@@ -256,6 +254,21 @@ public class SolrRequestParserTest exten
     }
 
     @Override
+    public boolean isFinished() {
+      return readCount == len;
+    }
+
+    @Override
+    public boolean isReady() {
+      return true;
+    }
+
+    @Override
+    public void setReadListener(ReadListener readListener) {
+      throw new IllegalStateException("Not supported");
+    }
+
+    @Override
     public int read() throws IOException {
       int read = in.read();
       readCount += read;
@@ -275,10 +288,7 @@ public class SolrRequestParserTest exten
     HttpServletRequest request = getMock("/solr/select", contentType, postBytes.length);
     expect(request.getMethod()).andReturn("POST").anyTimes();
     expect(request.getQueryString()).andReturn(getParams).anyTimes();
-    expect(request.getInputStream()).andReturn(new ServletInputStream() {
-      private final ByteArrayInputStream in = new ByteArrayInputStream(postBytes);
-      @Override public int read() { return in.read(); }
-    });
+    expect(request.getInputStream()).andReturn(new ByteServletInputStream(postBytes));
     replay(request);
     
     MultipartRequestParser multipart = new MultipartRequestParser( 2048 );
@@ -307,10 +317,7 @@ public class SolrRequestParserTest exten
     HttpServletRequest request = getMock("/solr/select", "application/x-www-form-urlencoded", -1);
     expect(request.getMethod()).andReturn("POST").anyTimes();
     expect(request.getQueryString()).andReturn(null).anyTimes();
-    expect(request.getInputStream()).andReturn(new ServletInputStream() {
-      private final ByteArrayInputStream in = new ByteArrayInputStream(large.toString().getBytes(StandardCharsets.US_ASCII));
-      @Override public int read() { return in.read(); }
-    });
+    expect(request.getInputStream()).andReturn(new ByteServletInputStream(large.toString().getBytes(StandardCharsets.US_ASCII)));
     replay(request);
     
     FormDataRequestParser formdata = new FormDataRequestParser( limitKBytes );    
@@ -330,7 +337,25 @@ public class SolrRequestParserTest exten
     expect(request.getQueryString()).andReturn(null).anyTimes();
     // we emulate Jetty that returns empty stream when parameters were parsed before:
     expect(request.getInputStream()).andReturn(new ServletInputStream() {
-      @Override public int read() { return -1; }
+      @Override
+      public int read() {
+        return -1;
+      }
+
+      @Override
+      public boolean isFinished() {
+        return true;
+      }
+
+      @Override
+      public boolean isReady() {
+        return true;
+      }
+
+      @Override
+      public void setReadListener(ReadListener readListener) {
+
+      }
     });
     replay(request);
     
@@ -387,7 +412,7 @@ public class SolrRequestParserTest exten
     parsers.setAddRequestHeadersToContext(true);
     solrReq = parsers.parse(h.getCore(), "/select", request);
     assertEquals(request, solrReq.getContext().get("httpRequest"));
-    assertEquals("10.0.0.1", ((HttpServletRequest)solrReq.getContext().get("httpRequest")).getHeaders("X-Forwarded-For").nextElement());
+    assertEquals("10.0.0.1", ((HttpServletRequest) solrReq.getContext().get("httpRequest")).getHeaders("X-Forwarded-For").nextElement());
     
   }
 

Added: lucene/dev/branches/branch_5x/solr/licenses/jetty-rewrite-9.2.10.v20150310.jar.sha1
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/licenses/jetty-rewrite-9.2.10.v20150310.jar.sha1?rev=1676114&view=auto
==============================================================================
--- lucene/dev/branches/branch_5x/solr/licenses/jetty-rewrite-9.2.10.v20150310.jar.sha1 (added)
+++ lucene/dev/branches/branch_5x/solr/licenses/jetty-rewrite-9.2.10.v20150310.jar.sha1 Sun Apr 26 15:22:12 2015
@@ -0,0 +1 @@
+532576007fb71e632edd3681d4222379d4ea8c07

Modified: lucene/dev/branches/branch_5x/solr/licenses/start.jar.sha1
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/licenses/start.jar.sha1?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/licenses/start.jar.sha1 (original)
+++ lucene/dev/branches/branch_5x/solr/licenses/start.jar.sha1 Sun Apr 26 15:22:12 2015
@@ -1 +1 @@
-8e1a37a8daae3f222d957012f826047497466a56
+b91b72f9167cce4c1caea0f8363fd9984456e34d

Modified: lucene/dev/branches/branch_5x/solr/server/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/build.xml?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/build.xml (original)
+++ lucene/dev/branches/branch_5x/solr/server/build.xml Sun Apr 26 15:22:12 2015
@@ -38,11 +38,11 @@
 
   <target name="resolve" depends="ivy-availability-check,ivy-fail,ivy-configure">
     <sequential>
-    <!-- jetty libs in lib/ -->
-    <ivy:retrieve conf="jetty" type="jar" log="download-only" symlink="${ivy.symlink}"
-    	          pattern="lib/[artifact]-[revision].[ext]" sync="true"/>
-    <ivy:retrieve conf="logging,servlet" type="jar,bundle" log="download-only" symlink="${ivy.symlink}"
-                  pattern="lib/ext/[artifact]-[revision].[ext]" sync="true"/>
+        <!-- jetty libs in lib/ -->
+        <ivy:retrieve conf="jetty,servlet" type="jar" log="download-only" symlink="${ivy.symlink}"
+                      pattern="lib/[artifact]-[revision].[ext]" sync="true"/>
+        <ivy:retrieve conf="logging" type="jar,bundle" log="download-only" symlink="${ivy.symlink}"
+                      pattern="lib/ext/[artifact]-[revision].[ext]" sync="true"/>
     <!-- start.jar - we don't use sync=true here, we don't own the dir, but
          it's one jar with a constant name and we don't need it -->
     <ivy:retrieve conf="start" type="jar" log="download-only" symlink="${ivy.symlink}" 

Modified: lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml?rev=1676114&r1=1676113&r2=1676114&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml (original)
+++ lucene/dev/branches/branch_5x/solr/server/contexts/solr-jetty-context.xml Sun Apr 26 15:22:12 2015
@@ -1,8 +1,9 @@
 <?xml version="1.0"?>
-<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
+<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
 <Configure class="org.eclipse.jetty.webapp.WebAppContext">
-  <Set name="contextPath"><SystemProperty name="hostContext" default="/solr"/></Set>
-  <Set name="war"><SystemProperty name="jetty.home"/>/webapps/solr.war</Set>
-  <Set name="defaultsDescriptor"><SystemProperty name="jetty.home"/>/etc/webdefault.xml</Set>
-  <Set name="tempDirectory"><Property name="jetty.home" default="."/>/solr-webapp</Set>
+  <Set name="contextPath"><Property name="hostContext" default="/solr"/></Set>
+  <Set name="war"><Property name="jetty.base"/>/webapps/solr.war</Set>
+  <Set name="defaultsDescriptor"><Property name="jetty.base"/>/etc/webdefault.xml</Set>
+  <Set name="tempDirectory"><Property name="jetty.base" default="."/>/solr-webapp</Set>
+  <Set name="persistTempDirectory">true</Set>
 </Configure>

Copied: lucene/dev/branches/branch_5x/solr/server/etc/jetty-http.xml (from r1649552, lucene/dev/trunk/solr/server/etc/jetty-http.xml)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/etc/jetty-http.xml?p2=lucene/dev/branches/branch_5x/solr/server/etc/jetty-http.xml&p1=lucene/dev/trunk/solr/server/etc/jetty-http.xml&r1=1649552&r2=1676114&rev=1676114&view=diff
==============================================================================
--- lucene/dev/trunk/solr/server/etc/jetty-http.xml (original)
+++ lucene/dev/branches/branch_5x/solr/server/etc/jetty-http.xml Sun Apr 26 15:22:12 2015
@@ -1,21 +1,4 @@
 <?xml version="1.0"?>
-<!--
-  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.
-  -->
-
 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
 
 <!-- ============================================================= -->
@@ -26,17 +9,6 @@
 <Configure id="Server" class="org.eclipse.jetty.server.Server">
 
   <!-- =========================================================== -->
-  <!-- Server Thread Pool                                          -->
-  <!-- =========================================================== -->
-  <Get name="ThreadPool">
-    <!-- Default queued blocking threadpool -->
-    <Set name="minThreads"><Property name="jetty.threads.min" /></Set>
-    <Set name="maxThreads"><Property name="jetty.threads.max" /></Set>
-    <Set name="detailedDump">false</Set>
-    <Set name="idleTimeout"><Property name="jetty.threads.idle.timeout" /></Set>
-  </Get>
-
-  <!-- =========================================================== -->
   <!-- Add a HTTP Connector.                                       -->
   <!-- Configure an o.e.j.server.ServerConnector with a single     -->
   <!-- HttpConnectionFactory instance using the common httpConfig  -->
@@ -50,24 +22,24 @@
     <Arg>
       <New class="org.eclipse.jetty.server.ServerConnector">
         <Arg name="server"><Ref refid="Server" /></Arg>
-        <Arg name="acceptors" type="int"><Property name="jetty.http.acceptors" default="-1"/></Arg>
-        <Arg name="selectors" type="int"><Property name="jetty.http.selectors" default="-1"/></Arg>
+        <Arg name="acceptors" type="int"><Property name="solr.jetty.http.acceptors" default="-1"/></Arg>
+        <Arg name="selectors" type="int"><Property name="solr.jetty.http.selectors" default="-1"/></Arg>
         <Arg name="factories">
           <Array type="org.eclipse.jetty.server.ConnectionFactory">
             <Item>
               <New class="org.eclipse.jetty.server.HttpConnectionFactory">
-                <Arg name="config">
-                  <New id="httpConfig" class="org.eclipse.jetty.server.HttpConfiguration">
-                    <Set name="sendServerVersion">false</Set>
-                    <Set name="sendDateHeader">false</Set>
-                  </New>
-                </Arg>
+                <Arg name="config"><Ref refid="httpConfig" /></Arg>
               </New>
             </Item>
           </Array>
         </Arg>
-        <Set name="port"><Property name="jetty.port" /></Set>
         <Set name="host"><Property name="jetty.host" /></Set>
+        <Set name="port"><Property name="jetty.port" default="8983" /></Set>
+        <Set name="idleTimeout"><Property name="solr.jetty.http.idleTimeout" default="50000"/></Set>
+        <Set name="soLingerTime"><Property name="solr.jetty.http.soLingerTime" default="-1"/></Set>
+        <Set name="acceptorPriorityDelta"><Property name="solr.jetty.http.acceptorPriorityDelta" default="0"/></Set>
+        <Set name="selectorPriorityDelta"><Property name="solr.jetty.http.selectorPriorityDelta" default="0"/></Set>
+        <Set name="acceptQueueSize"><Property name="solr.jetty.http.acceptQueueSize" default="0"/></Set>
       </New>
     </Arg>
   </Call>

Copied: lucene/dev/branches/branch_5x/solr/server/etc/jetty-https.xml (from r1649552, lucene/dev/trunk/solr/server/etc/jetty-https.xml)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/server/etc/jetty-https.xml?p2=lucene/dev/branches/branch_5x/solr/server/etc/jetty-https.xml&p1=lucene/dev/trunk/solr/server/etc/jetty-https.xml&r1=1649552&r2=1676114&rev=1676114&view=diff
==============================================================================
--- lucene/dev/trunk/solr/server/etc/jetty-https.xml (original)
+++ lucene/dev/branches/branch_5x/solr/server/etc/jetty-https.xml Sun Apr 26 15:22:12 2015
@@ -1,21 +1,4 @@
 <?xml version="1.0"?>
-<!--
-  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.
-  -->
-
 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
 
 <!-- ============================================================= -->
@@ -23,23 +6,48 @@
 <!-- This configuration must be used in conjunction with jetty.xml -->
 <!-- and jetty-ssl.xml.                                            -->
 <!-- ============================================================= -->
-<Configure id="sslConnector" class="org.eclipse.jetty.server.ServerConnector">
+<Configure id="Server" class="org.eclipse.jetty.server.Server">
 
-  <Call name="addIfAbsentConnectionFactory">
+  <!-- =========================================================== -->
+  <!-- Add a HTTPS Connector.                                      -->
+  <!-- Configure an o.e.j.server.ServerConnector with connection   -->
+  <!-- factories for TLS (aka SSL) and HTTP to provide HTTPS.      -->
+  <!-- All accepted TLS connections are wired to a HTTP connection.-->
+  <!--                                                             -->
+  <!-- Consult the javadoc of o.e.j.server.ServerConnector,        -->
+  <!-- o.e.j.server.SslConnectionFactory and                       -->
+  <!-- o.e.j.server.HttpConnectionFactory for all configuration    -->
+  <!-- that may be set here.                                       -->
+  <!-- =========================================================== -->
+  <Call id="httpsConnector" name="addConnector">
     <Arg>
-      <New class="org.eclipse.jetty.server.SslConnectionFactory">
-        <Arg name="next">http/1.1</Arg>
-        <Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
+      <New class="org.eclipse.jetty.server.ServerConnector">
+        <Arg name="server"><Ref refid="Server" /></Arg>
+        <Arg name="acceptors" type="int"><Property name="solr.jetty.ssl.acceptors" default="-1"/></Arg>
+        <Arg name="selectors" type="int"><Property name="solr.jetty.ssl.selectors" default="-1"/></Arg>
+        <Arg name="factories">
+          <Array type="org.eclipse.jetty.server.ConnectionFactory">
+            <Item>
+              <New class="org.eclipse.jetty.server.SslConnectionFactory">
+                <Arg name="next">http/1.1</Arg>
+                <Arg name="sslContextFactory"><Ref refid="sslContextFactory"/></Arg>
+              </New>
+            </Item>
+            <Item>
+              <New class="org.eclipse.jetty.server.HttpConnectionFactory">
+                <Arg name="config"><Ref refid="sslHttpConfig"/></Arg>
+              </New>
+            </Item>
+          </Array>
+        </Arg>
+        <Set name="host"><Property name="solr.jetty.host" /></Set>
+        <Set name="port"><Property name="solr.jetty.https.port" default="8983" /></Set>
+        <Set name="idleTimeout"><Property name="solr.jetty.https.timeout" default="50000"/></Set>
+        <Set name="soLingerTime"><Property name="solr.jetty.https.soLingerTime" default="-1"/></Set>
+        <Set name="acceptorPriorityDelta"><Property name="solr.jetty.ssl.acceptorPriorityDelta" default="0"/></Set>
+        <Set name="selectorPriorityDelta"><Property name="solr.jetty.ssl.selectorPriorityDelta" default="0"/></Set>
+        <Set name="acceptQueueSize"><Property name="solr.jetty.https.acceptQueueSize" default="0"/></Set>
       </New>
     </Arg>
   </Call>
-
-  <Call name="addConnectionFactory">
-    <Arg>
-      <New class="org.eclipse.jetty.server.HttpConnectionFactory">
-        <Arg name="config"><Ref refid="sslHttpConfig" /></Arg>
-      </New>
-    </Arg>
-  </Call>
-
-</Configure>
\ No newline at end of file
+</Configure>