Changeset 6198739 for apps/jetty


Ignore:
Timestamp:
Jan 16, 2012 2:10:32 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ba01451
Parents:
23de1e6 (diff), 4045785 (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' (head 899a1923586f3d7d622bd02e03c87717566617c4)

to branch 'i2p.i2p.zzz.jetty6' (head cb3e33be282b6002f6790609f4a3eef7f42069d3)

Location:
apps/jetty
Files:
11 added
9 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    r23de1e6 r6198739  
    22<project basedir="." default="all" name="jetty">
    33
    4     <property name="jetty.base" value="jetty-5.1.15" />
    5     <property name="jetty.sha1" value="3a7a3de50f86f0cdb23c33aec632ea7f44132c5e" />
    6     <property name="jetty.filename" value="${jetty.base}.tgz" />
    7     <property name="jetty.url" value="http://dist.codehaus.org/jetty/jetty-5.1.x/${jetty.filename}" />
     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" />
     7    <property name="jetty.filename" value="${jetty.base}.zip" />
     8    <property name="jetty.url" value="http://dist.codehaus.org/jetty/${jetty.base}/${jetty.filename}" />
    89    <property name="verified.filename" value="verified.txt" />
    910    <property name="javac.compilerargs" value="" />
     11    <property name="tomcat.lib" value="apache-tomcat-deployer/lib" />
    1012
    1113    <target name="all" depends="build" />
     
    6567
    6668    <target name="extractJettylib" unless="jetty.zip.extracted" >
     69      <!-- for .tgz -->
     70      <!--
    6771        <gunzip src="${jetty.filename}" dest="jetty.tar" />
    6872        <untar src="jetty.tar" dest="." />
     73      -->
     74      <!-- for .zip -->
     75        <unzip src="${jetty.filename}" dest="." />
    6976        <mkdir dir="jettylib" />
    70         <copy todir="jettylib" preservelastmodified="true" >
    71             <fileset dir="${jetty.base}/lib">
    72                 <include name="*.jar" />
    73             </fileset>
    74             <fileset dir="${jetty.base}/ext">
    75                 <include name="ant.jar" />
    76                 <include name="commons-el.jar" />
    77                 <include name="commons-logging.jar" />
    78                 <include name="jasper-compiler.jar" />
    79                 <include name="jasper-runtime.jar" />
    80             </fileset>
    81         </copy>
     77      <!-- We copy everything to names without the version numbers so we
     78           can update them later. Where there was something similar in Jetty 5,
     79           we use the same names so they will overwrite the Jetty 5 jar on upgrade.
     80           Otherwise we use the same name as the symlink in Ubuntu /usr/share/java.
     81           Reasons for inclusion:
     82              start.jar: Needed for clients.config startup of eepsites
     83              jetty-util-xxx.jar: LifeCycle (base class for stuff), URIUtil (used in i2psnark)
     84              jetty-sslengine-xxx.jar: SSL NIO Connector for console
     85              jetty-java5-threadpool-xxx.jar: Concurrent thread pool for eepsite
     86              glassfish 2.1: Not used, too old, see Tomcat below.
     87              jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
     88              jetty-management: Not used by I2P, but only 34KB and could be useful for eepsites, and we bundled it with Jetty 5
     89              All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
     90        -->
     91        <copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
     92        <copy file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
     93        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
     94        <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
     95        <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
     96        <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
     97        <copy preservelastmodified="true" file="${jetty.base}/lib/management/jetty-management-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jmx.jar" />
     98        <copy file="${jetty.base}/lib/jsp-2.1/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
    8299        <delete file="jetty.tar" />
    83100        <delete dir="${jetty.base}" />
     101        <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
     102             for org.apache.jasper.JspC compiler
     103          -->
     104        <copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
     105        <ant target="copyTomcatLib" />
     106    </target>
     107
     108    <!-- Tomcat.
     109         The glassfish jars bundled in Jetty 6 are way too old.
     110         For compatibility with very old I2P installations where the classpath
     111         was set individually in wrapper.config, we rename and combine the jars as follows:
     112         jasper.jar : jasper-runtime.jar
     113         jasper-el.jar + el-api.jar : commons-el.jar
     114         servlet-api.jar + jsp-api.jar : javax.servlet.jar
     115         tomcat-juli.jar : commons-logging.jar
     116         empty jar : jasper-compiler.jar
     117         Also, take NOTICE and LICENSE out of each one, we bundle those separately.
     118     -->
     119    <target name="copyTomcatLib" >
     120        <jar destfile="jettylib/jasper-runtime.jar" >
     121            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" />
     122        </jar>
     123        <jar destfile="jettylib/commons-el.jar" duplicate="preserve" >
     124            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />
     125            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
     126        </jar>
     127        <jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" >
     128            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/servlet-api.jar" />
     129            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
     130        </jar>
     131        <jar destfile="jettylib/commons-logging.jar" >
     132            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-juli.jar" />
     133        </jar>
     134        <jar destfile="jettylib/jasper-compiler.jar" />
    84135    </target>
    85136
    86137    <target name="build" depends="jar" />
     138
    87139    <target name="builddep" />
    88140    <target name="compile" depends="builddep, ensureJettylib" >
     
    94146            destdir="./build/obj"
    95147            includeAntRuntime="false"
    96             classpath="./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar" >
     148            classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-util.jar" >
    97149            <compilerarg line="${javac.compilerargs}" />
    98150        </javac>
     
    113165    </target>
    114166
     167    <!-- With Jetty 5 we replaced classes in the jar, but with Jetty 6 we
     168         put our stuff in its own jar so we can work with standard Jetty 6 packages
     169      -->
    115170    <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
    116171        <!-- set if unset -->
    117172        <property name="workspace.changes.tr" value="" />
    118         <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
     173        <copy todir="build/obj" file="resources/log4j.properties" />
     174        <jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
    119175            <manifest>
    120176                <attribute name="Build-Date" value="${build.timestamp}" />
     
    126182
    127183    <target name="jarUpToDate">
    128         <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
     184        <uptodate property="jar.uptodate" targetfile="jettylib/jetty-i2p.jar" >
    129185            <srcfiles dir= "build/obj" includes="**/*.class" />
    130186        </uptodate>
Note: See TracChangeset for help on using the changeset viewer.