Changeset 0703a29


Ignore:
Timestamp:
Mar 11, 2017 3:24:23 PM (3 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
aea20a5
Parents:
072d990 (diff), db0381d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p.zzz.jetty9' (head 80022f6ef552acd1382d45103969aa7c17b1d794)

to branch 'i2p.i2p' (head 3b4b418ae8be95d52228fc7c325fc52e0223e4fe)

Files:
28 added
24 deleted
34 edited

Legend:

Unmodified
Added
Removed
  • LICENSE.txt

    r072d990 r0703a29  
    213213       See licenses/LICENSE-Apache2.0.txt
    214214
    215    Jetty 8.1.21.v20160908:
     215   Jetty 9.2.21.v20170120:
    216216   See licenses/ABOUT-Jetty.html
    217217   See licenses/NOTICE-Jetty.html
    218218   See licenses/LICENSE-Apache2.0.txt
    219219   See licenses/LICENSE-ECLIPSE-1.0.html
    220    See licenses/NOTICE-Commons-Logging.txt
    221220
    222221   JRobin 1.6.0-1:
     
    284283      See licenses/LICENSE-LGPLv2.1.txt
    285284
    286    Tomcat 6.0.48:
     285   Tomcat 8.0.33:
    287286   Copyright 1999-2016 The Apache Software Foundation
    288287   See licenses/LICENSE-Apache2.0.txt
  • apps/i2ptunnel/java/build.xml

    r072d990 r0703a29  
    278278                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    279279                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    280                 <!-- jsp-api.jar only present for debian builds -->
     280
     281                <!-- following jars only present for debian builds -->
    281282                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
    282                 <!-- tomcat-api.jar only present for debian builds -->
    283283                <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
    284                 <!-- jasper-el.jar only present for debian builds -->
     284                <pathelement location="../../jetty/jettylib/tomcat-util.jar" />
     285                <pathelement location="../../jetty/jettylib/tomcat-util-scan.jar" />
     286
    285287                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
    286288                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    287289                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     290                <pathelement location="../../jetty/jettylib/jetty-util.jar" />
    288291                <pathelement location="${ant.home}/lib/ant.jar" />
    289292                <pathelement location="build/i2ptunnel.jar" />
     
    310313                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    311314                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    312                 <!-- jsp-api.jar only present for debian builds -->
     315
     316                <!-- following jars only present for debian builds -->
    313317                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
    314                 <!-- tomcat-api.jar only present for debian builds -->
    315318                <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
    316                 <!-- jasper-el.jar only present for debian builds -->
    317319                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
     320                <pathelement location="../../jetty/jettylib/tomcat-util.jar" />
     321                <pathelement location="../../jetty/jettylib/tomcat-util-scan.jar" />
     322
    318323                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    319324                <pathelement location="../../jetty/jettylib/commons-el.jar" />
  • apps/jetty/build.xml

    r072d990 r0703a29  
    44    <!-- This copies jars, with some modifications and renaming,
    55         from the jetty-distribution directory to the jettylib directory.
    6          This is disabled if the property with-libjetty8-java=true.
     6         This is disabled if the property with-libjetty9-java=true.
    77
    88         This copies jars, with some modifications and renaming,
     
    1515
    1616    <!-- Note: Please change all references in top-level build.xml if you update to a new Jetty! -->
    17     <property name="jetty.ver" value="8.1.21.v20160908" />
     17    <!-- unused until we go to 9.3 -->
     18    <property name="jetty.branch" value="stable-9" />
     19    <property name="jetty.ver" value="9.2.21.v20170120" />
    1820    <property name="jetty.base" value="jetty-distribution-${jetty.ver}" />
    19     <property name="jetty.sha1" value="9780e99e765fd7b9bb1aac8ba2bba374ac039764" />
     21    <property name="jetty.sha1" value="3dcd4f66cc3f72800a2ee53fecf7b3f9d3f23eb2" />
    2022    <property name="jetty.filename" value="${jetty.base}.zip" />
    21     <property name="jetty.url" value="http://repo1.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty.ver}/${jetty.filename}" />
     23    <!-- change jetty.ver to jetty.branch for 9.3 -->
     24    <property name="jetty.url" value="http://central.maven.org/maven2/org/eclipse/jetty/jetty-distribution/${jetty.ver}/${jetty.filename}" />
    2225    <property name="verified.filename" value="verified.txt" />
    2326    <property name="javac.compilerargs" value="" />
    2427    <property name="javac.version" value="1.7" />
    25     <property name="tomcat.lib" value="apache-tomcat-deployer/lib" />
    26     <property name="tomcat.ver" value="6.0.48" />
    27     <property name="tomcat2.lib" value="apache-tomcat-${tomcat.ver}/lib" />
    28     <property name="tomcat2.lib.small" value="apache-tomcat/lib" />
    2928
    3029    <target name="all" depends="build" />
     
    4241        <condition property="jetty.zip.extracted" >
    4342            <or>
    44                 <istrue value="${with-libjetty8-java}" />
     43                <istrue value="${with-libjetty9-java}" />
    4544                <available file="${jetty.base}" type="dir" />
    4645            </or>
     
    5453        <condition property="verified.already" >
    5554            <or>
    56                 <istrue value="${with-libjetty8-java}" />
     55                <istrue value="${with-libjetty9-java}" />
    5756                <istrue value="${jetty.zip.extracted}" />
    5857                <and>
     
    121120
    122121    <!-- Jetty and tomcat files -->
    123     <target name="copyJettylib" depends="mkJettylibdir, copyJettylib1, copyTomcatLib" />
     122    <!--
     123         We support the following configurations:
     124           no system jars: Precise, Trusty
     125           with-libtomcat8-java: Jessie (without backports), Wheezy
     126           with-libtomcat8-java AND with-libjetty9-java: Xenial, Jessie (with backports), Stretch
     127           with-libjetty9-java (only): not supported
     128     -->
     129    <target name="copyJettylib" depends="mkJettylibdir, copyJettylib1, copyTomcatLib1, copyJettylib2, copyTomcatLib" />
    124130
    125131    <!-- Jetty files only -->
    126     <target name="copyJettylib1" depends="extractJettylib" unless="${with-libjetty8-java}" >
     132    <target name="copyJettylib1" depends="extractJettylib" unless="${with-libjetty9-java}" >
    127133      <!-- We copy everything to names without the version numbers so we
    128134           can update them later. Where there was something similar in Jetty 5/6,
     
    167173            </manifest>
    168174        </jar>
     175    </target>
     176
     177    <!-- If with-libtomcat8-java but not with-libjetty9-java, we don't do this -->
     178    <target name="copyJettylib2" depends="extractJettylib" unless="${with-libtomcat8-java}" >
    169179        <jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" filesetmanifest="mergewithoutmain" >
    170             <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/servlet-api-3.0.jar" />
    171             <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar" />
     180            <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/servlet-api-3.1.jar" />
     181          <!--
     182            Jetty version - see below for why we don't use this one
     183            <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/jsp/javax.servlet.jsp-api-2.3.1.jar" />
     184           -->
     185            <!-- Apache version -->
     186            <!-- Also includes org.apache.*, this is copied into jasper-runtime.jar below -->
     187            <zipfileset includes="javax/**/*" src="${jetty.base}/lib/apache-jsp/org.mortbay.jasper.apache-jsp-8.0.33.jar"/>
     188            <!-- In Debian packages they are found in /usr/share/java/tomcat8-servlet-api.jar in the libtomcat8-java package -->
     189            <!-- javax/servlet/jsp/resources are dups of those in apache-jsp jar -->
     190            <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties javax/servlet/jsp/resources/*" src="${jetty.base}/lib/jetty-schemas-3.1.jar" />
    172191        </jar>
    173192      <!--
     
    175194        <delete dir="${jetty.base}" />
    176195      -->
    177         <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over,
    178              needed for old plugins and things. We add tomcat-juli below.
    179           -->
    180       <!--
    181         * Removed in 0.9.24, see ticket #1679
    182         * Jetty now uses tomcat-juli (added below to commons-logging.jar), not commons-logging proper,
    183         * and no known plugins use it either.
    184         <jar destfile="jettylib/commons-logging.jar" filesetmanifest="mergewithoutmain" >
    185             <zipfileset excludes="META-INF/LICENSE.txt META-INF/NOTICE.txt" src="../../installer/lib/launch4j/lib/commons-logging.jar" />
    186         </jar>
    187       -->
    188     </target>
    189 
    190     <!-- Tomcat util jar.
    191          As of Tomcat 6.0.39, the deployer does not contain some classes that are required
    192          to precompile jsps with tags (SusiDNS and i2p-bote).
    193          These classes are in the main Tomcat package, in lib/tomcat-coyote.jar.
    194          As the jar is 800 KB and we only need 12 KB of that, we extract the required classes
    195          to a new jar, created and checked in using this target.
    196          Apparently this is only required for precompilation of jsps, so this is put in
    197          with the JspC compiler jasper-runtime.jar below.
    198      -->
    199     <target name="buildTomcatUtilJar" unless="${with-libservlet2.5-java}" >
    200         <!-- take only what we need from the tomcat-coyote jar -->
    201         <jar destfile="${tomcat2.lib.small}/tomcat-coyote-util.jar" >
    202             <zipfileset src="${tomcat2.lib}/tomcat-coyote.jar"
    203              includes="org/apache/tomcat/util/descriptor/* org/apache/tomcat/util/res/*" />
    204         </jar>
    205     </target>
     196    </target>
     197
    206198
    207199    <!-- Tomcat.
     
    222214    <target name="copyTomcatLib" depends="mkJettylibdir, copyTomcatLib1, copyTomcatLib2, copyTomcatLib3" />
    223215
    224     <target name="copyTomcatLib1" unless="${with-libservlet2.5-java}" >
     216    <target name="copyTomcatLib1" >
    225217        <condition property="with-libtomcat-java" >
    226218            <or>
     
    234226
    235227    <target name="copyTomcatLib2" unless="${with-libtomcat-java}" >
    236         <!-- EL libs.
     228        <!-- EL API and compiler libs.
    237229             Tomcat 6 has EL 2.1.
    238230             Tomcat 7 / libservlet3.0 has EL 2.2.
     231             Jetty 9 / Tomcat 8 / libservlet3.1 has EL 3.0.
    239232             According to http://stackoverflow.com/questions/7202686/differences-between-el-2-1-and-2-2
    240233             2.2 is backwards-compatible with 2.1.
    241234         -->
    242         <jar destfile="jettylib/commons-el.jar" duplicate="preserve" filesetmanifest="merge" >
    243             <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />
    244             <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
    245         </jar>
    246 
    247         <jar destfile="jettylib/jasper-runtime.jar" filesetmanifest="merge" >
    248             <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" />
    249             <zipfileset src="${tomcat2.lib.small}/tomcat-coyote-util.jar" />
    250         </jar>
    251 <!--
    252         <jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" filesetmanifest="mergewithoutmain" >
    253             <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/servlet-api.jar" />
    254             <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
    255             <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-api.jar" />
    256             <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-util.jar" />
    257         </jar>
    258 -->
    259         <!-- Ant bug, don't set update and filesetmanifest or the update doesn't happen,
    260              Their bug tracker claims fixed in 1.8.0 but broken for me in 1.8.1
    261           -->
     235        <!-- the javax.el API, AND the com.sun.el parser -->
     236        <!-- actually from jetty9, not tomcat8... this will fail unless we have the jetty files also -->
     237        <jar destfile="jettylib/commons-el.jar" >
     238          <!--
     239            Jetty version
     240            <zipfileset src="${jetty.base}/lib/jsp/javax.el-3.0.0.jar"/>
     241           -->
     242            <!-- Apache version -->
     243            <zipfileset src="${jetty.base}/lib/apache-jsp/org.mortbay.jasper.apache-el-8.0.33.jar"/>
     244        </jar>
     245
     246        <!-- actually from jetty9, not tomcat8... this will fail unless we have the jetty files also -->
     247        <jar destfile="jettylib/jasper-runtime.jar" >
     248          <!--
     249            Jetty version
     250            <zipfileset src="${jetty.base}/lib/jsp/javax.servlet.jsp-2.3.2.jar"/>
     251            To be included in jasper-runtime.jar?
     252            Server complains "NO JSP Support for /, did not find org.eclipse.jetty.jsp.JettyJspServlet" even with this included (but it still works).
     253            The following file has the class, but /usr/share/java/jetty8-jsp.jar is empty
     254            We don't use this one, because we want to be consistent with Debian builds that
     255            must use Apache (aka libtomcat8).
     256            <zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/jsp/jetty-jsp-${jetty.ver}.jar" />
     257           -->
     258            <!-- Apache version -->
     259            <!-- Also includes javax.servlet.jsp.*, this is copied into javax.servlet.jar above -->
     260            <zipfileset includes="org/**/*" src="${jetty.base}/lib/apache-jsp/org.mortbay.jasper.apache-jsp-8.0.33.jar"/>
     261            <!-- required Jetty initializer (see RouterConsoleRunner) -->
     262            <zipfileset src="${jetty.base}/lib/apache-jsp/org.eclipse.jetty.apache-jsp-${jetty.ver}.jar"/>
     263        </jar>
     264
    262265        <jar destfile="jettylib/commons-logging.jar" update="true" >
    263             <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-juli.jar" />
     266            <manifest>
     267                <attribute name="Note" value="Intentionally empty" />
     268            </manifest>
    264269        </jar>
    265270    </target>
  • apps/jetty/java/src/net/i2p/jetty/I2PLogger.java

    r072d990 r0703a29  
    264264        return "net.i2p.jetty.I2PLogger";
    265265    }
     266
     267    /**
     268     *  @since Jetty 9
     269     */
     270    public void debug(String msg, long arg) {
     271        debug(msg, Long.valueOf(arg), null);
     272    }
    266273}
  • apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java

    r072d990 r0703a29  
    2525import javax.servlet.http.Cookie;
    2626
    27 import org.eclipse.jetty.http.HttpHeaders;
    2827import org.eclipse.jetty.http.PathMap;
    2928import org.eclipse.jetty.server.Request;
     
    8281    private transient OutputStream _fileOut;
    8382    private transient DateCache _logDateCache;
    84     private transient PathMap _ignorePathMap;
     83    private transient PathMap<String> _ignorePathMap;
    8584    private transient Writer _writer;
    8685    private transient ArrayList<Utf8StringBuilder> _buffers;
     
    287286                if (_preferProxiedForAddress)
    288287                {
    289                     addr = request.getHeader(HttpHeaders.X_FORWARDED_FOR);
     288                    addr = request.getHeader("X-Forwarded-For");
    290289                }
    291290
     
    311310                    buf.append(_logDateCache.format(request.getTimeStamp()));
    312311                else
    313                     buf.append(request.getTimeStampBuffer().toString());
     312                    //buf.append(request.getTimeStampBuffer().toString());
     313                    // TODO SimpleDateFormat or something
     314                    buf.append(request.getTimeStamp());
    314315                   
    315316                buf.append("] \"");
     
    359360                synchronized(_writer)
    360361                {
    361                     buf.append(StringUtil.__LINE_SEPARATOR);
     362                    buf.append(System.getProperty("line.separator", "\n"));
    362363                    int l=buf.length();
    363364                    if (l>_copy.length)
     
    413414                    }
    414415
    415                     _writer.write(StringUtil.__LINE_SEPARATOR);
     416                    _writer.write(System.getProperty("line.separator", "\n"));
    416417                    _writer.flush();
    417418                }
     
    430431                               Writer writer) throws IOException
    431432    {
    432         String referer = request.getHeader(HttpHeaders.REFERER);
     433        String referer = request.getHeader("Referer");
    433434        if (referer == null)
    434435            writer.write("\"-\" ");
     
    440441        }
    441442       
    442         String agent = request.getHeader(HttpHeaders.USER_AGENT);
     443        String agent = request.getHeader("User-Agent");
    443444        if (agent == null)
    444445            writer.write("\"-\" ");
     
    456457        if (_logDateFormat!=null)
    457458        {       
    458             _logDateCache = new DateCache(_logDateFormat, _logLocale);
    459             _logDateCache.setTimeZoneID(_logTimeZone);
     459            _logDateCache = new DateCache(_logDateFormat, _logLocale, _logTimeZone);
    460460        }
    461461       
     
    473473        if (_ignorePaths != null && _ignorePaths.length > 0)
    474474        {
    475             _ignorePathMap = new PathMap();
     475            _ignorePathMap = new PathMap<String>();
    476476            for (int i = 0; i < _ignorePaths.length; i++)
    477477                _ignorePathMap.put(_ignorePaths[i], _ignorePaths[i]);
  • apps/jetty/java/src/net/i2p/jetty/JettyStart.java

    r072d990 r0703a29  
    3131
    3232import org.eclipse.jetty.server.Connector;
     33import org.eclipse.jetty.server.NetworkConnector;
    3334import org.eclipse.jetty.server.Server;
    3435import org.eclipse.jetty.util.component.LifeCycle;
     
    131132                                Connector[] connectors = server.getConnectors();
    132133                                if (connectors.length > 0) {
    133                                     int port = connectors[0].getPort();
    134                                     if (port > 0) {
    135                                         _port = port;
    136                                         String host = connectors[0].getHost();
    137                                         if (host.equals("0.0.0.0") || host.equals("::"))
    138                                             host = "127.0.0.1";
    139                                         _context.portMapper().register(PortMapper.SVC_EEPSITE, host, port);
     134                                    Connector conn = connectors[0];
     135                                    if (conn instanceof NetworkConnector) {
     136                                        NetworkConnector nconn = (NetworkConnector) conn;
     137                                        int port = nconn.getPort();
     138                                        if (port > 0) {
     139                                            _port = port;
     140                                            String host = nconn.getHost();
     141                                            if (host.equals("0.0.0.0") || host.equals("::"))
     142                                                host = "127.0.0.1";
     143                                            _context.portMapper().register(PortMapper.SVC_EEPSITE, host, port);
     144                                        }
    140145                                    }
    141146                                }
  • apps/routerconsole/java/build.xml

    r072d990 r0703a29  
    7171                <pathelement location="../../jetty/jettylib/jetty-webapp.jar" />
    7272                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
     73                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    7374                <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
    7475                <pathelement location="../../systray/java/build/systray.jar" />
     
    7677                <pathelement location="../../../installer/lib/wrapper/all/wrapper.jar" />
    7778                <pathelement location="../../jrobin/java/build/jrobin.jar" />
     79
     80                <!-- following jars only present for debian builds -->
     81                <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
    7882            </classpath>
    7983        </javac>
     
    366370                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    367371                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    368                 <!-- jsp-api.jar only present for debian builds -->
     372
     373                <!-- following jars only present for debian builds -->
    369374                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
    370                 <!-- tomcat-api.jar only present for debian builds -->
    371375                <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
    372                 <!-- jasper-el.jar only present for debian builds -->
    373376                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
     377                <pathelement location="../../jetty/jettylib/tomcat-util.jar" />
     378                <pathelement location="../../jetty/jettylib/tomcat-util-scan.jar" />
     379
    374380                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    375381                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     382                <pathelement location="../../jetty/jettylib/jetty-util.jar" />
    376383                <pathelement location="${ant.home}/lib/ant.jar" />
    377384                <pathelement location="../../jetty/jettylib/jetty-i2p.jar" />
     
    404411                <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    405412                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    406                 <!-- jsp-api.jar only present for debian builds -->
     413
     414                <!-- following jars only present for debian builds -->
    407415                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
    408                 <!-- tomcat-api.jar only present for debian builds -->
    409416                <pathelement location="../../jetty/jettylib/tomcat-api.jar" />
     417                <pathelement location="../../jetty/jettylib/tomcat-util.jar" />
     418                <pathelement location="../../jetty/jettylib/tomcat-util-scan.jar" />
     419
    410420                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    411421                <pathelement location="../../jetty/jettylib/commons-el.jar" />
  • apps/routerconsole/java/src/net/i2p/router/web/RouterConsoleRunner.java

    r072d990 r0703a29  
    4747import org.eclipse.jetty.security.authentication.DigestAuthenticator;
    4848import org.eclipse.jetty.server.AbstractConnector;
     49import org.eclipse.jetty.server.ConnectionFactory;
    4950import org.eclipse.jetty.server.Connector;
     51import org.eclipse.jetty.server.HttpConfiguration;
     52import org.eclipse.jetty.server.HttpConnectionFactory;
    5053import org.eclipse.jetty.server.NCSARequestLog;
     54import org.eclipse.jetty.server.SecureRequestCustomizer;
    5155import org.eclipse.jetty.server.Server;
    5256import org.eclipse.jetty.server.UserIdentity;
    53 import org.eclipse.jetty.server.bio.SocketConnector;
     57import org.eclipse.jetty.server.ServerConnector;
     58import org.eclipse.jetty.server.SslConnectionFactory;
    5459import org.eclipse.jetty.server.handler.ContextHandlerCollection;
    5560import org.eclipse.jetty.server.handler.DefaultHandler;
     
    5762import org.eclipse.jetty.server.handler.HandlerWrapper;
    5863import org.eclipse.jetty.server.handler.RequestLogHandler;
    59 import org.eclipse.jetty.server.nio.SelectChannelConnector;
    60 import org.eclipse.jetty.server.ssl.SslSocketConnector;
    61 import org.eclipse.jetty.server.ssl.SslSelectChannelConnector;
    6264import org.eclipse.jetty.servlet.ServletHandler;
    6365import org.eclipse.jetty.servlet.ServletHolder;
     
    364366     *                  RequestLogHandler (opt)
    365367     *</pre>
     368     *
     369     *  Porting to Jetty 9:
     370     *
     371     *  http://dev.eclipse.org/mhonarc/lists/jetty-dev/msg01952.html
     372     *  You are missing a few facts about Jetty 9.1 ...
     373     *  First, there are no longer any blocking connectors.
     374     *  Its all async / nio connectors now. (mainly because that's the direction that the servlet api 3.1 is taking)
     375     *
     376     *  Next, there is only 1 connector.   The ServerConnector.
     377     *  However, it takes 1 or more ConnectionFactory implementations to know how to handle the incoming connection.
     378     *  We have factories for HTTP (0.9 thru 1.1), SPDY, SSL-http, and SSL-npn so far.
     379     *  This list of factories will expand as the future of connectivity to web servers is ever growing (think HTTP/2)
     380     *
     381     *  Use the embedded examples for help understanding this.
     382     *  http://git.eclipse.org/c/jetty/org.eclipse.jetty.project.git/tree/examples/embedded/src/main/java/org/eclipse/jetty/embedded/ManyConnectors.java?id=jetty-9.1.0.RC0
     383     *
    366384     */
    367385    public void startConsole() {
     
    376394        // so Jetty can find WebAppConfiguration
    377395        System.setProperty("jetty.class.path", _context.getBaseDir() + "/lib/routerconsole.jar");
    378         _server = new Server();
    379         _server.setGracefulShutdown(1000);
     396        // FIXME
     397        // http://dev.eclipse.org/mhonarc/lists/jetty-users/msg03487.html
     398        //_server.setGracefulShutdown(1000);
    380399
    381400        // In Jetty 6, QTP was not concurrent, so we switched to
     
    409428            //System.out.println("INFO: Jetty concurrent ThreadPool unavailable, using QueuedThreadPool");
    410429            LinkedBlockingQueue<Runnable> lbq = new LinkedBlockingQueue<Runnable>(4*MAX_THREADS);
    411             QueuedThreadPool qtp = new QueuedThreadPool(lbq);
    412             // min and max threads will be set below
    413             //qtp.setMinThreads(MIN_THREADS);
    414             //qtp.setMaxThreads(MAX_THREADS);
    415             qtp.setMaxIdleTimeMs(MAX_IDLE_TIME);
     430            // min and max threads will be reset below
     431            QueuedThreadPool qtp = new QueuedThreadPool(MAX_THREADS, MIN_THREADS, MAX_IDLE_TIME, lbq);
    416432            qtp.setName(THREAD_NAME);
    417433            qtp.setDaemon(true);
    418             _server.setThreadPool(qtp);
     434            _server = new Server(qtp);
    419435        //}
    420436
     
    503519                            if (testSock != null) try { testSock.close(); } catch (IOException ioe) {}
    504520                        }
    505                         //if (host.indexOf(":") >= 0) // IPV6 - requires patched Jetty 5
    506                         //    _server.addListener('[' + host + "]:" + _listenPort);
    507                         //else
    508                         //    _server.addListener(host + ':' + _listenPort);
    509                         AbstractConnector lsnr;
    510                         if (SystemVersion.isJava6() && !SystemVersion.isGNU()) {
    511                             SelectChannelConnector slsnr = new SelectChannelConnector();
    512                             slsnr.setUseDirectBuffers(false);  // default true seems to be leaky
    513                             lsnr = slsnr;
    514                         } else {
    515                             // Jetty 6 and NIO on Java 5 don't get along that well
    516                             // Also: http://jira.codehaus.org/browse/JETTY-1238
    517                             // "Do not use GCJ with Jetty, it will not work."
    518                             // Actually it does if you don't use NIO
    519                             lsnr = new SocketConnector();
    520                         }
     521                        HttpConfiguration httpConfig = new HttpConfiguration();
     522                        // number of acceptors, (default) number of selectors
     523                        ServerConnector lsnr = new ServerConnector(_server, 1, 0,
     524                                                                   new HttpConnectionFactory(httpConfig));
     525                        //lsnr.setUseDirectBuffers(false);  // default true seems to be leaky
    521526                        lsnr.setHost(host);
    522527                        lsnr.setPort(lport);
    523                         lsnr.setMaxIdleTime(90*1000);  // default 10 sec
     528                        lsnr.setIdleTimeout(90*1000);  // default 10 sec
    524529                        lsnr.setName("ConsoleSocket");   // all with same name will use the same thread pool
    525                         lsnr.setAcceptors(1);          // default changed to 2 somewhere in Jetty 7?
    526530                        //_server.addConnector(lsnr);
    527531                        connectors.add(lsnr);
     
    587591                                if (testSock != null) try { testSock.close(); } catch (IOException ioe) {}
    588592                            }
    589                             // TODO if class not found use SslChannelConnector
    590                             AbstractConnector ssll;
    591                             if (SystemVersion.isJava6() && !SystemVersion.isGNU()) {
    592                                 SslSelectChannelConnector sssll = new SslSelectChannelConnector(sslFactory);
    593                                 sssll.setUseDirectBuffers(false);  // default true seems to be leaky
    594                                 ssll = sssll;
    595                             } else {
    596                                 // Jetty 6 and NIO on Java 5 don't get along that well
    597                                 SslSocketConnector sssll = new SslSocketConnector(sslFactory);
    598                                 ssll = sssll;
    599                             }
     593                            HttpConfiguration httpConfig = new HttpConfiguration();
     594                            httpConfig.setSecureScheme("https");
     595                            httpConfig.setSecurePort(sslPort);
     596                            httpConfig.addCustomizer(new SecureRequestCustomizer());
     597                            // number of acceptors, (default) number of selectors
     598                            ServerConnector ssll = new ServerConnector(_server, 1, 0,
     599                                                                       new SslConnectionFactory(sslFactory, "http/1.1"),
     600                                                                       new HttpConnectionFactory(httpConfig));
     601                            //sssll.setUseDirectBuffers(false);  // default true seems to be leaky
    600602                            ssll.setHost(host);
    601603                            ssll.setPort(sslPort);
    602                             ssll.setMaxIdleTime(90*1000);  // default 10 sec
     604                            ssll.setIdleTimeout(90*1000);  // default 10 sec
    603605                            ssll.setName("ConsoleSocket");   // all with same name will use the same thread pool
    604                             ssll.setAcceptors(1);          // default changed to 2 somewhere in Jetty 7?
    605606                            //_server.addConnector(ssll);
    606607                            connectors.add(ssll);
     
    639640                                                       (_listenPort != null ? _listenPort : _sslListenPort));
    640641            tmpdir.mkdir();
    641             if (!SystemVersion.isWindows() && !SystemVersion.isMac() &&
    642                 _context.getBaseDir().getAbsolutePath().equals("/usr/share/i2p")) {
    643                // We are using Tomcat 6, so the Debian patch doesn't apply.
    644                // Remove when we switch to Tomcat 8
    645                _context.logManager().getLog(Server.class).logAlways(net.i2p.util.Log.INFO, "Please ignore any InstanceManager warnings");
    646             }
    647642            rootServletHandler = new ServletHandler();
    648643            rootWebApp = new LocaleWebAppHandler(_context,
    649644                                                  "/", _webAppsDir + ROUTERCONSOLE + ".war",
    650645                                                 tmpdir, rootServletHandler);
    651             initialize(_context, (WebAppContext)(rootWebApp.getHandler()));
     646            try {
     647                // Not sure who is supposed to call this, but unless we do,
     648                // all the jsps die NPE, because JspFactory.getDefaultContext() returns null.
     649                // We probably have to do this because we don't bundle the Jetty annotations jar and scanner.
     650                // This is only with Tomcat 8, not with the Jetty (Eclipse) jsp impl.
     651                // Got a clue from this ancient post for Tomcat 6:
     652                // https://bz.apache.org/bugzilla/show_bug.cgi?id=39804
     653                // see also apps/jetty/build.xml
     654                Class.forName("org.eclipse.jetty.apache.jsp.JettyJasperInitializer");
     655            } catch (ClassNotFoundException cnfe) {
     656                System.err.println("Warning: JettyJasperInitializer not found");
     657            }
     658            WebAppContext wac = (WebAppContext)(rootWebApp.getHandler());
     659            initialize(_context, wac);
     660            WebAppStarter.setWebAppConfiguration(wac);
    652661            chColl.addHandler(rootWebApp);
    653662
  • apps/routerconsole/java/src/net/i2p/router/web/WebAppConfiguration.java

    r072d990 r0703a29  
    1616import net.i2p.I2PAppContext;
    1717
     18import org.apache.tomcat.SimpleInstanceManager;
    1819import org.eclipse.jetty.webapp.Configuration;
    1920import org.eclipse.jetty.webapp.WebAppClassLoader;
     
    192193    public void configure(WebAppContext context) throws Exception {
    193194        configureClassPath(context);
     195        // do we just need one, in the ContextHandlerCollection, or one for each?
     196        // http://stackoverflow.com/questions/17529936/issues-while-using-jetty-embedded-to-handle-jsp-jasperexception-unable-to-com
     197        // https://github.com/jetty-project/embedded-jetty-jsp/blob/master/src/main/java/org/eclipse/jetty/demo/Main.java
     198        context.getServletContext().setAttribute("org.apache.tomcat.InstanceManager", new SimpleInstanceManager());
    194199    }
    195200
  • apps/routerconsole/java/src/net/i2p/router/web/WebAppStarter.java

    r072d990 r0703a29  
    110110        // this does the passwords...
    111111        RouterConsoleRunner.initialize(ctx, wac);
     112        setWebAppConfiguration(wac);
     113        server.addHandler(wac);
     114        server.mapContexts();
     115        return wac;
     116    }
    112117
     118    /**
     119     *  @since Jetty 9
     120     */
     121    static void setWebAppConfiguration(WebAppContext wac) {
    113122        // see WebAppConfiguration for info
    114123        String[] classNames = wac.getConfigurationClasses();
     124        // In Jetty 9, it doesn't set the defaults if we've already added one, but the
     125        // defaults aren't set yet when we call the above. So we have to get the defaults.
     126        // Without the default configuration, the web.xml isn't read, and the webapp
     127        // won't respond to any requests, even though it appears to be running.
     128        // See WebAppContext.loadConfigurations() in source
     129        if (classNames.length == 0)
     130            classNames = wac.getDefaultConfigurationClasses();
    115131        String[] newClassNames = new String[classNames.length + 1];
    116132        for (int j = 0; j < classNames.length; j++)
     
    118134        newClassNames[classNames.length] = WebAppConfiguration.class.getName();
    119135        wac.setConfigurationClasses(newClassNames);
    120         server.addHandler(wac);
    121         server.mapContexts();
    122         return wac;
    123136    }
    124137
  • apps/routerconsole/jsp/viewstat.jsp

    r072d990 r0703a29  
    6262        str = request.getParameter("end");
    6363        if (str != null) try { end = Integer.parseInt(str); } catch (NumberFormatException nfe) {}
    64         boolean hideLegend = Boolean.parseBoolean((String) request.getParameter("hideLegend"));
    65         boolean hideGrid = Boolean.parseBoolean((String) request.getParameter("hideGrid"));
    66         boolean hideTitle = Boolean.parseBoolean((String) request.getParameter("hideTitle"));
    67         boolean showEvents = Boolean.parseBoolean((String) request.getParameter("showEvents"));
     64        boolean hideLegend = Boolean.parseBoolean(request.getParameter("hideLegend"));
     65        boolean hideGrid = Boolean.parseBoolean(request.getParameter("hideGrid"));
     66        boolean hideTitle = Boolean.parseBoolean(request.getParameter("hideTitle"));
     67        boolean showEvents = Boolean.parseBoolean(request.getParameter("showEvents"));
    6868        boolean showCredit = false;
    6969        if (request.getParameter("showCredit") != null)
    70           showCredit = Boolean.parseBoolean((String) request.getParameter("showCredit"));
     70          showCredit = Boolean.parseBoolean(request.getParameter("showCredit"));
    7171        if (fakeBw)
    7272            rendered = net.i2p.router.web.StatSummarizer.instance().renderRatePng(cout, width, height, hideLegend, hideGrid, hideTitle, showEvents, periodCount, end, showCredit);
  • apps/susidns/src/build.xml

    r072d990 r0703a29  
    1717                <pathelement location="${lib}/commons-el.jar" />
    1818                <pathelement location="${lib}/javax.servlet.jar"/>
    19                 <!-- jsp-api.jar only present for debian builds -->
     19
     20                <!-- following jars only present for debian builds -->
    2021                <pathelement location="${lib}/jsp-api.jar" />
    21                 <!-- tomcat-api.jar only present for debian builds -->
    2222                <pathelement location="${lib}/tomcat-api.jar" />
    23                 <!-- tomcat-util.jar only present for debian builds -->
    2423                <pathelement location="${lib}/tomcat-util.jar" />
     24                <pathelement location="${lib}/tomcat-util-scan.jar" />
     25                <pathelement location="${lib}/jasper-el.jar" />
     26
    2527                <pathelement location="lib/jstl.jar" />
    2628                <pathelement location="lib/standard.jar" />
    2729                <pathelement location="${lib}/jasper-runtime.jar" />
    2830                <pathelement location="${lib}/commons-logging.jar" />
    29                 <!-- jasper-el.jar only present for debian builds -->
    30                 <pathelement location="${lib}/jasper-el.jar" />
     31                <pathelement location="${lib}/jetty-util.jar" />
    3132                <pathelement location="${ant.home}/lib/ant.jar" />
    3233                <pathelement location="../../../core/java/build/i2p.jar" />
  • build.properties

    r072d990 r0703a29  
    132132# Don't include geoip files, we will use geoip-database package
    133133#with-geoip-database=true
    134 # Don't include jetty files, we will use libjetty8-java package
    135 #with-libjetty8-java=true
    136 # Don't include tomcat files, we will use libtomcat6-java package
    137 #with-libtomcat6-java=true
    138 # Don't include tomcat files, we will use libtomcat7-java package
    139 #with-libtomcat7-java=true
     134# Don't include jetty files, we will use libjetty9-java package. Requires with-libtomcat8-java=true.
     135#with-libjetty9-java=true
    140136# Don't include tomcat files, we will use libtomcat8-java package
    141137#with-libtomcat8-java=true
  • build.xml

    r072d990 r0703a29  
    7171            <echo message=" " />
    7272            <echo message="sudo apt-get install debhelper ant debconf default-jdk gettext libgmp-dev po-debconf fakeroot \" />
    73             <echo message="  build-essential quilt libcommons-logging-java dh-apparmor dh-systemd libservice-wrapper-java \"  />
    74             <echo message="  devscripts libjetty8-java glassfish-javaee"  />
     73            <echo message="  build-essential quilt dh-apparmor dh-systemd libservice-wrapper-java \"  />
     74            <echo message="  devscripts libjetty9-java libtomcat8-java glassfish-javaee libgetopt-java"  />
    7575            <echo message=" " />
    7676            <echo message="The following command will install the additional runtime dependencies:" />
     
    12431243    </target>
    12441244
    1245     <target name="copyjetty-unlesspkg" unless="${with-libjetty8-java}" >
     1245    <target name="copyjetty-unlesspkg" unless="${with-libjetty9-java}" >
    12461246        <copy todir="pkg-temp/lib" >
    12471247            <fileset dir="build" includes="javax.servlet.jar jetty*.jar org.mortbay.*.jar" excludes="jetty-i2p.jar" />
     
    12901290
    12911291    <target name="preplicenses-unlesspkg" depends="settomcatprop" unless="${with-libtomcat-java}" >
     1292<!--  replacement?
    12921293        <copy file="apps/jetty/apache-tomcat-deployer/NOTICE" tofile="pkg-temp/licenses/NOTICE-Tomcat.txt" />
     1294-->
    12931295    </target>
    12941296
     
    14631465        <exec executable="sh" osfamily="unix" failonerror="true">
    14641466            <arg value="-c" />
    1465             <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar -o $i = pkg-temp/lib/jetty-java5-threadpool.jar -o $i = pkg-temp/lib/jetty-sslengine.jar ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
     1467            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/commons-logging.jar -o $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar -o $i = pkg-temp/lib/jetty-java5-threadpool.jar -o $i = pkg-temp/lib/jetty-sslengine.jar ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
    14661468        </exec>
    14671469        <exec executable="sh" osfamily="mac" failonerror="true">
    14681470            <arg value="-c" />
    1469             <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar -o $i = pkg-temp/lib/jetty-java5-threadpool.jar -o $i = pkg-temp/lib/jetty-sslengine.jar ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
     1471            <arg value="for i in pkg-temp/lib/*.jar pkg-temp/webapps/*war; do if [ $i = pkg-temp/lib/commons-logging.jar -o $i = pkg-temp/lib/jasper-compiler.jar -o $i = pkg-temp/lib/jbigi.jar -o $i = pkg-temp/lib/jetty-java5-threadpool.jar -o $i = pkg-temp/lib/jetty-sslengine.jar ]; then continue; fi; echo pack200 $i; mv $i $i.jar; pack200 -g $i.pack $i.jar; rm -f $i.jar; done" />
    14701472        </exec>
    14711473        <!-- windoz here : i admit, i hate escaped symbols in xml, indeed = =! -->
     
    15961598              can't overwrite an existing eepsite dir in a non-split configuration.
    15971599          -->
    1598         <copy todir="pkg-temp/eepsite-jetty7" >
     1600        <copy todir="pkg-temp/eepsite-jetty9" >
    15991601            <fileset dir="installer/resources/eepsite" includes="*.xml contexts/* etc/*" />
    16001602        </copy>
     
    16021604
    16031605    <target name="delete-j6-update">
    1604         <delete dir="pkg-temp/eepsite-jetty7" />
     1606        <delete dir="pkg-temp/eepsite-jetty9" />
    16051607    </target>
    16061608
     
    22052207            <arg value="../i2p-${Extended.Version}" />
    22062208        </exec>
    2207         <delete includeemptydirs="true" quiet="false">
     2209        <delete includeemptydirs="true" quiet="false" failonerror="false">
    22082210            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
    22092211            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
     
    22212223            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
    22222224            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
    2223             <!-- libjetty8-java -->
    2224             <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-8.1.21.v20160908" />
     2225            <!-- libjetty9-java -->
     2226            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.21.v20170120" />
    22252227            <!-- libjstl1.1-java or glassfish-javaee -->
    22262228          <!--
     
    22292231            <!-- libjakarta-taglibs-standard-java or glassfish-javaee -->
    22302232            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
    2231             <!-- libtomcat6-java or libtomcat7-java -->
    2232           <!--
    2233             <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat" />
    2234             <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-deployer/" />
    2235            -->
    22362233            <!-- anything added above, add in debian-release-tarball also -->
    22372234        </delete>
     
    22492246           -->
    22502247                <exclude name="apps/susidns/src/lib/standard.jar" />
    2251           <!--
    2252                 <exclude name="apps/jetty/apache-tomcat/**"/>
    2253                 <exclude name="apps/jetty/apache-tomcat-deployer/**"/>
    2254            -->
    22552248                <!-- anything added above, add in debian-release-tarball also -->
    22562249            </tarfileset>
     
    22872280            <arg value="../i2p-${Extended.Version}" />
    22882281        </exec>
    2289         <delete includeemptydirs="true" quiet="false">
     2282        <delete includeemptydirs="true" quiet="false" failonerror="false">
    22902283            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
    22912284            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
     
    23032296            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
    23042297            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
    2305             <!-- libjetty8-java -->
     2298            <!-- libjetty9-java -->
    23062299          <!--
    2307             <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-8.1.21.v20160908" />
     2300            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.21.v20170120" />
    23082301           -->
    23092302            <!-- libjstl1.1-java or glassfish-javaee -->
     
    23132306            <!-- libjakarta-taglibs-standard-java or glassfish-javaee -->
    23142307            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
    2315             <!-- libtomcat6-java or libtomcat7-java -->
    2316           <!--
    2317             <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat" />
    2318             <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-deployer/" />
    2319            -->
    23202308            <!-- anything added above, add in debian-release-tarball also -->
    23212309        </delete>
     
    23352323           -->
    23362324                <exclude name="apps/susidns/src/lib/standard.jar" />
    2337           <!--
    2338                 <exclude name="apps/jetty/apache-tomcat/**"/>
    2339                 <exclude name="apps/jetty/apache-tomcat-deployer/**"/>
    2340            -->
    23412325                <!-- anything added above, add in debian-release-tarball also -->
    23422326            </tarfileset>
     
    23702354            <arg value="../i2p-${Extended.Version}" />
    23712355        </exec>
    2372         <delete includeemptydirs="true" quiet="false">
     2356        <delete includeemptydirs="true" quiet="false" failonerror="false">ilonerror="false">
    23732357            <fileset dir="../i2p-${Extended.Version}/debian-alt/" />
    23742358            <fileset dir="../i2p-${Extended.Version}/installer/lib/" />
     
    23822366            <file name="../i2p-${Extended.Version}/installer/resources/geoip.txt" />
    23832367            <file name="../i2p-${Extended.Version}/installer/resources/geoipv6.dat.gz" />
    2384             <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-8.1.21.v20160908" />
     2368            <fileset dir="../i2p-${Extended.Version}/apps/jetty/jetty-distribution-9.2.21.v20170120" />
    23852369          <!--
    23862370            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/jstl.jar" />
    23872371           -->
    23882372            <file name="../i2p-${Extended.Version}/apps/susidns/src/lib/standard.jar" />
    2389           <!--
    2390             <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat" />
    2391             <fileset dir="../i2p-${Extended.Version}/apps/jetty/apache-tomcat-deployer/" />
    2392            -->
    23932373            <!-- anything added above, add in debian-tarball also -->
    23942374        </delete>
     
    24062386           -->
    24072387                <exclude name="apps/susidns/src/lib/standard.jar" />
    2408           <!--
    2409                 <exclude name="apps/jetty/apache-tomcat/**"/>
    2410                 <exclude name="apps/jetty/apache-tomcat-deployer/**"/>
    2411            -->
    24122388                <!-- anything added above, add in debian-tarball also -->
    24132389            </tarfileset>
  • debian-alt/README.txt

    r072d990 r0703a29  
    1 The files in ../debian/ are for jessie/stable.
     1The files in ../debian/ are for stretch.
     2You may also use them for jessie if you have libjetty9-java from jessie-backports.
     3
    24Alternates are in the subdirectories here.
     5To use them, copy them over the files in ../debian/  .
    36
    4 trusty may be copied to utopic, vivid, wily, xenial.
     7Built file compatibility:
     8trusty may be copied to vivid.
     9trusty may be used for jessie without libjetty9-java from backports.
     10xenial may be copied to yakkety, zesty.
    511
    612tails-jessie and tails-wheezy are currently the same as
  • debian-alt/doc/dependencies.txt

    r072d990 r0703a29  
    4242  In non-Debian builds we bundle the source code; it's removed in the Debian source package.
    4343
    44 * libjetty8-java
    45   For /usr/share/java/jetty8-*.jar.
     44* libjetty9-java
     45  For /usr/share/java/jetty9-*.jar.
    4646  In non-Debian builds we bundle the jars; it's removed in the Debian source package.
    4747  For some Debian and Ubuntu releases, these seem to be much older than what we're bundling,
     
    5353  Jetty 9 ticket is https://trac.i2p2.de/ticket/1512
    5454  Updating Jetty may break external plugins. Extensive testing is required.
    55   Note that the libjetty8-java dependency brings in libservlet3.0-java which we require.
     55  Note that the libjetty9-java dependency brings in libservlet3.0-java which we require.
    5656
    5757* glassfish-javaee
  • debian-alt/precise/control

    r072d990 r0703a29  
    88Build-Depends: debhelper (>= 7.0.50~)
    99 ,ant (>= 1.8)
    10  ,ant-optional
    1110 ,debconf
    1211 ,openjdk-7-jdk
     
    7776Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends},
    7877 openjdk-8-jre-headless | openjdk-7-jre-headless | java8-runtime-headless | java7-runtime-headless,
    79  libecj-java,
    8078 geoip-database,
    8179 gettext-base,
  • debian-alt/precise/i2p-router.install

    r072d990 r0703a29  
    3535
    3636
    37 # uncomment if not building with libjetty8-java
     37# uncomment if not building with libjetty9-java
    3838# ubuntu: in trusty vivid wily xenial
    3939# debian: in wheezy jessie stretch sid
     
    5252pkg-temp/lib/org.mortbay.jetty.jar usr/share/i2p/lib
    5353pkg-temp/lib/org.mortbay.jmx.jar usr/share/i2p/lib
    54 # following two are from libservlet3.0-java which is a dependency of libjetty8-java
    55 pkg-temp/lib/javax.servlet.jar usr/share/i2p/lib
    5654
    5755
    58 # uncomment if not building with either libtomcat6-java or libtomcat7-java
     56# uncomment if not building with libtomcat8-java
    5957pkg-temp/lib/commons-el.jar usr/share/i2p/lib
    6058# legacy name, contains only tomcat-juli, not commons-logging
    6159pkg-temp/lib/commons-logging.jar usr/share/i2p/lib
    6260pkg-temp/lib/jasper-runtime.jar usr/share/i2p/lib
     61pkg-temp/lib/javax.servlet.jar usr/share/i2p/lib
    6362
    6463
  • debian-alt/precise/i2p-router.links

    r072d990 r0703a29  
    44usr/share/common-licenses/BSD usr/share/doc/i2p-router/licenses/LICENSE-BSD.txt
    55
    6 usr/share/java/eclipse-ecj.jar usr/share/i2p/lib/eclipse-ecj.jar
     6
     7# comment out if not building with libjetty9-java
     8# ubuntu: in trusty vivid wily xenial
     9# debian: in wheezy jessie stretch sid
     10#usr/share/java/jetty9-continuation.jar usr/share/i2p/lib/jetty-continuation.jar
     11#usr/share/java/jetty9-deploy.jar usr/share/i2p/lib/jetty-deploy.jar
     12#usr/share/java/jetty9-http.jar usr/share/i2p/lib/jetty-http.jar
     13#usr/share/java/jetty9-io.jar usr/share/i2p/lib/jetty-io.jar
     14# legacy name in lib/
     15#usr/share/java/jetty9-rewrite.jar usr/share/i2p/lib/jetty-rewrite-handler.jar
     16#usr/share/java/jetty9-security.jar usr/share/i2p/lib/jetty-security.jar
     17#usr/share/java/jetty9-servlet.jar usr/share/i2p/lib/jetty-servlet.jar
     18#usr/share/java/jetty9-servlets.jar usr/share/i2p/lib/jetty-servlets.jar
     19#usr/share/java/jetty9-start.jar usr/share/i2p/lib/jetty-start.jar
     20#usr/share/java/jetty9-util.jar usr/share/i2p/lib/jetty-util.jar
     21#usr/share/java/jetty9-webapp.jar usr/share/i2p/lib/jetty-webapp.jar
     22#usr/share/java/jetty9-xml.jar usr/share/i2p/lib/jetty-xml.jar
     23# legacy name in lib/
     24#usr/share/java/jetty9-server.jar usr/share/i2p/lib/org.mortbay.jetty.jar
     25# legacy name in lib/
     26#usr/share/java/jetty9-jmx.jar usr/share/i2p/lib/org.mortbay.jmx.jar
     27# following two are from libservlet3.1-java which is a dependency of libjetty9-java
     28# legacy name in lib/
     29#usr/share/java/servlet-api-3.1.jar usr/share/i2p/lib/javax.servlet.jar
     30# combined into javax.servlet.jar in non-package builds
     31#usr/share/java/jsp-api-2.3.jar usr/share/i2p/lib/jsp-api.jar
    732
    833
    9 # comment out if not building with libjetty8-java
    10 # ubuntu: in trusty vivid wily xenial
    11 # debian: in wheezy jessie stretch sid
    12 #usr/share/java/jetty8-continuation.jar usr/share/i2p/lib/jetty-continuation.jar
    13 #usr/share/java/jetty8-deploy.jar usr/share/i2p/lib/jetty-deploy.jar
    14 #usr/share/java/jetty8-http.jar usr/share/i2p/lib/jetty-http.jar
    15 #usr/share/java/jetty8-io.jar usr/share/i2p/lib/jetty-io.jar
     34# comment out if not building with libtomcat8-java
     35# ubuntu: only in xenial+
     36# debian: wheezy-backports, jessie+
     37# legacy name, contains only tomcat-juli, not commons-logging
     38#usr/share/java/tomcat8-juli.jar usr/share/i2p/lib/commons-logging.jar
     39#usr/share/java/tomcat8-jasper.jar usr/share/i2p/lib/jasper-runtime.jar
     40# combined into jasper-runtime.jar in non-package builds
     41#usr/share/java/tomcat8-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
     42#usr/share/java/tomcat8-api.jar usr/share/i2p/lib/tomcat-api.jar
     43#usr/share/java/tomcat8-util.jar usr/share/i2p/lib/tomcat-util.jar
     44#usr/share/java/tomcat8-util-scan.jar usr/share/i2p/lib/tomcat-util-scan.jar
     45# combined into commons-el.jar in non-package builds
     46#usr/share/java/tomcat8-jasper-el.jar usr/share/i2p/lib/jasper-el.jar
    1647# legacy name in lib/
    17 #usr/share/java/jetty8-rewrite.jar usr/share/i2p/lib/jetty-rewrite-handler.jar
    18 #usr/share/java/jetty8-security.jar usr/share/i2p/lib/jetty-security.jar
    19 #usr/share/java/jetty8-servlet.jar usr/share/i2p/lib/jetty-servlet.jar
    20 #usr/share/java/jetty8-servlets.jar usr/share/i2p/lib/jetty-servlets.jar
    21 #usr/share/java/jetty8-start.jar usr/share/i2p/lib/jetty-start.jar
    22 #usr/share/java/jetty8-util.jar usr/share/i2p/lib/jetty-util.jar
    23 #usr/share/java/jetty8-webapp.jar usr/share/i2p/lib/jetty-webapp.jar
    24 #usr/share/java/jetty8-xml.jar usr/share/i2p/lib/jetty-xml.jar
    25 # legacy name in lib/
    26 #usr/share/java/jetty8-server.jar usr/share/i2p/lib/org.mortbay.jetty.jar
    27 # legacy name in lib/
    28 #usr/share/java/jetty8-jmx.jar usr/share/i2p/lib/org.mortbay.jmx.jar
    29 # following two are from libservlet3.0-java which is a dependency of libjetty8-java
    30 # legacy name in lib/
    31 #usr/share/java/servlet-api-3.0.jar usr/share/i2p/lib/javax.servlet.jar
    32 # combined into javax.servlet.jar in non-package builds
    33 #usr/share/java/jsp-api-2.2.jar usr/share/i2p/lib/jsp-api.jar
    34 
    35 
    36 # comment out if not building with libtomcat6-java
    37 # ubuntu: only in precise trusty vivid
    38 # debian: only in wheezy
    39 # legacy name, contains only tomcat-juli, not commons-logging
    40 #usr/share/java/tomcat-juli.jar usr/share/i2p/lib/commons-logging.jar
    41 #usr/share/java/jasper.jar usr/share/i2p/lib/jasper-runtime.jar
    42 # combined into jasper-runtime.jar in non-package builds
    43 #usr/share/java/tomcat-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
    44 # combined into commons-el.jar in non-package builds
    45 #usr/share/java/jasper-el.jar usr/share/i2p/lib/jasper-el.jar
    46 # following is from libservlet2.5-java which is a dependency of libtomcat6-java
    47 # legacy name in lib/
    48 #usr/share/java/el-api-2.1.jar usr/share/i2p/lib/commons-el.jar
    49 
    50 
    51 # comment out if not building with libtomcat7-java
    52 # ubuntu: only in precise trusty vivid
    53 # debian: only in wheezy
    54 # legacy name, contains only tomcat-juli, not commons-logging
    55 #usr/share/java/tomcat-juli.jar usr/share/i2p/lib/commons-logging.jar
    56 #usr/share/java/tomcat-jasper.jar usr/share/i2p/lib/jasper-runtime.jar
    57 # combined into jasper-runtime.jar in non-package builds
    58 #usr/share/java/tomcat-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
    59 # tomcat 7 only
    60 #usr/share/java/tomcat-api.jar usr/share/i2p/lib/tomcat-api.jar
    61 #usr/share/java/tomcat-util.jar usr/share/i2p/lib/tomcat-util.jar
    62 # combined into commons-el.jar in non-package builds
    63 #usr/share/java/tomcat-jasper-el.jar usr/share/i2p/lib/jasper-el.jar
    64 # following is from libservlet3.0-java which is a dependency of libtomcat7-java
    65 # legacy name in lib/
    66 #usr/share/java/el-api-2.2.jar usr/share/i2p/lib/commons-el.jar
     48#usr/share/java/tomcat8-el-api.jar usr/share/i2p/lib/commons-el.jar
     49#usr/share/java/tomcat8-servlet-api.jar usr/share/i2p/lib/javax.servlet.jar
     50#usr/share/java/tomcat8-jsp-api.jar usr/share/i2p/lib/jsp-api.jar
    6751
    6852
  • debian-alt/precise/rules

    r072d990 r0703a29  
    8585        @/bin/echo -e "with-geoip-database=true" >> $(CURDIR)/override.properties
    8686
    87         @# ubuntu: not in precise
    88         @# debian: in wheezy jessie stretch sid
    89         @#/bin/echo -e "with-libjetty8-java=true" >> $(CURDIR)/override.properties
     87        @# ubuntu: in xenial
     88        @# debian: in jessie-backports stretch sid
     89        @#/bin/echo -e "with-libjetty9-java=true" >> $(CURDIR)/override.properties
    9090        @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    91         @#ln -sf /usr/share/java/jetty8-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
    92         @#ln -sf /usr/share/java/jetty8-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
    93         @#ln -sf /usr/share/java/jetty8-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
    94         @#ln -sf /usr/share/java/jetty8-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
    95         @#ln -sf /usr/share/java/jetty8-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
    96         @#ln -sf /usr/share/java/jetty8-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
    97         @#ln -sf /usr/share/java/jetty8-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
    98         @#ln -sf /usr/share/java/jetty8-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
    99         @#ln -sf /usr/share/java/jetty8-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
    100         @#ln -sf /usr/share/java/jetty8-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
    101         @#ln -sf /usr/share/java/jetty8-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
    102         @#ln -sf /usr/share/java/jetty8-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
    103         @#ln -sf /usr/share/java/jetty8-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
    104         @#ln -sf /usr/share/java/jetty8-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
    105         @# following two are from libservlet3.0-java which is a dependency of libjetty8-java
    106         @#ln -sf /usr/share/java/servlet-api-3.0.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
    107         @#ln -sf /usr/share/java/jsp-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
    108 
    109         @# ubuntu: only in precise trusty vivid
    110         @# debian: only in wheezy
    111         @#@/bin/echo -e "with-libtomcat6-java=true" >> $(CURDIR)/override.properties
     91        @#ln -sf /usr/share/java/jetty9-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
     92        @#ln -sf /usr/share/java/jetty9-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
     93        @#ln -sf /usr/share/java/jetty9-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
     94        @#ln -sf /usr/share/java/jetty9-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
     95        @#ln -sf /usr/share/java/jetty9-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
     96        @#ln -sf /usr/share/java/jetty9-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
     97        @#ln -sf /usr/share/java/jetty9-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
     98        @#ln -sf /usr/share/java/jetty9-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
     99        @#ln -sf /usr/share/java/jetty9-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
     100        @#ln -sf /usr/share/java/jetty9-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
     101        @#ln -sf /usr/share/java/jetty9-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
     102        @#ln -sf /usr/share/java/jetty9-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
     103        @#ln -sf /usr/share/java/jetty9-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
     104        @#ln -sf /usr/share/java/jetty9-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
     105        @# following two are from libservlet3.1-java which is a dependency of libjetty9-java
     106        @#ln -sf /usr/share/java/servlet-api-3.1.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
     107        @#ln -sf /usr/share/java/jsp-api-2.3.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
     108
     109        @# debian and ubuntu: wheezy-backports, jessie+, xenial+
     110        @#/bin/echo -e "with-libtomcat8-java=true" >> $(CURDIR)/override.properties
    112111        @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    113         @#ln -sf /usr/share/java/jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    114         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    115         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    116         @#ln -sf /usr/share/java/jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    117         @# following is from libservlet2.5-java which is a dependency of libtomcat6-java
    118         @#ln -sf /usr/share/java/el-api-2.1.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
    119 
    120         @# debian and ubuntu: everywhere
    121         @#/bin/echo -e "with-libtomcat7-java=true" >> $(CURDIR)/override.properties
    122         @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    123         @#ln -sf /usr/share/java/tomcat-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    124         @#ln -sf /usr/share/java/tomcat-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
    125         @#ln -sf /usr/share/java/tomcat-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
    126         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    127         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    128         @#ln -sf /usr/share/java/tomcat-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    129         @# following is from libservlet3.0-java which is a dependency of libtomcat7-java
    130         @#ln -sf /usr/share/java/el-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     112        @#ln -sf /usr/share/java/tomcat8-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
     113        @#ln -sf /usr/share/java/tomcat8-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
     114        @#ln -sf /usr/share/java/tomcat8-el-api.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     115        @#ln -sf /usr/share/java/tomcat8-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
     116        @#ln -sf /usr/share/java/tomcat8-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
     117        @#ln -sf /usr/share/java/tomcat8-jsp-api.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
     118        @#ln -sf /usr/share/java/tomcat8-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
     119        @#ln -sf /usr/share/java/tomcat8-servlet-api.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
     120        @#ln -sf /usr/share/java/tomcat8-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
     121        @#ln -sf /usr/share/java/tomcat8-util-scan.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util-scan.jar
    131122
    132123        @# debian and ubuntu: everywhere
  • debian-alt/trusty/rules

    r072d990 r0703a29  
    8484        @/bin/echo -e "with-geoip-database=true" >> $(CURDIR)/override.properties
    8585
    86         @# ubuntu: not in precise
    87         @# debian: in wheezy jessie stretch sid
    88         @/bin/echo -e "with-libjetty8-java=true" >> $(CURDIR)/override.properties
    89         mkdir -p $(CURDIR)/apps/jetty/jettylib
    90         ln -sf /usr/share/java/jetty8-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
    91         ln -sf /usr/share/java/jetty8-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
    92         ln -sf /usr/share/java/jetty8-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
    93         ln -sf /usr/share/java/jetty8-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
    94         ln -sf /usr/share/java/jetty8-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
    95         ln -sf /usr/share/java/jetty8-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
    96         ln -sf /usr/share/java/jetty8-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
    97         ln -sf /usr/share/java/jetty8-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
    98         ln -sf /usr/share/java/jetty8-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
    99         ln -sf /usr/share/java/jetty8-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
    100         ln -sf /usr/share/java/jetty8-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
    101         ln -sf /usr/share/java/jetty8-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
    102         ln -sf /usr/share/java/jetty8-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
    103         ln -sf /usr/share/java/jetty8-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
    104         @# following two are from libservlet3.0-java which is a dependency of libjetty8-java
    105         ln -sf /usr/share/java/servlet-api-3.0.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
    106         ln -sf /usr/share/java/jsp-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
    107 
    108         @# ubuntu: only in precise trusty vivid
    109         @# debian: only in wheezy
    110         @#@/bin/echo -e "with-libtomcat6-java=true" >> $(CURDIR)/override.properties
     86        @# ubuntu: in xenial
     87        @# debian: in jessie-backports stretch sid
     88        @#/bin/echo -e "with-libjetty9-java=true" >> $(CURDIR)/override.properties
    11189        @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    112         @#ln -sf /usr/share/java/jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    113         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    114         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    115         @#ln -sf /usr/share/java/jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    116         @# following is from libservlet2.5-java which is a dependency of libtomcat6-java
    117         @#ln -sf /usr/share/java/el-api-2.1.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
    118 
    119         @# debian and ubuntu: everywhere
    120         @#/bin/echo -e "with-libtomcat7-java=true" >> $(CURDIR)/override.properties
     90        @#ln -sf /usr/share/java/jetty9-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
     91        @#ln -sf /usr/share/java/jetty9-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
     92        @#ln -sf /usr/share/java/jetty9-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
     93        @#ln -sf /usr/share/java/jetty9-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
     94        @#ln -sf /usr/share/java/jetty9-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
     95        @#ln -sf /usr/share/java/jetty9-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
     96        @#ln -sf /usr/share/java/jetty9-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
     97        @#ln -sf /usr/share/java/jetty9-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
     98        @#ln -sf /usr/share/java/jetty9-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
     99        @#ln -sf /usr/share/java/jetty9-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
     100        @#ln -sf /usr/share/java/jetty9-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
     101        @#ln -sf /usr/share/java/jetty9-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
     102        @#ln -sf /usr/share/java/jetty9-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
     103        @#ln -sf /usr/share/java/jetty9-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
     104        @# following two are from libservlet3.1-java which is a dependency of libjetty9-java
     105        @#ln -sf /usr/share/java/servlet-api-3.1.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
     106        @#ln -sf /usr/share/java/jsp-api-2.3.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
     107
     108        @# debian and ubuntu: wheezy-backports, jessie+, xenial+
     109        @#/bin/echo -e "with-libtomcat8-java=true" >> $(CURDIR)/override.properties
    121110        @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    122         @#ln -sf /usr/share/java/tomcat-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    123         @#ln -sf /usr/share/java/tomcat-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
    124         @#ln -sf /usr/share/java/tomcat-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
    125         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    126         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    127         @#ln -sf /usr/share/java/tomcat-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    128         @# following is from libservlet3.0-java which is a dependency of libtomcat7-java
    129         @#ln -sf /usr/share/java/el-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     111        @#ln -sf /usr/share/java/tomcat8-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
     112        @#ln -sf /usr/share/java/tomcat8-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
     113        @#ln -sf /usr/share/java/tomcat8-el-api.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     114        @#ln -sf /usr/share/java/tomcat8-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
     115        @#ln -sf /usr/share/java/tomcat8-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
     116        @#ln -sf /usr/share/java/tomcat8-jsp-api.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
     117        @#ln -sf /usr/share/java/tomcat8-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
     118        @#ln -sf /usr/share/java/tomcat8-servlet-api.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
     119        @#ln -sf /usr/share/java/tomcat8-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
     120        @#ln -sf /usr/share/java/tomcat8-util-scan.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util-scan.jar
    130121
    131122        @# debian and ubuntu: everywhere
  • debian-alt/wheezy/control

    r072d990 r0703a29  
    11Source: i2p
    2 Maintainer: Kill Your TV <killyourtv@i2pmail.org>
     2Maintainer: zzz <zzz@i2pmail.org>
    33Section: net
    44Standards-Version: 3.9.6
     
    88Build-Depends: debhelper (>= 7.0.50~)
    99 ,ant (>= 1.8)
    10  ,ant-optional
    1110 ,debconf
    12  ,default-jdk | openjdk-7-jdk | openjdk-6-jdk
     11 ,default-jdk | openjdk-7-jdk
     12 ,libtomcat8-java
     13 ,glassfish-javaee
    1314 ,gettext
    1415 ,dh-apparmor
     
    7273Priority: optional
    7374Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends},
    74  openjdk-8-jre-headless | openjdk-7-jre-headless | openjdk-6-jre-headless | default-jre-headless | java8-runtime-headless | java7-runtime-headless | java6-runtime-headless, libecj-java
     75 openjdk-8-jre-headless | openjdk-7-jre-headless | java8-runtime-headless | java7-runtime-headless,
     76 libtomcat8-java,
     77 geoip-database,
     78 gettext-base,
     79 libgetopt-java,
     80 glassfish-javaee
    7581Replaces: i2p ( << 0.8.6-5)
    7682Breaks: i2p (<< 0.8.6-5)
  • debian-alt/xenial/control

    r072d990 r0703a29  
    88Build-Depends: debhelper (>= 7.0.50~)
    99 ,ant (>= 1.8)
    10  ,ant-optional
    1110 ,debconf
    1211 ,openjdk-8-jdk
     12 ,libjetty9-java
    1313 ,glassfish-javaee
     14 ,libtomcat8-java
    1415 ,dh-apparmor
    1516 ,gettext
     
    7475Depends: ${misc:Depends}, ${java:Depends}, ${shlibs:Depends},
    7576 openjdk-8-jre-headless | java8-runtime-headless,
    76  libecj-java,
     77 libjetty9-java,
     78 glassfish-javaee,
     79 libtomcat8-java,
    7780 geoip-database,
    7881 gettext-base,
    7982 libgetopt-java,
    80  glassfish-javaee
    8183Replaces: i2p ( << 0.8.6-5)
    8284Breaks: i2p (<< 0.8.6-5)
  • debian-alt/xenial/rules

    r072d990 r0703a29  
    8484        @/bin/echo -e "with-geoip-database=true" >> $(CURDIR)/override.properties
    8585
    86         @# ubuntu: not in precise
    87         @# debian: in wheezy jessie stretch sid
    88         @/bin/echo -e "with-libjetty8-java=true" >> $(CURDIR)/override.properties
     86        @# ubuntu: in xenial
     87        @# debian: in jessie-backports stretch sid
     88        @/bin/echo -e "with-libjetty9-java=true" >> $(CURDIR)/override.properties
    8989        mkdir -p $(CURDIR)/apps/jetty/jettylib
    90         ln -sf /usr/share/java/jetty8-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
    91         ln -sf /usr/share/java/jetty8-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
    92         ln -sf /usr/share/java/jetty8-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
    93         ln -sf /usr/share/java/jetty8-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
    94         ln -sf /usr/share/java/jetty8-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
    95         ln -sf /usr/share/java/jetty8-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
    96         ln -sf /usr/share/java/jetty8-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
    97         ln -sf /usr/share/java/jetty8-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
    98         ln -sf /usr/share/java/jetty8-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
    99         ln -sf /usr/share/java/jetty8-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
    100         ln -sf /usr/share/java/jetty8-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
    101         ln -sf /usr/share/java/jetty8-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
    102         ln -sf /usr/share/java/jetty8-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
    103         ln -sf /usr/share/java/jetty8-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
    104         @# following two are from libservlet3.0-java which is a dependency of libjetty8-java
    105         ln -sf /usr/share/java/servlet-api-3.0.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
    106         ln -sf /usr/share/java/jsp-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
    107 
    108         @# ubuntu: only in precise trusty vivid
    109         @# debian: only in wheezy
    110         @#@/bin/echo -e "with-libtomcat6-java=true" >> $(CURDIR)/override.properties
    111         @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    112         @#ln -sf /usr/share/java/jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    113         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    114         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    115         @#ln -sf /usr/share/java/jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    116         @# following is from libservlet2.5-java which is a dependency of libtomcat6-java
    117         @#ln -sf /usr/share/java/el-api-2.1.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
    118 
    119         @# debian and ubuntu: everywhere
    120         @#/bin/echo -e "with-libtomcat7-java=true" >> $(CURDIR)/override.properties
    121         @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    122         @#ln -sf /usr/share/java/tomcat-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    123         @#ln -sf /usr/share/java/tomcat-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
    124         @#ln -sf /usr/share/java/tomcat-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
    125         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    126         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    127         @#ln -sf /usr/share/java/tomcat-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    128         @# following is from libservlet3.0-java which is a dependency of libtomcat7-java
    129         @#ln -sf /usr/share/java/el-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     90        ln -sf /usr/share/java/jetty9-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
     91        ln -sf /usr/share/java/jetty9-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
     92        ln -sf /usr/share/java/jetty9-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
     93        ln -sf /usr/share/java/jetty9-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
     94        ln -sf /usr/share/java/jetty9-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
     95        ln -sf /usr/share/java/jetty9-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
     96        ln -sf /usr/share/java/jetty9-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
     97        ln -sf /usr/share/java/jetty9-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
     98        ln -sf /usr/share/java/jetty9-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
     99        ln -sf /usr/share/java/jetty9-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
     100        ln -sf /usr/share/java/jetty9-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
     101        ln -sf /usr/share/java/jetty9-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
     102        ln -sf /usr/share/java/jetty9-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
     103        ln -sf /usr/share/java/jetty9-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
     104        @# following two are from libservlet3.1-java which is a dependency of libjetty9-java
     105        ln -sf /usr/share/java/servlet-api-3.1.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
     106        @# this is roughly the same as tomcat8-jsp-api.jar, we use this one
     107        ln -sf /usr/share/java/jsp-api-2.3.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
     108
     109        @# debian and ubuntu: wheezy-backports, jessie+, xenial+
     110        @/bin/echo -e "with-libtomcat8-java=true" >> $(CURDIR)/override.properties
     111        mkdir -p $(CURDIR)/apps/jetty/jettylib
     112        ln -sf /usr/share/java/tomcat8-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
     113        ln -sf /usr/share/java/tomcat8-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
     114        ln -sf /usr/share/java/tomcat8-el-api.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     115        ln -sf /usr/share/java/tomcat8-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
     116        ln -sf /usr/share/java/tomcat8-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
     117        ln -sf /usr/share/java/tomcat8-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
     118        ln -sf /usr/share/java/tomcat8-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
     119        ln -sf /usr/share/java/tomcat8-util-scan.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util-scan.jar
    130120
    131121        @# debian and ubuntu: everywhere
  • debian/control

    r072d990 r0703a29  
    88Build-Depends: debhelper (>= 7.0.50~)
    99 ,ant (>= 1.8)
    10  ,ant-optional
    1110 ,debconf
    1211 ,openjdk-7-jdk
    13  ,libjetty8-java, libservlet3.0-java
     12 ,libjetty9-java
    1413 ,glassfish-javaee
     14 ,libtomcat8-java
    1515 ,dh-apparmor
    1616 ,gettext
     
    8080 gettext-base,
    8181 libgetopt-java,
    82  libjetty8-java, libservlet3.0-java,
    83  glassfish-javaee
     82 libjetty9-java,
     83 glassfish-javaee,
     84 libtomcat8-java
    8485Replaces: i2p ( << 0.8.6-5)
    8586Breaks: i2p (<< 0.8.6-5)
  • debian/i2p-router.install

    r072d990 r0703a29  
    3535
    3636
    37 # uncomment if not building with libjetty8-java
     37# uncomment if not building with libjetty9-java
    3838# ubuntu: in trusty vivid wily xenial
    3939# debian: in wheezy jessie stretch sid
     
    5252#pkg-temp/lib/org.mortbay.jetty.jar usr/share/i2p/lib
    5353#pkg-temp/lib/org.mortbay.jmx.jar usr/share/i2p/lib
    54 # following two are from libservlet3.0-java which is a dependency of libjetty8-java
     54# following two are from libservlet3.0-java which is a dependency of libjetty9-java
    5555#pkg-temp/lib/javax.servlet.jar usr/share/i2p/lib
    5656
    5757
    58 # uncomment if not building with either libtomcat6-java or libtomcat7-java
    59 pkg-temp/lib/commons-el.jar usr/share/i2p/lib
     58# uncomment if not building with libtomcat8-java
     59#pkg-temp/lib/commons-el.jar usr/share/i2p/lib
    6060# legacy name, contains only tomcat-juli, not commons-logging
    61 pkg-temp/lib/commons-logging.jar usr/share/i2p/lib
    62 pkg-temp/lib/jasper-runtime.jar usr/share/i2p/lib
     61#pkg-temp/lib/commons-logging.jar usr/share/i2p/lib
     62#pkg-temp/lib/jasper-runtime.jar usr/share/i2p/lib
    6363
    6464
  • debian/i2p-router.links

    r072d990 r0703a29  
    77
    88
    9 # comment out if not building with libjetty8-java
     9# comment out if not building with libjetty9-java
    1010# ubuntu: in trusty vivid wily xenial
    1111# debian: in wheezy jessie stretch sid
    12 usr/share/java/jetty8-continuation.jar usr/share/i2p/lib/jetty-continuation.jar
    13 usr/share/java/jetty8-deploy.jar usr/share/i2p/lib/jetty-deploy.jar
    14 usr/share/java/jetty8-http.jar usr/share/i2p/lib/jetty-http.jar
    15 usr/share/java/jetty8-io.jar usr/share/i2p/lib/jetty-io.jar
     12usr/share/java/jetty9-apache-jsp.jar usr/share/i2p/lib/jetty-apache-jsp.jar
     13usr/share/java/jetty9-continuation.jar usr/share/i2p/lib/jetty-continuation.jar
     14usr/share/java/jetty9-deploy.jar usr/share/i2p/lib/jetty-deploy.jar
     15usr/share/java/jetty9-http.jar usr/share/i2p/lib/jetty-http.jar
     16usr/share/java/jetty9-io.jar usr/share/i2p/lib/jetty-io.jar
    1617# legacy name in lib/
    17 usr/share/java/jetty8-rewrite.jar usr/share/i2p/lib/jetty-rewrite-handler.jar
    18 usr/share/java/jetty8-security.jar usr/share/i2p/lib/jetty-security.jar
    19 usr/share/java/jetty8-servlet.jar usr/share/i2p/lib/jetty-servlet.jar
    20 usr/share/java/jetty8-servlets.jar usr/share/i2p/lib/jetty-servlets.jar
    21 usr/share/java/jetty8-start.jar usr/share/i2p/lib/jetty-start.jar
    22 usr/share/java/jetty8-util.jar usr/share/i2p/lib/jetty-util.jar
    23 usr/share/java/jetty8-webapp.jar usr/share/i2p/lib/jetty-webapp.jar
    24 usr/share/java/jetty8-xml.jar usr/share/i2p/lib/jetty-xml.jar
     18usr/share/java/jetty9-rewrite.jar usr/share/i2p/lib/jetty-rewrite-handler.jar
     19usr/share/java/jetty9-security.jar usr/share/i2p/lib/jetty-security.jar
     20usr/share/java/jetty9-servlet.jar usr/share/i2p/lib/jetty-servlet.jar
     21usr/share/java/jetty9-servlets.jar usr/share/i2p/lib/jetty-servlets.jar
     22usr/share/java/jetty9-start.jar usr/share/i2p/lib/jetty-start.jar
     23usr/share/java/jetty9-util.jar usr/share/i2p/lib/jetty-util.jar
     24usr/share/java/jetty9-webapp.jar usr/share/i2p/lib/jetty-webapp.jar
     25usr/share/java/jetty9-xml.jar usr/share/i2p/lib/jetty-xml.jar
    2526# legacy name in lib/
    26 usr/share/java/jetty8-server.jar usr/share/i2p/lib/org.mortbay.jetty.jar
     27usr/share/java/jetty9-server.jar usr/share/i2p/lib/org.mortbay.jetty.jar
    2728# legacy name in lib/
    28 usr/share/java/jetty8-jmx.jar usr/share/i2p/lib/org.mortbay.jmx.jar
    29 # following two are from libservlet3.0-java which is a dependency of libjetty8-java
     29usr/share/java/jetty9-jmx.jar usr/share/i2p/lib/org.mortbay.jmx.jar
     30# following two are from libservlet3.1-java which is a dependency of libjetty9-java
    3031# legacy name in lib/
    31 usr/share/java/servlet-api-3.0.jar usr/share/i2p/lib/javax.servlet.jar
     32usr/share/java/servlet-api-3.1.jar usr/share/i2p/lib/javax.servlet.jar
    3233# combined into javax.servlet.jar in non-package builds
    33 usr/share/java/jsp-api-2.2.jar usr/share/i2p/lib/jsp-api.jar
    34 
    35 
    36 # comment out if not building with libtomcat6-java
    37 # ubuntu: only in precise trusty vivid
    38 # debian: only in wheezy
    39 # legacy name, contains only tomcat-juli, not commons-logging
    40 #usr/share/java/tomcat-juli.jar usr/share/i2p/lib/commons-logging.jar
    41 #usr/share/java/jasper.jar usr/share/i2p/lib/jasper-runtime.jar
    42 # combined into jasper-runtime.jar in non-package builds
    43 #usr/share/java/tomcat-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
    44 # combined into commons-el.jar in non-package builds
    45 #usr/share/java/jasper-el.jar usr/share/i2p/lib/jasper-el.jar
    46 # following is from libservlet2.5-java which is a dependency of libtomcat6-java
    47 # legacy name in lib/
    48 #usr/share/java/el-api-2.1.jar usr/share/i2p/lib/commons-el.jar
    49 
    50 
    51 # comment out if not building with libtomcat7-java
    52 # ubuntu: only in precise trusty vivid
    53 # debian: only in wheezy
    54 # legacy name, contains only tomcat-juli, not commons-logging
    55 #usr/share/java/tomcat-juli.jar usr/share/i2p/lib/commons-logging.jar
    56 #usr/share/java/tomcat-jasper.jar usr/share/i2p/lib/jasper-runtime.jar
    57 # combined into jasper-runtime.jar in non-package builds
    58 #usr/share/java/tomcat-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
    59 # tomcat 7 only
    60 #usr/share/java/tomcat-api.jar usr/share/i2p/lib/tomcat-api.jar
    61 #usr/share/java/tomcat-util.jar usr/share/i2p/lib/tomcat-util.jar
    62 # combined into commons-el.jar in non-package builds
    63 #usr/share/java/tomcat-jasper-el.jar usr/share/i2p/lib/jasper-el.jar
    64 # following is from libservlet3.0-java which is a dependency of libtomcat7-java
    65 # legacy name in lib/
    66 #usr/share/java/el-api-2.2.jar usr/share/i2p/lib/commons-el.jar
     34usr/share/java/jsp-api-2.3.jar usr/share/i2p/lib/jsp-api.jar
    6735
    6836
     
    7139# debian: wheezy-backports, jessie+
    7240# legacy name, contains only tomcat-juli, not commons-logging
    73 #usr/share/java/tomcat8-juli.jar usr/share/i2p/lib/commons-logging.jar
    74 #usr/share/java/tomcat8-jasper.jar usr/share/i2p/lib/jasper-runtime.jar
     41usr/share/java/tomcat8-juli.jar usr/share/i2p/lib/commons-logging.jar
     42usr/share/java/tomcat8-jasper.jar usr/share/i2p/lib/jasper-runtime.jar
    7543# combined into jasper-runtime.jar in non-package builds
    76 #usr/share/java/tomcat8-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
    77 # tomcat 7 only
    78 #usr/share/java/tomcat8-api.jar usr/share/i2p/lib/tomcat-api.jar
    79 #usr/share/java/tomcat8-util.jar usr/share/i2p/lib/tomcat-util.jar
     44usr/share/java/tomcat8-coyote.jar usr/share/i2p/lib/tomcat-coyote.jar
     45usr/share/java/tomcat8-api.jar usr/share/i2p/lib/tomcat-api.jar
     46usr/share/java/tomcat8-util.jar usr/share/i2p/lib/tomcat-util.jar
     47usr/share/java/tomcat8-util-scan.jar usr/share/i2p/lib/tomcat-util-scan.jar
    8048# combined into commons-el.jar in non-package builds
    81 #usr/share/java/tomcat8-jasper-el.jar usr/share/i2p/lib/jasper-el.jar
     49usr/share/java/tomcat8-jasper-el.jar usr/share/i2p/lib/jasper-el.jar
    8250# legacy name in lib/
    83 #usr/share/java/tomcat8-el-api.jar usr/share/i2p/lib/commons-el.jar
     51usr/share/java/tomcat8-el-api.jar usr/share/i2p/lib/commons-el.jar
    8452
    8553
  • debian/rules

    r072d990 r0703a29  
    8484        @/bin/echo -e "with-geoip-database=true" >> $(CURDIR)/override.properties
    8585
    86         @# ubuntu: not in precise
    87         @# debian: in wheezy jessie stretch sid
    88         @/bin/echo -e "with-libjetty8-java=true" >> $(CURDIR)/override.properties
     86        @# ubuntu: in xenial
     87        @# debian: in jessie-backports stretch sid
     88        @/bin/echo -e "with-libjetty9-java=true" >> $(CURDIR)/override.properties
    8989        mkdir -p $(CURDIR)/apps/jetty/jettylib
    90         ln -sf /usr/share/java/jetty8-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
    91         ln -sf /usr/share/java/jetty8-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
    92         ln -sf /usr/share/java/jetty8-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
    93         ln -sf /usr/share/java/jetty8-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
    94         ln -sf /usr/share/java/jetty8-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
    95         ln -sf /usr/share/java/jetty8-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
    96         ln -sf /usr/share/java/jetty8-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
    97         ln -sf /usr/share/java/jetty8-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
    98         ln -sf /usr/share/java/jetty8-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
    99         ln -sf /usr/share/java/jetty8-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
    100         ln -sf /usr/share/java/jetty8-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
    101         ln -sf /usr/share/java/jetty8-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
    102         ln -sf /usr/share/java/jetty8-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
    103         ln -sf /usr/share/java/jetty8-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
    104         @# following two are from libservlet3.0-java which is a dependency of libjetty8-java
    105         ln -sf /usr/share/java/servlet-api-3.0.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
    106         ln -sf /usr/share/java/jsp-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
    107 
    108         @# ubuntu: only in precise trusty vivid
    109         @# debian: only in wheezy
    110         @#@/bin/echo -e "with-libtomcat6-java=true" >> $(CURDIR)/override.properties
    111         @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    112         @#ln -sf /usr/share/java/jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    113         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    114         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    115         @#ln -sf /usr/share/java/jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    116         @# following is from libservlet2.5-java which is a dependency of libtomcat6-java
    117         @#ln -sf /usr/share/java/el-api-2.1.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
    118 
    119         @# debian and ubuntu: everywhere
    120         @#/bin/echo -e "with-libtomcat7-java=true" >> $(CURDIR)/override.properties
    121         @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    122         @#ln -sf /usr/share/java/tomcat-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    123         @#ln -sf /usr/share/java/tomcat-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
    124         @#ln -sf /usr/share/java/tomcat-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
    125         @#ln -sf /usr/share/java/tomcat-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    126         @#ln -sf /usr/share/java/tomcat-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    127         @#ln -sf /usr/share/java/tomcat-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    128         @# following is from libservlet3.0-java which is a dependency of libtomcat7-java
    129         @#ln -sf /usr/share/java/el-api-2.2.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     90        ln -sf /usr/share/java/jetty9-continuation.jar $(CURDIR)/apps/jetty/jettylib/jetty-continuation.jar
     91        ln -sf /usr/share/java/jetty9-deploy.jar $(CURDIR)/apps/jetty/jettylib/jetty-deploy.jar
     92        ln -sf /usr/share/java/jetty9-http.jar $(CURDIR)/apps/jetty/jettylib/jetty-http.jar
     93        ln -sf /usr/share/java/jetty9-io.jar $(CURDIR)/apps/jetty/jettylib/jetty-io.jar
     94        ln -sf /usr/share/java/jetty9-rewrite.jar $(CURDIR)/apps/jetty/jettylib/jetty-rewrite-handler.jar
     95        ln -sf /usr/share/java/jetty9-security.jar $(CURDIR)/apps/jetty/jettylib/jetty-security.jar
     96        ln -sf /usr/share/java/jetty9-servlet.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlet.jar
     97        ln -sf /usr/share/java/jetty9-servlets.jar $(CURDIR)/apps/jetty/jettylib/jetty-servlets.jar
     98        ln -sf /usr/share/java/jetty9-start.jar $(CURDIR)/apps/jetty/jettylib/jetty-start.jar
     99        ln -sf /usr/share/java/jetty9-util.jar $(CURDIR)/apps/jetty/jettylib/jetty-util.jar
     100        ln -sf /usr/share/java/jetty9-webapp.jar $(CURDIR)/apps/jetty/jettylib/jetty-webapp.jar
     101        ln -sf /usr/share/java/jetty9-xml.jar $(CURDIR)/apps/jetty/jettylib/jetty-xml.jar
     102        ln -sf /usr/share/java/jetty9-server.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jetty.jar
     103        ln -sf /usr/share/java/jetty9-jmx.jar $(CURDIR)/apps/jetty/jettylib/org.mortbay.jmx.jar
     104        @# following two are from libservlet3.1-java which is a dependency of libjetty9-java
     105        ln -sf /usr/share/java/servlet-api-3.1.jar $(CURDIR)/apps/jetty/jettylib/javax.servlet.jar
     106        @# this is roughly the same as tomcat8-jsp-api.jar, we use this one
     107        ln -sf /usr/share/java/jsp-api-2.3.jar $(CURDIR)/apps/jetty/jettylib/jsp-api.jar
    130108
    131109        @# debian and ubuntu: wheezy-backports, jessie+, xenial+
    132         @#/bin/echo -e "with-libtomcat8-java=true" >> $(CURDIR)/override.properties
    133         @#mkdir -p $(CURDIR)/apps/jetty/jettylib
    134         @#ln -sf /usr/share/java/tomcat8-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
    135         @#ln -sf /usr/share/java/tomcat8-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
    136         @#ln -sf /usr/share/java/tomcat8-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
    137         @#ln -sf /usr/share/java/tomcat8-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
    138         @#ln -sf /usr/share/java/tomcat8-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
    139         @#ln -sf /usr/share/java/tomcat8-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
    140         @#ln -sf /usr/share/java/tomcat8-el-api.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     110        /bin/echo -e "with-libtomcat8-java=true" >> $(CURDIR)/override.properties
     111        mkdir -p $(CURDIR)/apps/jetty/jettylib
     112        ln -sf /usr/share/java/tomcat8-api.jar $(CURDIR)/apps/jetty/jettylib/tomcat-api.jar
     113        ln -sf /usr/share/java/tomcat8-coyote.jar $(CURDIR)/apps/jetty/jettylib/tomcat-coyote.jar
     114        ln -sf /usr/share/java/tomcat8-el-api.jar $(CURDIR)/apps/jetty/jettylib/commons-el.jar
     115        ln -sf /usr/share/java/tomcat8-jasper.jar $(CURDIR)/apps/jetty/jettylib/jasper-runtime.jar
     116        ln -sf /usr/share/java/tomcat8-jasper-el.jar $(CURDIR)/apps/jetty/jettylib/jasper-el.jar
     117        ln -sf /usr/share/java/tomcat8-juli.jar $(CURDIR)/apps/jetty/jettylib/commons-logging.jar
     118        ln -sf /usr/share/java/tomcat8-util.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util.jar
     119        ln -sf /usr/share/java/tomcat8-util-scan.jar $(CURDIR)/apps/jetty/jettylib/tomcat-util-scan.jar
    141120
    142121        @# debian and ubuntu: everywhere
  • installer/resources/eepsite/jetty-jmx.xml

    r072d990 r0703a29  
    11<?xml version="1.0"?>
    2 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
    33
    4 <!-- ============================================================================ -->
    5 <!-- To correctly start Jetty with JMX module enabled, this configuration         -->
    6 <!-- file must appear first in the list of the configuration files.               -->
    7 <!-- The simplest way to achieve this is to add etc/jetty-jmx.xml as the          -->
    8 <!-- first file in configuration file list at the end of start.ini file.          -->
    9 <!-- ============================================================================ -->
    104<Configure id="Server" class="org.eclipse.jetty.server.Server">
    115
     
    148  <!-- got a misconfigured /etc/hosts entry or the like.           -->
    159  <!-- =========================================================== -->
    16   <!-- 
     10  <!--
    1711  <Call class="java.lang.System" name="setProperty">
    1812    <Arg>java.rmi.server.hostname</Arg>
     
    2014  </Call>
    2115  -->
    22  
     16
    2317  <!-- =========================================================== -->
    24   <!-- Initialize an mbean server                                  -->
     18  <!-- Get the platform mbean server                               -->
    2519  <!-- =========================================================== -->
    2620  <Call id="MBeanServer" class="java.lang.management.ManagementFactory"
     
    2822
    2923  <!-- =========================================================== -->
    30   <!-- Initialize the Jetty MBean container                        -->
     24  <!-- Initialize the Jetty MBean container -->
    3125  <!-- =========================================================== -->
    32   <New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer">
    33     <Arg><Ref id="MBeanServer" /></Arg>
    34     <Call name="start"/>
    35   </New>
    36 
    37   <!-- Add to the Server to listen for object events -->
    38   <Get id="Container" name="container">
    39     <Call name="addEventListener">
    40       <Arg><Ref id="MBeanContainer" /></Arg>
    41     </Call>
    42   </Get>
    43 
    44   <!-- Add to the Server as a managed lifecycle -->
    4526  <Call name="addBean">
    46     <Arg><Ref id="MBeanContainer"/></Arg>
    47     <Arg type="boolean">true</Arg>
     27    <Arg>
     28      <New id="MBeanContainer" class="org.eclipse.jetty.jmx.MBeanContainer">
     29        <Arg>
     30          <Ref refid="MBeanServer" />
     31        </Arg>
     32      </New>
     33    </Arg>
    4834  </Call>
    4935
    5036  <!-- Add the static log -->
    51   <Ref id="MBeanContainer">
    52     <Call name="addBean">
    53       <Arg>
    54         <New class="org.eclipse.jetty.util.log.Log"/>
    55       </Arg>
    56     </Call>
    57   </Ref>
    58  
    59   <!-- In order to connect to the JMX server remotely from a different
    60        process, possibly running on a different host, Jetty JMX module
    61        can create a remote JMX connector. It requires RMI registry to
    62        be started prior to creating the connector server because the
    63        JMX specification uses RMI to facilitate connections.       
    64    -->
    65 
    66   <!-- Optionally start the RMI registry. Normally RMI registry runs on
    67        port 1099. The argument below can be changed in order to comply
    68        with the firewall requirements.
    69   -->
    70   <!--
    71   <Call name="createRegistry" class="java.rmi.registry.LocateRegistry">
    72     <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
    73     <Call name="sleep" class="java.lang.Thread">
    74        <Arg type="java.lang.Integer">1000</Arg>
    75     </Call>
     37  <Call name="addBean">
     38    <Arg>
     39      <New class="org.eclipse.jetty.util.log.Log" />
     40    </Arg>
    7641  </Call>
    77   -->
    78  
    79   <!-- Optionally add a remote JMX connector. The parameters of the constructor
    80        below specify the JMX service URL, and the object name string for the
    81        connector server bean. The parameters of the JMXServiceURL constructor
    82        specify the protocol that clients will use to connect to the remote JMX
    83        connector (RMI), the hostname of the server (local hostname), port number
    84        (automatically assigned), and the URL path. Note that URL path contains
    85        the RMI registry hostname and port number, that may need to be modified
    86        in order to comply with the firewall requirements.
    87   -->
    88   <!--
    89   <New id="ConnectorServer" class="org.eclipse.jetty.jmx.ConnectorServer">
    90     <Arg>
    91       <New class="javax.management.remote.JMXServiceURL">
    92         <Arg type="java.lang.String">rmi</Arg>
    93         <Arg type="java.lang.String" />
    94         <Arg type="java.lang.Integer"><SystemProperty name="jetty.jmxrmiport" default="1099"/></Arg>
    95         <Arg type="java.lang.String">/jndi/rmi://<SystemProperty name="jetty.jmxrmihost" default="localhost"/>:<SystemProperty name="jetty.jmxrmiport" default="1099"/>/jmxrmi</Arg>
    96       </New>
    97     </Arg>
    98     <Arg>org.eclipse.jetty.jmx:name=rmiconnectorserver</Arg>
    99     <Call name="start" />
    100   </New>
    101   -->
    10242</Configure>
    10343
  • installer/resources/eepsite/jetty-rewrite.xml

    r072d990 r0703a29  
    11<?xml version="1.0"?>
    2 <!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
     2<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure_9_0.dtd">
    33
    44<!-- =============================================================== -->
     
    1010
    1111    <!-- =========================================================== -->
    12     <!-- configure rewrite handler                                   --> 
     12    <!-- configure rewrite handler                                   -->
    1313    <!-- =========================================================== -->
    1414    <Get id="oldhandler" name="handler"/>
     
    1616    <Set name="handler">
    1717     <New id="Rewrite" class="org.eclipse.jetty.rewrite.handler.RewriteHandler">
    18       <Set name="handler"><Ref id="oldhandler"/></Set>
     18      <Set name="handler"><Ref refid="oldhandler"/></Set>
    1919      <Set name="rewriteRequestURI">true</Set>
    2020      <Set name="rewritePathInfo">false</Set>
     
    6969        </Arg>
    7070      </Call>
    71      
     71
    7272      <!-- reverse the order of the path sections -->
    7373      <Call name="addRule">
     
    9090        </Arg>
    9191      </Call>
    92      
     92
    9393      <!--  actual redirect, instead of internal rewrite -->
    9494      <Call name="addRule">
     
    114114     </New>
    115115    </Set>
    116    
     116
    117117</Configure>
  • installer/resources/eepsite/jetty-ssl.xml

    r072d990 r0703a29  
    11<?xml version="1.0"?>
    22<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
     3
     4<!-- This configuration supports Jetty 9. Do not remove this line. -->
    35
    46<!-- ========================================================================= -->
     
    176178<Configure id="Server" class="org.eclipse.jetty.server.Server">
    177179
    178   <!-- if NIO is not available, use org.eclipse.jetty.server.ssl.SslSocketConnector -->
    179  
    180   <New id="sslContextFactory" class="org.eclipse.jetty.http.ssl.SslContextFactory">
    181     <Set name="KeyStore">./eepsite/etc/keystore.ks</Set>
     180  <New id="sslContextFactory" class="org.eclipse.jetty.util.ssl.SslContextFactory">
     181    <Set name="KeyStorePath">./eepsite/etc/keystore.ks</Set>
    182182    <Set name="KeyStorePassword">changeit</Set>
    183183    <Set name="KeyManagerPassword">myKeyPassword</Set>
    184     <Set name="TrustStore">./eepsite/etc/keystore.ks</Set>
     184    <Set name="TrustStorePath">./eepsite/etc/keystore.ks</Set>
    185185    <Set name="TrustStorePassword">changeit</Set>
     186    <Set name="ExcludeCipherSuites">
     187      <Array type="java.lang.String">
     188        <Item>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</Item>
     189        <Item>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</Item>
     190        <Item>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</Item>
     191        <Item>SSL_DH_anon_WITH_DES_CBC_SHA</Item>
     192        <Item>SSL_DH_anon_WITH_RC4_128_MD5</Item>
     193        <Item>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</Item>
     194        <Item>SSL_DHE_DSS_WITH_DES_CBC_SHA</Item>
     195        <Item>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
     196        <Item>SSL_DHE_RSA_WITH_DES_CBC_SHA</Item>
     197        <Item>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
     198        <Item>SSL_RSA_EXPORT_WITH_RC4_40_MD5</Item>
     199        <Item>SSL_RSA_WITH_DES_CBC_SHA</Item>
     200        <Item>SSL_RSA_WITH_NULL_MD5</Item>
     201        <Item>SSL_RSA_WITH_NULL_SHA</Item>
     202        <Item>TLS_DH_anon_WITH_AES_128_CBC_SHA</Item>
     203        <Item>TLS_DH_anon_WITH_AES_128_CBC_SHA256</Item>
     204        <Item>TLS_DH_anon_WITH_AES_128_GCM_SHA256</Item>
     205        <Item>TLS_DH_anon_WITH_AES_256_CBC_SHA</Item>
     206        <Item>TLS_DH_anon_WITH_AES_256_CBC_SHA256</Item>
     207        <Item>TLS_DH_anon_WITH_AES_256_GCM_SHA384</Item>
     208        <Item>TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA</Item>
     209        <Item>TLS_ECDH_anon_WITH_AES_128_CBC_SHA</Item>
     210        <Item>TLS_ECDH_anon_WITH_AES_256_CBC_SHA</Item>
     211        <Item>TLS_ECDH_anon_WITH_NULL_SHA</Item>
     212        <Item>TLS_ECDH_anon_WITH_RC4_128_SHA</Item>
     213        <Item>TLS_ECDH_ECDSA_WITH_NULL_SHA</Item>
     214        <Item>TLS_ECDHE_ECDSA_WITH_NULL_SHA</Item>
     215        <Item>TLS_ECDHE_RSA_WITH_NULL_SHA</Item>
     216        <Item>TLS_ECDH_RSA_WITH_NULL_SHA</Item>
     217        <Item>TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5</Item>
     218        <Item>TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA</Item>
     219        <Item>TLS_KRB5_EXPORT_WITH_RC4_40_MD5</Item>
     220        <Item>TLS_KRB5_EXPORT_WITH_RC4_40_SHA</Item>
     221        <Item>TLS_KRB5_WITH_3DES_EDE_CBC_MD5</Item>
     222        <Item>TLS_KRB5_WITH_3DES_EDE_CBC_SHA</Item>
     223        <Item>TLS_KRB5_WITH_DES_CBC_MD5</Item>
     224        <Item>TLS_KRB5_WITH_DES_CBC_SHA</Item>
     225        <Item>TLS_KRB5_WITH_RC4_128_MD5</Item>
     226        <Item>TLS_KRB5_WITH_RC4_128_SHA</Item>
     227        <Item>TLS_RSA_WITH_NULL_SHA256</Item>
     228        <Item>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</Item>
     229        <Item>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
     230        <Item>SSL_RSA_WITH_3DES_EDE_CBC_SHA</Item>
     231        <Item>SSL_RSA_WITH_RC4_128_MD5</Item>
     232        <Item>SSL_RSA_WITH_RC4_128_SHA</Item>
     233        <Item>TLS_ECDH_ECDSA_WITH_RC4_128_SHA</Item>
     234        <Item>TLS_ECDH_RSA_WITH_RC4_128_SHA</Item>
     235        <Item>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA</Item>
     236        <Item>TLS_ECDHE_RSA_WITH_RC4_128_SHA</Item>
     237        <Item>TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA</Item>
     238        <Item>TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA</Item>
     239        <Item>TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA</Item>
     240        <Item>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
     241        <Item>TLS_DHE_DSS_WITH_AES_128_CBC_SHA</Item>
     242        <!-- Please keep this list in sync with the one in I2PSSLSocketFactory -->
     243      </Array>
     244    </Set>
     245    <Set name="ExcludeProtocols">
     246      <Array type="java.lang.String">
     247        <Item>SSLv2Hello</Item>
     248        <Item>SSLv3</Item>
     249      </Array>
     250    </Set>
    186251  </New>
    187252
    188253  <Call name="addConnector">
    189254    <Arg>
    190       <New class="org.eclipse.jetty.server.ssl.SslSelectChannelConnector">
    191         <Arg><Ref id="sslContextFactory" /></Arg>
     255      <New class="org.eclipse.jetty.server.ServerConnector">
     256        <Arg><Ref id="Server" /></Arg>
     257        <Arg type="int">1</Arg>     <!-- number of acceptors -->
     258        <Arg type="int">0</Arg>     <!-- default number of selectors -->
     259        <Arg>
     260           <Array type="org.eclipse.jetty.server.ConnectionFactory">    <!-- varargs so we need an array -->
     261              <Item>
     262                <New class="org.eclipse.jetty.server.SslConnectionFactory">
     263                  <Arg><Ref id="sslContextFactory" /></Arg>
     264                  <Arg>http/1.1</Arg>
     265                </New>
     266              </Item>
     267              <Item>
     268                <New class="org.eclipse.jetty.server.HttpConnectionFactory">
     269                  <Arg>
     270                    <New class="org.eclipse.jetty.server.HttpConfiguration">
     271                      <Set name="sendServerVersion">false</Set>
     272                      <Set name="sendDateHeader">true</Set>
     273                    </New>
     274                  </Arg>
     275                </New>
     276              </Item>
     277            </Array>
     278        </Arg>
    192279        <Set name="host">127.0.0.1</Set>
    193280        <Set name="port">7668</Set>
    194         <Set name="maxIdleTime">600000</Set>
    195         <Set name="useDirectBuffers">false</Set>
    196         <Set name="acceptors">1</Set>
    197         <Set name="statsOn">false</Set>
    198         <Set name="lowResourcesConnections">5000</Set>
    199         <Set name="lowResourcesMaxIdleTime">5000</Set>
    200         <Set name="ExcludeCipherSuites">
    201           <Array type="java.lang.String">
    202             <Item>SSL_DH_anon_EXPORT_WITH_DES40_CBC_SHA</Item>
    203             <Item>SSL_DH_anon_EXPORT_WITH_RC4_40_MD5</Item>
    204             <Item>SSL_DH_anon_WITH_3DES_EDE_CBC_SHA</Item>
    205             <Item>SSL_DH_anon_WITH_DES_CBC_SHA</Item>
    206             <Item>SSL_DH_anon_WITH_RC4_128_MD5</Item>
    207             <Item>SSL_DHE_DSS_EXPORT_WITH_DES40_CBC_SHA</Item>
    208             <Item>SSL_DHE_DSS_WITH_DES_CBC_SHA</Item>
    209             <Item>SSL_DHE_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
    210             <Item>SSL_DHE_RSA_WITH_DES_CBC_SHA</Item>
    211             <Item>SSL_RSA_EXPORT_WITH_DES40_CBC_SHA</Item>
    212             <Item>SSL_RSA_EXPORT_WITH_RC4_40_MD5</Item>
    213             <Item>SSL_RSA_WITH_DES_CBC_SHA</Item>
    214             <Item>SSL_RSA_WITH_NULL_MD5</Item>
    215             <Item>SSL_RSA_WITH_NULL_SHA</Item>
    216             <Item>TLS_DH_anon_WITH_AES_128_CBC_SHA</Item>
    217             <Item>TLS_DH_anon_WITH_AES_128_CBC_SHA256</Item>
    218             <Item>TLS_DH_anon_WITH_AES_128_GCM_SHA256</Item>
    219             <Item>TLS_DH_anon_WITH_AES_256_CBC_SHA</Item>
    220             <Item>TLS_DH_anon_WITH_AES_256_CBC_SHA256</Item>
    221             <Item>TLS_DH_anon_WITH_AES_256_GCM_SHA384</Item>
    222             <Item>TLS_ECDH_anon_WITH_3DES_EDE_CBC_SHA</Item>
    223             <Item>TLS_ECDH_anon_WITH_AES_128_CBC_SHA</Item>
    224             <Item>TLS_ECDH_anon_WITH_AES_256_CBC_SHA</Item>
    225             <Item>TLS_ECDH_anon_WITH_NULL_SHA</Item>
    226             <Item>TLS_ECDH_anon_WITH_RC4_128_SHA</Item>
    227             <Item>TLS_ECDH_ECDSA_WITH_NULL_SHA</Item>
    228             <Item>TLS_ECDHE_ECDSA_WITH_NULL_SHA</Item>
    229             <Item>TLS_ECDHE_RSA_WITH_NULL_SHA</Item>
    230             <Item>TLS_ECDH_RSA_WITH_NULL_SHA</Item>
    231             <Item>TLS_KRB5_EXPORT_WITH_DES_CBC_40_MD5</Item>
    232             <Item>TLS_KRB5_EXPORT_WITH_DES_CBC_40_SHA</Item>
    233             <Item>TLS_KRB5_EXPORT_WITH_RC4_40_MD5</Item>
    234             <Item>TLS_KRB5_EXPORT_WITH_RC4_40_SHA</Item>
    235             <Item>TLS_KRB5_WITH_3DES_EDE_CBC_MD5</Item>
    236             <Item>TLS_KRB5_WITH_3DES_EDE_CBC_SHA</Item>
    237             <Item>TLS_KRB5_WITH_DES_CBC_MD5</Item>
    238             <Item>TLS_KRB5_WITH_DES_CBC_SHA</Item>
    239             <Item>TLS_KRB5_WITH_RC4_128_MD5</Item>
    240             <Item>TLS_KRB5_WITH_RC4_128_SHA</Item>
    241             <Item>TLS_RSA_WITH_NULL_SHA256</Item>
    242             <Item>SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA</Item>
    243             <Item>SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
    244             <Item>SSL_RSA_WITH_3DES_EDE_CBC_SHA</Item>
    245             <Item>SSL_RSA_WITH_RC4_128_MD5</Item>
    246             <Item>SSL_RSA_WITH_RC4_128_SHA</Item>
    247             <Item>TLS_ECDH_ECDSA_WITH_RC4_128_SHA</Item>
    248             <Item>TLS_ECDH_RSA_WITH_RC4_128_SHA</Item>
    249             <Item>TLS_ECDHE_ECDSA_WITH_RC4_128_SHA</Item>
    250             <Item>TLS_ECDHE_RSA_WITH_RC4_128_SHA</Item>
    251             <Item>TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA</Item>
    252             <Item>TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA</Item>
    253             <Item>TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA</Item>
    254             <Item>TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA</Item>
    255             <Item>TLS_DHE_DSS_WITH_AES_128_CBC_SHA</Item>
    256             <!-- Please keep this list in sync with the one in I2PSSLSocketFactory -->
    257           </Array>
    258         </Set>
     281        <Set name="idleTimeout">600000</Set>
    259282      </New>
    260283    </Arg>
  • installer/resources/eepsite/jetty.xml

    r072d990 r0703a29  
    11<?xml version="1.0" encoding="UTF-8" ?>
    22<!DOCTYPE Configure PUBLIC "-//Jetty//Configure//EN" "http://www.eclipse.org/jetty/configure.dtd">
     3
     4<!-- This configuration supports Jetty 9. Do not remove this line. -->
    35
    46<!-- ========================================================================= -->
     
    1315<!--   * docroot: Change the ResourceBase in the contexts/base-context.xml file -->
    1416<!--           to serve files from a different location.                       -->
    15 <!--   * threads: Raise maximumPoolSize in the ThreadPool section              -->
     17<!--   * threads: Raise maxThreads in the ThreadPool section                   -->
    1618<!--           if you have a high-traffic site and get a lot of warnings.      -->
    1719<!--   * Uncomment the addWebApplications section to use to enable             -->
     
    1921<!--   * Uncomment the line to allow Jetty to follow symlinks                  -->
    2022<!--                                                                           -->
    21 <!-- I2P uses Jetty 7. If you need web server features not found               -->
    22 <!-- in Jetty 7, you may install and run Jetty 7 or 8 in a different JVM       -->
     23<!-- I2P uses Jetty 9. If you need web server features not found               -->
     24<!-- in Jetty 9, you may install and run Jetty 7 or 8 in a different JVM       -->
    2325<!-- or run any other web server such as Apache. If you do run another web     -->
    24 <!-- server instead, be sure and disable the Jetty 6 server for your           -->
     26<!-- server instead, be sure and disable the Jetty 9 server for your           -->
    2527<!-- eepsite on http://127.0.0.1:7657/configclients.jsp .                      -->
    2628<!--                                                                           -->
     
    4244<!-- ========================================================================= -->
    4345
    44 <!-- =============================================================== -->
    45 <!-- Configure the Jetty Server                                      -->
    46 <!--                                                                 -->
    47 <!-- Documentation of this file format can be found at:              -->
    48 <!-- http://docs.codehaus.org/display/JETTY/jetty.xml                -->
    49 <!--                                                                 -->
    50 <!-- =============================================================== -->
     46<!-- ========================================================================= -->
     47<!-- Configure the Jetty Server                                                -->
     48<!--                                                                           -->
     49<!-- Documentation of this file format can be found at:                        -->
     50<!-- http://www.eclipse.org/jetty/documentation/current/jetty-xml-config.html  -->
     51<!--                                                                           -->
     52<!-- ========================================================================= -->
    5153
    5254
     
    5658    <!-- Server Thread Pool                                          -->
    5759    <!-- =========================================================== -->
    58     <Set name="ThreadPool">
     60    <Arg>
    5961
    6062      <!-- PICK ONE -->
     
    7274       -->
    7375      <New class="org.eclipse.jetty.util.thread.QueuedThreadPool">
     76        <Arg type="int">20</Arg>     <!-- maxThreads, overridden below -->
     77        <Arg type="int">3</Arg>      <!-- minThreads, overridden below -->
     78        <Arg type="int">60000</Arg>  <!-- maxIdleTimeMs, overridden below -->
    7479        <Arg>
    7580           <New class="java.util.concurrent.LinkedBlockingQueue">
     
    7984        <Set name="minThreads">3</Set>
    8085        <Set name="maxThreads">20</Set>
    81         <Set name="maxIdleTimeMs">60000</Set>
     86        <Set name="idleTimeout">60000</Set>
    8287        <Set name="daemon">true</Set>
    8388        <Set name="name">Eepsite Jetty</Set>
    8489      </New>
    85 
    86       <!-- Optional Java 5 bounded threadpool with job queue
    87            Requests above the max will be rejected and logged.
    88            High-traffic sites should increase maximumPoolSize.
    89 
    90            Args are:
    91              corePoolSize (should be at least 3)
    92              maximumPoolSize
    93              keepAliveTime (milliseconds)
    94              timeout (TimeUnit)
    95              queue (BlockingQueue)
    96 
    97            Not recommended.
    98            ref:
    99            http://trac.i2p2.i2p/ticket/1395
    100            http://docs.oracle.com/javase/6/docs/api/java/util/concurrent/ThreadPoolExecutor.html
    101        -->
    102      <!--
    103       <New class="org.eclipse.jetty.util.thread.ExecutorThreadPool">
    104         <Arg type="int">3</Arg>
    105         <Arg type="int">20</Arg>
    106         <Arg type="long">60000</Arg>
    107         <Arg>
    108             <Call class="java.util.concurrent.TimeUnit" name="valueOf" >
    109                 <Arg>MILLISECONDS</Arg>
    110             </Call>
    111         </Arg>
    112         <Arg>
    113             <New class="java.util.concurrent.SynchronousQueue" />
    114         </Arg>
    115       </New>
    116      -->
    117     </Set>
     90    </Arg>
    11891
    11992
     
    134107    <Call name="addConnector">
    135108      <Arg>
    136           <New class="org.eclipse.jetty.server.nio.SelectChannelConnector">
     109          <New class="org.eclipse.jetty.server.ServerConnector">
     110            <Arg><Ref id="Server" /></Arg>
     111            <Arg type="int">1</Arg>     <!-- number of acceptors -->
     112            <Arg type="int">0</Arg>     <!-- default number of selectors -->
     113            <Arg>
     114              <Array type="org.eclipse.jetty.server.ConnectionFactory">    <!-- varargs so we need an array -->
     115                <Item>
     116                  <New class="org.eclipse.jetty.server.HttpConnectionFactory">
     117                    <Arg>
     118                      <New class="org.eclipse.jetty.server.HttpConfiguration">
     119                        <Set name="sendServerVersion">false</Set>
     120                        <Set name="sendDateHeader">true</Set>
     121                      </New>
     122                    </Arg>
     123                  </New>
     124                </Item>
     125              </Array>
     126            </Arg>
    137127            <Set name="host">127.0.0.1</Set>
    138128            <Set name="port">7658</Set>
    139             <Set name="maxIdleTime">600000</Set>
    140             <Set name="Acceptors">1</Set>
    141             <Set name="statsOn">false</Set>
    142             <Set name="lowResourcesConnections">5000</Set>
    143             <Set name="lowResourcesMaxIdleTime">5000</Set>
    144             <Set name="useDirectBuffers">false</Set>
     129            <Set name="idleTimeout">600000</Set>
    145130          </New>
    146131      </Arg>
    147132    </Call>
    148 
    149     <!-- Recommended to use this connector on Java 5, as
    150          Jetty 6 and Java 5 NIO don't play well together.
    151     -->
    152     <!--
    153     <Call name="addConnector">
    154       <Arg>
    155           <New class="org.eclipse.jetty.server.bio.SocketConnector">
    156             <Set name="host">127.0.0.1</Set>
    157             <Set name="port">7658</Set>
    158             <Set name="maxIdleTime">600000</Set>
    159             <Set name="Acceptors">1</Set>
    160             <Set name="statsOn">false</Set>
    161           </New>
    162       </Arg>
    163     </Call>
    164     -->
    165133
    166134    <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
     
    243211      <Call name="addAppProvider">
    244212        <Arg>
    245           <New class="org.eclipse.jetty.deploy.providers.ContextProvider">
     213          <New class="org.eclipse.jetty.deploy.providers.WebAppProvider">
    246214            <Set name="monitoredDirName">./eepsite/contexts</Set>
    247215            <Set name="scanInterval">120</Set>
     
    333301    <!-- =========================================================== -->
    334302    <Set name="stopAtShutdown">true</Set>
    335     <Set name="sendServerVersion">false</Set>
    336     <Set name="sendDateHeader">true</Set>
    337     <Set name="gracefulShutdown">1000</Set>
     303    <Set name="stopTimeout">1000</Set>
    338304
    339305</Configure>
  • router/java/src/net/i2p/router/startup/MigrateJetty.java

    r072d990 r0703a29  
    77
    88import java.io.File;
     9import java.io.BufferedWriter;
     10import java.io.File;
     11import java.io.FileInputStream;
     12import java.io.OutputStreamWriter;
     13import java.io.IOException;
     14import java.io.PrintWriter;
    915import java.util.List;
    1016
     17import net.i2p.data.DataHelper;
    1118import net.i2p.router.RouterContext;
     19import net.i2p.util.FileUtil;
     20import net.i2p.util.I2PSSLSocketFactory;
     21import net.i2p.util.SecureFileOutputStream;
     22import net.i2p.util.VersionComparator;
    1223
    1324/**
    1425 *  Migrate the clients.config and jetty.xml files
    15  *  from Jetty 5/6 to Jetty 7.
     26 *  from Jetty 5/6 to Jetty 7/8.
     27 *  Also migrate jetty.xml from Jetty 7/8 to Jetty 9.
    1628 *
    1729 *  For each client for class org.mortbay.jetty.Server:
     
    3042 *  Saves new clients.config.
    3143 *
    32  *  Does NOT preserve port number, thread counts, etc.
     44 *  Does NOT preserve port number, thread counts, etc. in the migration to 7/8.
     45 *  DOES preserve everything in the migration to 9.
    3346 *
    3447 *  @since Jetty 6
     
    4356    private static final String TEST_CLASS = "org.eclipse.jetty.server.Server";
    4457    private static final String BACKUP_SUFFIX = ".jetty6";
    45     private static final String JETTY_TEMPLATE_DIR = "eepsite-jetty7";
     58    private static final String BACKUP_SUFFIX_8 = ".jetty8";
     59    private static final String JETTY_TEMPLATE_DIR = "eepsite-jetty9";
    4660    private static final String JETTY_TEMPLATE_PKGDIR = "eepsite";
    4761    private static final String BASE_CONTEXT = "contexts/base-context.xml";
    4862    private static final String CGI_CONTEXT = "contexts/cgi-context.xml";
     63    private static final String PROP_JETTY9_MIGRATED = "router.startup.jetty9.migrated";
    4964   
    5065    /**
     
    5368     */
    5469    public static void migrate(RouterContext ctx, List<ClientAppConfig> apps) {
     70        if (ctx.getBooleanProperty(PROP_JETTY9_MIGRATED))
     71            return;
     72        String installed = ctx.getProperty("router.firstVersion");
     73        if (installed != null && VersionComparator.comp(installed, "0.9.30") >= 0) {
     74            ctx.router().saveConfig(PROP_JETTY9_MIGRATED, "true");
     75            return;
     76        }
    5577        boolean shouldSave = false;
     78        boolean jetty9success = false;
    5679        for (int i = 0; i < apps.size(); i++) {
    5780            ClientAppConfig app = apps.get(i);
    58             if (!(app.className.equals(OLD_CLASS) || app.className.equals(OLD_CLASS_6)))
    59                 continue;
    60             String client = "client application " + i + " [" + app.clientName +
    61                             "] from Jetty 5/6 " + app.className +
    62                             " to Jetty 7 " + NEW_CLASS;
     81            String client;
     82            String backupSuffix;
     83            if (app.className.equals(NEW_CLASS)) {
     84                client = "client application " + i + " [" + app.clientName +
     85                         "] from Jetty 7/8 to Jetty 9";
     86                backupSuffix = BACKUP_SUFFIX_8;
     87            } else if (app.className.equals(OLD_CLASS) || app.className.equals(OLD_CLASS_6)) {
     88                client = "client application " + i + " [" + app.clientName +
     89                         "] from Jetty 5/6 " + app.className +
     90                         " to Jetty 9 " + NEW_CLASS;
     91                backupSuffix = BACKUP_SUFFIX;
     92            } else {
     93                continue;
     94            }
    6395            if (!hasLatestJetty()) {
    6496                System.err.println("WARNING: Jetty 7 unavailable, cannot migrate " + client);
     
    81113            }
    82114            File eepsite = xmlFile.getParentFile();
    83             boolean ok = backupFile(xmlFile);
     115            boolean ok = backupFile(xmlFile, backupSuffix);
    84116            if (!ok) {
    85117                System.err.println("WARNING: Failed to backup up XML file " + xmlFile +
     
    87119                continue;
    88120            }
     121            if (app.className.equals(NEW_CLASS)) {
     122                // Do the migration of 8 to 9, handle additional command-line xml files too
     123                for (int j = 0; j < args.length; j++) {
     124                    if (j > 0) {
     125                        // probably jetty-ssl.xml
     126                        xmlFile = new File(args[j]);
     127                        ok = backupFile(xmlFile, backupSuffix);
     128                        if (!ok) {
     129                            System.err.println("WARNING: Failed to backup up XML file " + xmlFile +
     130                                               ", cannot migrate " + client);
     131                            continue;
     132                        }
     133                    }
     134                    boolean ok9 = migrateToJetty9(xmlFile);
     135                    if (ok9) {
     136                        System.err.println("WARNING: Migrated " + client + ".\n" +
     137                                           "Check the " + xmlFile.getName() + " file in " + eepsite + ".\n" +
     138                                           "Your old " + xmlFile.getName() + " file was backed up to " + xmlFile.getAbsolutePath() + BACKUP_SUFFIX_8);
     139                        jetty9success = true;
     140                    }
     141                }
     142                continue;
     143            }
     144
     145            // Below here is migration of 5/6 to 9
     146
    89147            File baseEep = new File(ctx.getBaseDir(), JETTY_TEMPLATE_DIR);
    90148            // in packages, or perhaps on an uninstall/reinstall, the files are in eepsite/
     
    142200                System.err.println("WARNING: Migrated clients config file " + cfgFile +
    143201                               " from Jetty 5/6 " + OLD_CLASS + '/' + OLD_CLASS_6 +
    144                                " to Jetty 7 " + NEW_CLASS);
    145             }
    146         }
    147     }
    148 
    149     /** do we have Jetty 7? */
     202                               " to Jetty 9 " + NEW_CLASS);
     203            }
     204        }
     205        if (jetty9success)
     206            ctx.router().saveConfig(PROP_JETTY9_MIGRATED, "true");
     207    }
     208
     209    /**
     210     *  Migrate a jetty.xml file to Jetty 9.
     211     *  Unlike above, where we just migrate the new install file over for Jetty 9,
     212     *  here we modify the xml file in-place to preserve settings where possible.
     213     *
     214     *  @return success
     215     *  @since Jetty 9
     216     */
     217    private static boolean migrateToJetty9(File xmlFile) {
     218        if (xmlFile.getName().equals("jetty-jmx.xml")) {
     219            // This is lazy but nobody's using jmx, not worth the trouble
     220            System.err.println("ERROR: Migration  of " + xmlFile +
     221                               " file is not supported. Copy new file from $I2P/eepsite-jetty9/jetty-jmx.xml");
     222            return false;
     223        }
     224        // we don't re-migrate from the template, we just add the
     225        // necessary args for the QueuedThreadPool constructor in-place
     226        // and fixup the renamed set call
     227        boolean modified = false;
     228        File eepsite = xmlFile.getParentFile();
     229        File newFile = new File(eepsite, xmlFile.getName() + System.currentTimeMillis() + ".tmp");
     230        FileInputStream in = null;
     231        PrintWriter out = null;
     232        try {
     233            in = new FileInputStream(xmlFile);
     234            out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(new SecureFileOutputStream(newFile), "UTF-8")));
     235            String s;
     236            boolean foundQTP = false;
     237            boolean foundSTP = false;
     238            boolean foundETP = false;
     239            boolean foundSCC = false;
     240            boolean foundHC = false;
     241            boolean foundSSCC = false;
     242            while ((s = DataHelper.readLine(in)) != null) {
     243                // readLine() doesn't strip \r
     244                if (s.endsWith("\r"))
     245                    s = s.substring(0, s.length() - 1);
     246                if (s.contains("Modified by I2P migration script for Jetty 9.") ||
     247                    s.contains("This configuration supports Jetty 9.") ||
     248                    s.contains("http://www.eclipse.org/jetty/configure_9_0.dtd")) {
     249                    if (!modified)
     250                        break;
     251                    // else we've modified it twice?
     252                } else if (s.contains("org.eclipse.jetty.util.thread.QueuedThreadPool")) {
     253                    foundQTP = true;
     254                } else if (foundQTP) {
     255                    if (!(s.contains("Modified by") || s.contains("<Arg type=\"int\">"))) {
     256                        out.println("        <!-- Modified by I2P migration script for Jetty 9. Do not remove this line -->");
     257                        out.println("        <Arg type=\"int\">20</Arg>     <!-- maxThreads, overridden below -->");
     258                        out.println("        <Arg type=\"int\">3</Arg>      <!-- minThreads, overridden below -->");
     259                        out.println("        <Arg type=\"int\">60000</Arg>  <!-- maxIdleTimeMs, overridden below -->");
     260                        modified = true;
     261                    }
     262                    foundQTP = false;
     263                }
     264                if (s.contains("<Set name=\"maxIdleTimeMs\">")) {
     265                    // <Set name="maxIdleTimeMs">60000</Set>
     266                    s = s.replace("<Set name=\"maxIdleTimeMs\">", "<Set name=\"idleTimeout\">");
     267                    modified = true;
     268                } else if (s.contains("<Set name=\"ThreadPool\">")) {
     269                    // <Set name="ThreadPool">, must be changed to constructor arg
     270                    out.println("    <!-- Modified by I2P migration script for Jetty 9. Do not remove this line -->");
     271                    s = s.replace("<Set name=\"ThreadPool\">", "<Arg>");
     272                    foundSTP = true;
     273                    modified = true;
     274                } else if (foundSTP && !foundETP && s.contains("</Set>") && !s.contains("<Set")) {
     275                    // </Set> (close of <Set name="ThreadPool">)
     276                    // All the lines above have <Set>...</Set> on the same line, if they don't, this will break.
     277                    s = s.replace("</Set>", "</Arg>");
     278                    foundETP = true;
     279                } else if (s.contains("org.eclipse.jetty.server.nio.SelectChannelConnector")) {
     280                    s = s.replace("org.eclipse.jetty.server.nio.SelectChannelConnector", "org.eclipse.jetty.server.ServerConnector");
     281                    out.println("          <!-- Modified by I2P migration script for Jetty 9. Do not remove this line -->");
     282                    out.println(s);
     283                    out.println("            <Arg><Ref id=\"Server\" /></Arg>");
     284                    out.println("            <Arg type=\"int\">1</Arg>     <!-- number of acceptors -->");
     285                    out.println("            <Arg type=\"int\">0</Arg>     <!-- default number of selectors -->");
     286                    out.println("            <Arg>");
     287                    out.println("              <Array type=\"org.eclipse.jetty.server.ConnectionFactory\">    <!-- varargs so we need an array -->");
     288                    out.println("                <Item>");
     289                    out.println("                  <New class=\"org.eclipse.jetty.server.HttpConnectionFactory\">");
     290                    out.println("                    <Arg>");
     291                    out.println("                      <New class=\"org.eclipse.jetty.server.HttpConfiguration\">");
     292                    out.println("                        <Set name=\"sendServerVersion\">false</Set>");
     293                    out.println("                        <Set name=\"sendDateHeader\">true</Set>");
     294                    out.println("                      </New>");
     295                    out.println("                    </Arg>");
     296                    out.println("                  </New>");
     297                    out.println("                </Item>");
     298                    out.println("              </Array>");
     299                    out.println("            </Arg>");
     300                    modified = true;
     301                    continue;
     302             // SSL starts here
     303                } else if (s.contains("org.eclipse.jetty.http.ssl.SslContextFactory")) {
     304                    s = s.replace("org.eclipse.jetty.http.ssl.SslContextFactory", "org.eclipse.jetty.util.ssl.SslContextFactory");
     305                    out.println("  <!-- Modified by I2P migration script for Jetty 9. Do not remove this line -->");
     306                    out.println(s);
     307                    // don't try to migrate from below, just generate a new list
     308                    out.println("    <Set name=\"ExcludeCipherSuites\">");
     309                    out.println("      <Array type=\"java.lang.String\">");
     310                    for (String ss : I2PSSLSocketFactory.EXCLUDE_CIPHERS) {
     311                        out.println("        <Item>" + ss + "</Item>");
     312                    }
     313                    out.println("      </Array>");
     314                    out.println("    </Set>");
     315                    out.println("    <Set name=\"ExcludeProtocols\">");
     316                    out.println("      <Array type=\"java.lang.String\">");
     317                    for (String ss : I2PSSLSocketFactory.EXCLUDE_PROTOCOLS) {
     318                        out.println("        <Item>" + ss + "</Item>");
     319                    }
     320                    out.println("      </Array>");
     321                    out.println("    </Set>");
     322                    modified = true;
     323                    continue;
     324                } else if (s.contains("org.eclipse.jetty.server.ssl.SslSelectChannelConnector")) {
     325                    s = s.replace("org.eclipse.jetty.server.ssl.SslSelectChannelConnector", "org.eclipse.jetty.server.ServerConnector");
     326                    out.println("      <!-- Modified by I2P migration script for Jetty 9. Do not remove this line -->");
     327                    out.println(s);
     328                    out.println("        <Arg><Ref id=\"Server\" /></Arg>");
     329                    out.println("        <Arg type=\"int\">1</Arg>     <!-- number of acceptors -->");
     330                    out.println("        <Arg type=\"int\">0</Arg>     <!-- default number of selectors -->");
     331                    out.println("        <Arg>");
     332                    out.println("           <Array type=\"org.eclipse.jetty.server.ConnectionFactory\">    <!-- varargs so we need an array -->");
     333                    out.println("              <Item>");
     334                    out.println("                <New class=\"org.eclipse.jetty.server.SslConnectionFactory\">");
     335                    out.println("                  <Arg><Ref id=\"sslContextFactory\" /></Arg>");
     336                    out.println("                  <Arg>http/1.1</Arg>");
     337                    out.println("                </New>");
     338                    out.println("              </Item>");
     339                    out.println("              <Item>");
     340                    out.println("                <New class=\"org.eclipse.jetty.server.HttpConnectionFactory\">");
     341                    out.println("                  <Arg>");
     342                    out.println("                    <New class=\"org.eclipse.jetty.server.HttpConfiguration\">");
     343                    out.println("                      <Set name=\"sendServerVersion\">false</Set>");
     344                    out.println("                      <Set name=\"sendDateHeader\">true</Set>");
     345                    out.println("                    </New>");
     346                    out.println("                  </Arg>");
     347                    out.println("                </New>");
     348                    out.println("              </Item>");
     349                    out.println("            </Array>");
     350                    out.println("        </Arg>");
     351                    foundSSCC = true;
     352                    modified = true;
     353                    continue;
     354                } else if (foundSSCC && s.contains("<Set name=\"ExcludeCipherSuites\">")) {
     355                    // delete the old ExcludeCipherSuites in this section
     356                    do {
     357                        s = DataHelper.readLine(in);
     358                    } while(s != null && !s.contains("</Set>"));
     359                    modified = true;
     360                    continue;
     361                } else if (foundSSCC &&
     362                           s.contains("<Ref id=\"sslContextFactory\"")) {
     363                    // delete old one in this section, replaced above
     364                    modified = true;
     365                    continue;
     366                } else if (s.contains("<Set name=\"KeyStore\">")) {
     367                    s = s.replace("<Set name=\"KeyStore\">", "<Set name=\"KeyStorePath\">");
     368                    modified = true;
     369                } else if (s.contains("<Set name=\"TrustStore\">")) {
     370                    s = s.replace("<Set name=\"TrustStore\">", "<Set name=\"TrustStorePath\">");
     371                    modified = true;
     372             // SSL ends here
     373                } else if (s.contains("class=\"org.eclipse.jetty.deploy.providers.ContextProvider\">")) {
     374                    // WebAppProvider now also does what ContextProvider used to do
     375                    out.println("        <!-- Modified by I2P migration script for Jetty 9. Do not remove this line -->");
     376                    s = s.replace("class=\"org.eclipse.jetty.deploy.providers.ContextProvider\">", "class=\"org.eclipse.jetty.deploy.providers.WebAppProvider\">");
     377                    modified = true;
     378                } else if (s.contains("<Set name=\"maxIdleTime\">")) {
     379                    s = s.replace("<Set name=\"maxIdleTime\">", "<Set name=\"idleTimeout\">");
     380                    modified = true;
     381                } else if (s.contains("<Set name=\"gracefulShutdown\">")) {
     382                    s = s.replace("<Set name=\"gracefulShutdown\">", "<Set name=\"stopTimeout\">");
     383                    modified = true;
     384                } else if (s.contains("org.eclipse.jetty.server.HttpConfiguration")) {
     385                    foundHC = true;
     386                } else if (!foundHC &&
     387                           (s.contains("<Set name=\"sendServerVersion\">") ||
     388                            s.contains("<Set name=\"sendDateHeader\">"))) {
     389                    // old ones for Server, not in HTTPConfiguration section, delete
     390                    modified = true;
     391                    continue;
     392                } else if (s.contains("<Set name=\"Acceptors\">") ||
     393                           s.contains("<Set name=\"acceptors\">") ||
     394                           s.contains("<Set name=\"statsOn\">") ||
     395                           s.contains("<Set name=\"confidentialPort\">") ||
     396                           s.contains("<Set name=\"lowResourcesConnections\">") ||
     397                           s.contains("<Set name=\"lowResourcesMaxIdleTime\">") ||
     398                           s.contains("<Set name=\"useDirectBuffers\">")) {
     399                    // delete
     400                    modified = true;
     401                    continue;
     402                }
     403                out.println(s);
     404            }
     405        } catch (IOException ioe) {
     406            if (in != null) {
     407                System.err.println("FAILED migration of " + xmlFile + ": " + ioe);
     408            }
     409            return false;
     410        } finally {
     411            if (in != null) try { in.close(); } catch (IOException ioe) {}
     412            if (out != null) out.close();
     413        }
     414        if (modified) {
     415            return FileUtil.rename(newFile, xmlFile);
     416        } else {
     417            newFile.delete();
     418            return true;
     419        }
     420    }
     421
     422
     423    /** do we have Jetty 7/8/9? */
    150424    private static boolean hasLatestJetty() {
    151425        if (!_wasChecked) {
     
    165439     */
    166440    private static boolean backupFile(File from) {
     441        return backupFile(from, BACKUP_SUFFIX);
     442    }
     443
     444    /**
     445     *  Backup a file with given suffix
     446     *  @return success
     447     *  @since Jetty 9
     448     */
     449    private static boolean backupFile(File from, String suffix) {
    167450        if (!from.exists())
    168451            return true;
    169         File to = new File(from.getAbsolutePath() + BACKUP_SUFFIX);
     452        File to = new File(from.getAbsolutePath() + suffix);
    170453        if (to.exists())
    171454            to = new File(to.getAbsolutePath() + "." + System.currentTimeMillis());
  • router/java/src/net/i2p/router/startup/WorkingDir.java

    r072d990 r0703a29  
    328328            if (in != null) {
    329329                System.err.println("FAILED copy " + oldFile + ": " + ioe);
    330                 return false;
    331330            }
    332331            return false;
     
    366365            if (in != null) {
    367366                System.err.println("FAILED copy " + oldFile + ": " + ioe);
    368                 return false;
    369367            }
    370368            return false;
Note: See TracChangeset for help on using the changeset viewer.