Changeset 23ca49ea for apps/jetty


Ignore:
Timestamp:
Jan 14, 2012 6:04:39 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
fd6fcda
Parents:
7df8814 (diff), edf5ef5 (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 b3d611a1fe034bc89963c54179d5bef3a3147950)

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

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

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    r7df8814 r23ca49ea  
    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              All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
     89        -->
     90        <copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
     91        <copy file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
     92        <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
     93        <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
     94        <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
     95        <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
     96        <copy file="${jetty.base}/lib/jsp-2.1/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
    8297        <delete file="jetty.tar" />
    8398        <delete dir="${jetty.base}" />
     99        <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
     100             for org.apache.jasper.JspC compiler
     101          -->
     102        <copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
     103        <ant target="copyTomcatLib" />
     104    </target>
     105
     106    <!-- Tomcat.
     107         The glassfish jars bundled in Jetty 6 are way too old.
     108         For compatibility with very old I2P installations where the classpath
     109         was set individually in wrapper.config, we rename and combine the jars as follows:
     110         jasper.jar : jasper-runtime.jar
     111         jasper-el.jar + el-api.jar : commons-el.jar
     112         servlet-api.jar + jsp-api.jar : javax.servlet.jar
     113         tomcat-juli.jar : commons-logging.jar
     114         empty jar : jasper-compiler.jar
     115         Also, take NOTICE and LICENSE out of each one, we bundle those separately.
     116     -->
     117    <target name="copyTomcatLib" >
     118        <jar destfile="jettylib/jasper-runtime.jar" >
     119            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" />
     120        </jar>
     121        <jar destfile="jettylib/commons-el.jar" duplicate="preserve" >
     122            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />
     123            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
     124        </jar>
     125        <jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" >
     126            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/servlet-api.jar" />
     127            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
     128        </jar>
     129        <jar destfile="jettylib/commons-logging.jar" >
     130            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-juli.jar" />
     131        </jar>
     132        <jar destfile="jettylib/jasper-compiler.jar" />
    84133    </target>
    85134
    86135    <target name="build" depends="jar" />
     136
    87137    <target name="builddep" />
    88138    <target name="compile" depends="builddep, ensureJettylib" >
     
    94144            destdir="./build/obj"
    95145            includeAntRuntime="false"
    96             classpath="./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar" >
     146            classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-util.jar" >
    97147            <compilerarg line="${javac.compilerargs}" />
    98148        </javac>
     
    113163    </target>
    114164
     165    <!-- With Jetty 5 we replaced classes in the jar, but with Jetty 6 we
     166         put our stuff in its own jar so we can work with standard Jetty 6 packages
     167      -->
    115168    <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
    116169        <!-- set if unset -->
    117170        <property name="workspace.changes.tr" value="" />
    118         <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
     171        <copy todir="build/obj" file="resources/log4j.properties" />
     172        <jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
    119173            <manifest>
    120174                <attribute name="Build-Date" value="${build.timestamp}" />
     
    126180
    127181    <target name="jarUpToDate">
    128         <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
     182        <uptodate property="jar.uptodate" targetfile="jettylib/jetty-i2p.jar" >
    129183            <srcfiles dir= "build/obj" includes="**/*.class" />
    130184        </uptodate>
Note: See TracChangeset for help on using the changeset viewer.