Changeset be8697c for apps/jetty


Ignore:
Timestamp:
Nov 21, 2012 6:05:50 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
f1dd779
Parents:
5f45624
Message:

jetty 7 first cut

Location:
apps/jetty
Files:
1 added
8 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    r5f45624 rbe8697c  
    22<project basedir="." default="all" name="jetty">
    33
    4     <property name="jetty.ver" value="6.1.26" />
    5     <property name="jetty.base" value="jetty-${jetty.ver}" />
    6     <property name="jetty.sha1" value="9485913f1a1945a849a90f1a34853d22350bc524" />
     4    <property name="jetty.ver" value="7.6.8.v20121106" />
     5    <property name="jetty.base" value="jetty-distribution-${jetty.ver}" />
     6    <property name="jetty.sha1" value="6fcdc3f532c5ab72843e12cbac3d7cb797cdb5b9" />
    77    <property name="jetty.filename" value="${jetty.base}.zip" />
    8     <property name="jetty.url" value="http://dist.codehaus.org/jetty/${jetty.base}/${jetty.filename}" />
     8    <property name="jetty.url" value="http://download.eclipse.org/jetty/${jetty.ver}/dist/${jetty.filename}" />
    99    <property name="verified.filename" value="verified.txt" />
    1010    <property name="javac.compilerargs" value="" />
     
    9898        -->
    9999        <copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
    100         <copy file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
     100        <copy file="${jetty.base}/lib/jetty-server-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
     101        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-continuation-${jetty.ver}.jar" tofile="jettylib/jetty-continuation.jar" />
     102        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-deploy-${jetty.ver}.jar" tofile="jettylib/jetty-deploy.jar" />
     103        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-http-${jetty.ver}.jar" tofile="jettylib/jetty-http.jar" />
     104        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-io-${jetty.ver}.jar" tofile="jettylib/jetty-io.jar" />
     105        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-jmx-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jmx.jar" />
     106        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-rewrite-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
     107        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-security-${jetty.ver}.jar" tofile="jettylib/jetty-security.jar" />
     108        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlet-${jetty.ver}.jar" tofile="jettylib/jetty-servlet.jar" />
     109        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlets-${jetty.ver}.jar" tofile="jettylib/jetty-servlets.jar" />
    101110        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
    102         <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
    103         <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
    104         <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
    105         <copy preservelastmodified="true" file="${jetty.base}/lib/management/jetty-management-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jmx.jar" />
     111        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-webapp-${jetty.ver}.jar" tofile="jettylib/jetty-webapp.jar" />
     112        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-xml-${jetty.ver}.jar" tofile="jettylib/jetty-xml.jar" />
     113        <jar destfile="jettylib/jetty-java5-threadpool.jar" >
     114            <manifest>
     115                <attribute name="Note" value="Intentionally empty" />
     116            </manifest>
     117        </jar>
     118        <jar destfile="jettylib/jetty-sslengine.jar" >
     119            <manifest>
     120                <attribute name="Note" value="Intentionally empty" />
     121            </manifest>
     122        </jar>
    106123        <delete file="jetty.tar" />
    107124      <!--
     
    156173
    157174    <target name="builddep" />
     175
    158176    <target name="compile" depends="builddep, ensureJettylib" >
    159177        <mkdir dir="./build" />
     
    161179        <javac
    162180            srcdir="./java/src"
    163             debug="true" source="1.5" target="1.5"
     181            debug="true" deprecation="on" source="1.5" target="1.5"
    164182            destdir="./build/obj"
    165183            includeAntRuntime="false"
    166             classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-util.jar" >
     184            classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-http.jar:./jettylib/jetty-io.jar:./jettylib/jetty-util.jar:./jettylib/jetty-xml.jar" >
    167185            <compilerarg line="${javac.compilerargs}" />
    168186        </javac>
  • apps/jetty/java/src/net/i2p/jetty/I2PLogger.java

    r5f45624 rbe8697c  
    1818import net.i2p.util.Log;
    1919
    20 import org.mortbay.jetty.Server;
    21 import org.mortbay.log.Logger;
     20import org.eclipse.jetty.server.Server;
     21import org.eclipse.jetty.util.log.Logger;
    2222
    2323/**
    2424 * Modified from Jetty 6.1.26 StdErrLog.java and Slf4jLog.java
    2525 *
    26  * Usage: org.mortbay.log.Log.setLog(new I2PLogger(ctx));
     26 * Usage: org.eclipse.log.Log.setLog(new I2PLogger(ctx));
    2727 *
    2828 * @since Jetty 6
     
    183183    }
    184184   
    185 
     185    /**
     186     *  @since Jetty 7
     187     */
     188    public void ignore(Throwable ignored)
     189    {
     190            warn("IGNORED", ignored);
     191    }
     192   
     193    /**
     194     *  @since Jetty 7
     195     */
     196    public void debug(Throwable thrown)
     197    {
     198            debug("", thrown);
     199    }
     200   
     201    /**
     202     *  @since Jetty 7
     203     */
     204    public void debug(String msg, Object... args)
     205    {
     206            Object a1 = args.length > 0 ? args[0] : null;
     207            Object a2 = args.length > 1 ? args[1] : null;
     208            debug(msg, a1, a2);
     209    }
     210   
     211    /**
     212     *  @since Jetty 7
     213     */
     214    public void info(Throwable thrown)
     215    {
     216            info("", thrown);
     217    }
     218   
     219    /**
     220     *  @since Jetty 7
     221     */
     222    public void info(String msg, Object... args)
     223    {
     224            Object a1 = args.length > 0 ? args[0] : null;
     225            Object a2 = args.length > 1 ? args[1] : null;
     226            info(msg, a1, a2);
     227    }
     228   
     229    /**
     230     *  @since Jetty 7
     231     */
     232    public void info(String msg, Throwable th)
     233    {
     234        _log.info(msg,th);
     235    }
     236
     237    /**
     238     *  @since Jetty 7
     239     */
     240    public void warn(Throwable thrown)
     241    {
     242            warn("", thrown);
     243    }
     244   
     245    /**
     246     *  @since Jetty 7
     247     */
     248    public void warn(String msg, Object... args)
     249    {
     250            Object a1 = args.length > 0 ? args[0] : null;
     251            Object a2 = args.length > 1 ? args[1] : null;
     252            warn(msg, a1, a2);
     253    }
     254
     255    /**
     256     *  @since Jetty 7
     257     */
     258    public String getName() {
     259        return "net.i2p.jetty.I2PLogger";
     260    }
    186261}
  • apps/jetty/java/src/net/i2p/jetty/I2PRequestLog.java

    r5f45624 rbe8697c  
    2525import javax.servlet.http.Cookie;
    2626
    27 import org.mortbay.component.AbstractLifeCycle;
    28 import org.mortbay.jetty.HttpHeaders;
    29 import org.mortbay.jetty.Request;
    30 import org.mortbay.jetty.RequestLog;
    31 import org.mortbay.jetty.Response;
    32 import org.mortbay.jetty.servlet.PathMap;
    33 import org.mortbay.log.Log;
    34 import org.mortbay.util.DateCache;
    35 import org.mortbay.util.RolloverFileOutputStream;
    36 import org.mortbay.util.StringUtil;
    37 import org.mortbay.util.TypeUtil;
    38 import org.mortbay.util.Utf8StringBuffer;
     27import org.eclipse.jetty.http.HttpHeaders;
     28import org.eclipse.jetty.http.PathMap;
     29import org.eclipse.jetty.server.Request;
     30import org.eclipse.jetty.server.RequestLog;
     31import org.eclipse.jetty.server.Response;
     32import org.eclipse.jetty.util.DateCache;
     33import org.eclipse.jetty.util.RolloverFileOutputStream;
     34import org.eclipse.jetty.util.StringUtil;
     35import org.eclipse.jetty.util.TypeUtil;
     36import org.eclipse.jetty.util.Utf8StringBuilder;
     37import org.eclipse.jetty.util.component.AbstractLifeCycle;
     38import org.eclipse.jetty.util.log.Log;
    3939
    4040/**
     
    5757 * So that we will work with system Jetty 6 packages, we just copy the whole thing
    5858 * and modify log() as required.
    59  * We leave the package as org.mortbay.http for compatibility with old
    60  * jetty.xml files.
    6159 *
    6260 * @author Greg Wilkins
     
    260258                return;
    261259
    262             Utf8StringBuffer u8buf;
    263             StringBuffer buf;
     260            Utf8StringBuilder u8buf;
     261            StringBuilder buf;
    264262            synchronized(_writer)
    265263            {
    266264                int size=_buffers.size();
    267                 u8buf = size==0?new Utf8StringBuffer(160):(Utf8StringBuffer)_buffers.remove(size-1);
    268                 buf = u8buf.getStringBuffer();
     265                u8buf = size==0?new Utf8StringBuilder(160):(Utf8StringBuilder)_buffers.remove(size-1);
     266                buf = u8buf.getStringBuilder();
    269267            }
    270268           
     
    399397                    {
    400398                        _writer.write(' ');
    401                         _writer.write(TypeUtil.toString(System.currentTimeMillis() - request.getTimeStamp()));
     399                        _writer.write(Long.toString(System.currentTimeMillis() - request.getTimeStamp()));
    402400                    }
    403401
  • apps/jetty/java/src/net/i2p/jetty/JettyStart.java

    r5f45624 rbe8697c  
    2020import java.util.Arrays;
    2121import java.util.List;
     22import java.util.Map;
    2223import java.util.Properties;
    2324
     
    2627import static net.i2p.app.ClientAppState.*;
    2728
    28 import org.mortbay.component.LifeCycle;
    29 import org.mortbay.resource.Resource;
    30 import org.mortbay.xml.XmlConfiguration;
     29import org.eclipse.jetty.util.component.LifeCycle;
     30import org.eclipse.jetty.util.resource.Resource;
     31import org.eclipse.jetty.xml.XmlConfiguration;
    3132
    3233/**
     
    7475                if (last!=null)
    7576                    configuration.getIdMap().putAll(last.getIdMap());
    76                 if (properties.size()>0)
    77                     configuration.setProperties(properties);
     77                if (properties.size()>0) {
     78                    // to avoid compiler errror
     79                    Map foo = configuration.getProperties();
     80                    foo.putAll(properties);
     81                }
    7882                Object o = configuration.configure();
    7983                if (o instanceof LifeCycle)
Note: See TracChangeset for help on using the changeset viewer.