Ignore:
Timestamp:
Mar 4, 2012 12:34:00 AM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
a0a9c23
Parents:
140ffc5 (diff), f43b0be (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.jetty6' (head b2ad0d72311d5ec26270cfcbbc79d128b268869b)

to branch 'i2p.i2p' (head b05b73d4740740f306a665e4b354d412eab2f328)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    r140ffc5 r2b81cee  
    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" />
    1214
     15  <!--
    1316    <target name="ensureJettylib" >
    1417        <available property="jetty.zip.available" file="${jetty.filename}" type="file" />
     
    1821        <ant target="extractJettylib" />
    1922    </target>
     23   -->
     24    <target name="ensureJettylib" depends="extractJettylib" />
    2025
    2126    <target name="fetchJettylib" unless="jetty.zip.available" >
     
    6469    </target>
    6570
     71  <!--
    6672    <target name="extractJettylib" unless="jetty.zip.extracted" >
     73   -->
     74    <target name="extractJettylib" >
     75      <!-- for .tgz -->
     76      <!--
    6777        <gunzip src="${jetty.filename}" dest="jetty.tar" />
    6878        <untar src="jetty.tar" dest="." />
     79      -->
     80      <!-- for .zip -->
     81      <!--
     82        <unzip src="${jetty.filename}" dest="." />
     83      -->
    6984        <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>
     85      <!-- We copy everything to names without the version numbers so we
     86           can update them later. Where there was something similar in Jetty 5,
     87           we use the same names so they will overwrite the Jetty 5 jar on upgrade.
     88           Otherwise we use the same name as the symlink in Ubuntu /usr/share/java.
     89           Reasons for inclusion:
     90              start.jar: Needed for clients.config startup of eepsites
     91              jetty-util-xxx.jar: LifeCycle (base class for stuff), URIUtil (used in i2psnark)
     92              jetty-sslengine-xxx.jar: SSL NIO Connector for console
     93              jetty-java5-threadpool-xxx.jar: Concurrent thread pool for eepsite
     94              glassfish 2.1: Not used, too old, see Tomcat below.
     95              jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
     96              jetty-management: Not used by I2P, but only 34KB and could be useful for eepsites, and we bundled it with Jetty 5
     97              All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
     98        -->
     99        <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" />
     101        <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" />
    82106        <delete file="jetty.tar" />
     107      <!--
    83108        <delete dir="${jetty.base}" />
     109      -->
     110        <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
     111             for org.apache.jasper.JspC compiler
     112          -->
     113        <copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
     114        <ant target="copyTomcatLib" />
     115    </target>
     116
     117    <!-- Tomcat.
     118         The glassfish jars bundled in Jetty 6 are way too old.
     119         For compatibility with very old I2P installations where the classpath
     120         was set individually in wrapper.config, we rename and combine the jars as follows:
     121         jasper.jar : jasper-runtime.jar
     122         jasper-el.jar + el-api.jar : commons-el.jar
     123         servlet-api.jar + jsp-api.jar : javax.servlet.jar
     124         tomcat-juli.jar : commons-logging.jar
     125         empty jar : jasper-compiler.jar
     126         Also, take NOTICE and LICENSE out of each one, we bundle those separately.
     127     -->
     128    <target name="copyTomcatLib" >
     129        <jar destfile="jettylib/jasper-runtime.jar" >
     130            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" />
     131        </jar>
     132        <jar destfile="jettylib/commons-el.jar" duplicate="preserve" >
     133            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />
     134            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
     135        </jar>
     136        <jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" >
     137            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/servlet-api.jar" />
     138            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
     139        </jar>
     140        <jar destfile="jettylib/commons-logging.jar" >
     141            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-juli.jar" />
     142        </jar>
     143        <jar destfile="jettylib/jasper-compiler.jar" />
    84144    </target>
    85145
    86146    <target name="build" depends="jar" />
     147
    87148    <target name="builddep" />
    88149    <target name="compile" depends="builddep, ensureJettylib" >
     
    94155            destdir="./build/obj"
    95156            includeAntRuntime="false"
    96             classpath="./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar" >
     157            classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-util.jar" >
    97158            <compilerarg line="${javac.compilerargs}" />
    98159        </javac>
     
    113174    </target>
    114175
     176    <!-- With Jetty 5 we replaced classes in the jar, but with Jetty 6 we
     177         put our stuff in its own jar so we can work with standard Jetty 6 packages
     178      -->
    115179    <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
    116180        <!-- set if unset -->
    117181        <property name="workspace.changes.tr" value="" />
    118         <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
     182        <copy todir="build/obj" file="resources/log4j.properties" />
     183        <jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
    119184            <manifest>
    120185                <attribute name="Built-By" value="${build.built-by}" />
     
    127192
    128193    <target name="jarUpToDate">
    129         <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
     194        <uptodate property="jar.uptodate" targetfile="jettylib/jetty-i2p.jar" >
    130195            <srcfiles dir= "build/obj" includes="**/*.class" />
    131196        </uptodate>
     
    147212    <target name="distclean" depends="clean">
    148213        <delete dir="./jettylib" />
     214      <!--
    149215        <echo message="Not actually deleting the jetty libs (since they're so large)" />
     216       -->
    150217    </target>
    151218    <target name="reallyclean" depends="distclean">
Note: See TracChangeset for help on using the changeset viewer.