Changeset 6107e38 for apps/jetty


Ignore:
Timestamp:
Feb 4, 2012 3:42:23 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
45ba9e1
Parents:
d93805e (diff), 061f96a (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 0f4af64e64536c467b623286bce659dd2dfe9342)

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

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

Legend:

Unmodified
Added
Removed
  • apps/jetty/build.xml

    rd93805e r6107e38  
    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" />
    8298        <delete file="jetty.tar" />
    8399        <delete dir="${jetty.base}" />
     100        <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
     101             for org.apache.jasper.JspC compiler
     102          -->
     103        <copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
     104        <ant target="copyTomcatLib" />
     105    </target>
     106
     107    <!-- Tomcat.
     108         The glassfish jars bundled in Jetty 6 are way too old.
     109         For compatibility with very old I2P installations where the classpath
     110         was set individually in wrapper.config, we rename and combine the jars as follows:
     111         jasper.jar : jasper-runtime.jar
     112         jasper-el.jar + el-api.jar : commons-el.jar
     113         servlet-api.jar + jsp-api.jar : javax.servlet.jar
     114         tomcat-juli.jar : commons-logging.jar
     115         empty jar : jasper-compiler.jar
     116         Also, take NOTICE and LICENSE out of each one, we bundle those separately.
     117     -->
     118    <target name="copyTomcatLib" >
     119        <jar destfile="jettylib/jasper-runtime.jar" >
     120            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" />
     121        </jar>
     122        <jar destfile="jettylib/commons-el.jar" duplicate="preserve" >
     123            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />
     124            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
     125        </jar>
     126        <jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" >
     127            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/servlet-api.jar" />
     128            <zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
     129        </jar>
     130        <jar destfile="jettylib/commons-logging.jar" >
     131            <zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-juli.jar" />
     132        </jar>
     133        <jar destfile="jettylib/jasper-compiler.jar" />
    84134    </target>
    85135
    86136    <target name="build" depends="jar" />
     137
    87138    <target name="builddep" />
    88139    <target name="compile" depends="builddep, ensureJettylib" >
     
    94145            destdir="./build/obj"
    95146            includeAntRuntime="false"
    96             classpath="./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar" >
     147            classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-util.jar" >
    97148            <compilerarg line="${javac.compilerargs}" />
    98149        </javac>
     
    113164    </target>
    114165
     166    <!-- With Jetty 5 we replaced classes in the jar, but with Jetty 6 we
     167         put our stuff in its own jar so we can work with standard Jetty 6 packages
     168      -->
    115169    <target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
    116170        <!-- set if unset -->
    117171        <property name="workspace.changes.tr" value="" />
    118         <jar destfile="./jettylib/org.mortbay.jetty.jar" basedir="./build/obj" includes="**/*.class" update="true" >
     172        <copy todir="build/obj" file="resources/log4j.properties" />
     173        <jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
    119174            <manifest>
    120175                <attribute name="Build-Date" value="${build.timestamp}" />
     
    126181
    127182    <target name="jarUpToDate">
    128         <uptodate property="jar.uptodate" targetfile="jettylib/org.mortbay.jetty.jar" >
     183        <uptodate property="jar.uptodate" targetfile="jettylib/jetty-i2p.jar" >
    129184            <srcfiles dir= "build/obj" includes="**/*.class" />
    130185        </uptodate>
Note: See TracChangeset for help on using the changeset viewer.