source: debian/patches/0004-jetty6.patch @ 0ad4789

Last change on this file since 0ad4789 was 0ad4789, checked in by kytv <kytv@…>, 9 years ago

Add jetty-rewrite-handler.jar to the Debian packaging

  • Property mode set to 100644
File size: 15.4 KB
  • apps/jetty/build.xml

    From: Kill Your TV <killyourtv@i2pmail.org>
    Date: Sun, 1 Jan 2011 22:30:32 +0000
    Subject: Jetty 6
    
    This patch updates 
    
    	apps/i2ptunnel/java/build.xml
    	apps/jetty/build.xml
    	apps/routerconsole/java/build.xml
    	apps/susidns/src/build.xml
    
    so that I2P can be built using Jetty packages from Debian/Ubuntu
    a b  
    22<project basedir="." default="all" name="jetty">
    33
    44    <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}" />
    9     <property name="verified.filename" value="verified.txt" />
    105    <property name="javac.compilerargs" value="" />
    116
    127    <target name="all" depends="build" />
    13 
    148    <target name="ensureJettylib" >
    15         <available property="jetty.zip.available" file="${jetty.filename}" type="file" />
    16         <available property="jetty.zip.extracted" file="jettylib" type="dir" />
    179        <ant target="fetchJettylib" />
    1810        <ant target="verifyJettylib" />
    1911        <ant target="extractJettylib" />
    2012    </target>
    2113
    22     <target name="fetchJettylib" unless="jetty.zip.available" >
    23         <echo message="It seems that you don't have '${jetty.filename}' deployed." />
    24         <echo message="The build script can download this file for you automatically," />
    25         <echo message="or alternatively you can obtain it manually from:" />
    26         <echo message="${jetty.url}" />
    27         <echo message="" />
    28         <echo message="The libraries contained in the fetched file provide the Jetty web server" />
    29         <echo message="(http://jetty.mortbay.org/). They are not absolutely necessary" />
    30         <echo message="but strongly recommended, since they are used by some applications" />
    31         <echo message="on top of I2P, like the router console." />
    32         <echo message="" />
    33         <echo message="Even if you deploy the Jetty archive manually into directory apps/jetty/," />
    34         <echo message="the build script will still attempt to verify its checksums, which must be:" />
    35         <echo message="SHA1 ${jetty.sha1}" />
    36         <echo message="" />
    37         <input message="Download Jetty archive automatically?" validargs="y,n" addproperty="jetty.download" />
    38         <fail message="Aborting as requested. Please deploy the Jetty archive manually." >
    39             <condition>
    40                 <equals arg1="${jetty.download}" arg2="n"/>
    41             </condition>
    42         </fail>
    43         <get src="${jetty.url}" verbose="true" dest="${jetty.filename}" />
    44     </target>
    45 
    46     <condition property="verified.already" >
    47         <and>
    48             <available file="${jetty.filename}" />
    49             <uptodate property="foo.bar.baz" srcfile="${jetty.filename}" targetfile="${verified.filename}" />
    50         </and>
    51     </condition>
    52 
    53     <target name="verifyJettylib" unless="verified.already" >
    54         <condition property="jetty.zip.verified" >
    55                 <checksum file="${jetty.filename}" algorithm="SHA" property="${jetty.sha1}" />
    56         </condition>
    57         <fail message="Jetty archive does not match its checksum!" >
    58             <condition>
    59                 <not>
    60                     <istrue value="${jetty.zip.verified}" />
    61                 </not>
    62             </condition>
    63         </fail>
    64         <touch file="${verified.filename}" />
    65     </target>
    66 
    67     <target name="extractJettylib" unless="jetty.zip.extracted" >
    68       <!-- for .tgz -->
    69       <!--
    70         <gunzip src="${jetty.filename}" dest="jetty.tar" />
    71         <untar src="jetty.tar" dest="." />
    72       -->
    73       <!-- for .zip -->
    74         <unzip src="${jetty.filename}" dest="." />
     14    <target name="verifyJettylib" />
     15    <target name="fetchJettylib" />
     16    <target name="extractJettylib">
    7517        <mkdir dir="jettylib" />
    7618      <!-- We copy everything to names without the version numbers so we
    7719           can update them later. Where there was something similar in Jetty 5,
     
    8628              jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
    8729              All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
    8830        -->
    89         <copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
    90         <copy preservelastmodified="true" file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
    91         <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
    92         <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
    93         <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
    94         <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
    95         <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
    96         <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/commons-el-1.0.jar" tofile="jettylib/commons-el.jar" />
    97         <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jasper-compiler-5.5.15.jar" tofile="jettylib/jasper-compiler.jar" />
    98         <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jasper-runtime-5.5.15.jar" tofile="jettylib/jasper-runtime.jar" />
    99         <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jsp-api-2.0.jar" tofile="jettylib/jsp-api.jar" />
    100         <copy preservelastmodified="true" file="${jetty.base}/lib/servlet-api-2.5-20081211.jar" tofile="jettylib/javax.servlet.jar" />
    101         <delete file="jetty.tar" />
    102         <delete dir="${jetty.base}" />
    103         <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
    104              for org.apache.jasper.JspC compiler
    105           -->
    106         <copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
     31        <copy preservelastmodified="true" file="/usr/share/java/commons-el-1.0.jar" tofile="jettylib/commons-el.jar" />
     32        <copy preservelastmodified="true" file="/usr/share/java/commons-logging.jar" todir="jettylib/" />
     33        <copy preservelastmodified="true" file="/usr/share/java/el-api-2.1.jar" tofile="jettylib/el-api.jar" />
     34        <copy preservelastmodified="true" file="/usr/share/java/jasper-el.jar" todir="jettylib/" />
     35        <copy preservelastmodified="true" file="/usr/share/java/jetty-java5-threadpool.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
     36        <copy preservelastmodified="true" file="/usr/share/java/jetty-rewrite-handler.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
     37        <copy preservelastmodified="true" file="/usr/share/java/jetty-sslengine.jar" tofile="jettylib/jetty-sslengine.jar" />
     38        <copy preservelastmodified="true" file="/usr/share/java/jetty-start.jar" tofile="jettylib/jetty-start.jar" />
     39        <copy preservelastmodified="true" file="/usr/share/java/jetty-util.jar" tofile="jettylib/jetty-util.jar" />
     40        <copy preservelastmodified="true" file="/usr/share/java/jetty.jar" tofile="jettylib/org.mortbay.jetty.jar" />
     41        <copy preservelastmodified="true" file="/usr/share/java/servlet-api.jar" tofile="jettylib/javax.servlet.jar" />
     42        <copy preservelastmodified="true" file="/usr/share/java/tomcat-juli.jar" tofile="jettylib/tomcat-juli.jar" />
     43        <copy preservelastmodified="true" file="/usr/share/jetty/lib/jsp-2.1/ant.jar" tofile="jettylib/ant.jar" />
     44        <copy preservelastmodified="true" file="/usr/share/jetty/lib/jsp-2.1/jasper.jar" tofile="jettylib/jasper.jar" />
     45        <copy preservelastmodified="true" file="/usr/share/jetty/lib/jsp-2.1/jsp-api.jar" tofile="jettylib/jsp-api.jar" />
    10746    </target>
    10847
    10948    <target name="build" depends="jar" />
    11049
    11150    <target name="builddep" />
    112     <target name="compile" depends="builddep, ensureJettylib" >
     51    <target name="compile" depends="builddep, extractJettylib" >
    11352        <mkdir dir="./build" />
    11453        <mkdir dir="./build/obj" />
    11554        <javac
     
    173112    <target name="cleandep" depends="clean" />
    174113    <target name="distclean" depends="clean">
    175114        <delete dir="./jettylib" />
    176         <echo message="Not actually deleting the jetty libs (since they're so large)" />
    177115    </target>
    178116    <target name="reallyclean" depends="distclean">
    179117    </target>
     
    181119        <delete dir="./jettylib" />
    182120        <delete file="${jetty.filename}" />
    183121    </target>
    184     <target name="javadoc" >
    185         <available property="jetty.zip.available" file="${jetty.filename}" type="file" />
    186         <available property="jetty.zip.javadocExtracted" file="build/javadoc" type="dir" />
    187         <ant target="fetchJettylib" />
    188         <ant target="verifyJettylib" />
    189         <ant target="extractJavadoc" />
    190     </target>
    191     <target name="extractJavadoc" unless="jetty.zip.javadocExtracted" >
    192         <mkdir dir="./build" />
    193         <mkdir dir="./build/javadoc" />
    194         <unzip src="${jetty.filename}" dest="./build/javadoc" >
    195             <patternset>
    196                 <include name="${jetty.base}/javadoc/" />
    197             </patternset>
    198             <mapper type="glob" from="${jetty.base}/javadoc/*" to="javadoc/*" />
    199         </unzip>
     122    <target name="javadoc">
     123        <echo message="Javadocs are available in the package &quot;libjetty-java-doc&quot;" />
    200124    </target>
    201125
     126    <target name="extractJavadoc" />
     127
    202128</project>
  • apps/i2ptunnel/java/build.xml

    a b  
    164164        <!-- there are various jspc ant tasks, but they all seem a bit flakey -->
    165165        <java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
    166166            <classpath>
    167                 <pathelement location="../../jetty/jettylib/jasper-compiler.jar" />
    168                 <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    169                 <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    170                 <pathelement location="../../jetty/jettylib/commons-logging.jar" />
     167                <pathelement location="../../jetty/jettylib/ant.jar" />
    171168                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     169                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
     170                <pathelement location="../../jetty/jettylib/el-api.jar" />
     171                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
     172                <pathelement location="../../jetty/jettylib/jasper.jar" />
     173                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    172174                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
    173                 <pathelement location="../../jetty/jettylib/ant.jar" />
     175                <pathelement location="../../jetty/jettylib/tomcat-juli.jar" />
    174176                <pathelement location="build/i2ptunnel.jar" />
    175177            </classpath>
    176178            <arg value="-d" />
     
    187189               destdir="../jsp/WEB-INF/classes/" srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
    188190            <compilerarg line="${javac.compilerargs}" />
    189191            <classpath>
    190                 <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
    191                 <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    192                 <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    193192                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     193                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
     194                <pathelement location="../../jetty/jettylib/el-api.jar" />
     195                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
     196                <pathelement location="../../jetty/jettylib/jasper.jar" />
     197                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    194198                <pathelement location="../../jetty/jettylib/jsp-api.jar" />
    195199                <pathelement location="build/i2ptunnel.jar" />
    196200            </classpath>
  • apps/routerconsole/java/build.xml

    a b  
    238238        -->
    239239        <java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
    240240            <classpath>
    241                 <pathelement location="../../jetty/jettylib/jasper-compiler.jar" />
    242                 <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
     241                <pathelement location="../../jetty/jettylib/jasper.jar" />
     242                <pathelement location="../../jetty/jettylib/tomcat-juli.jar" />
     243                <pathelement location="../../jetty/jettylib/el-api.jar" />
     244                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
    243245                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    244246                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    245247                <pathelement location="../../jetty/jettylib/commons-el.jar" />
     
    273275               srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
    274276            <compilerarg line="${javac.compilerargs}" />
    275277            <classpath>
    276                 <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
     278                <pathelement location="../../jetty/jettylib/jasper.jar" />
     279                <pathelement location="../../jetty/jettylib/el-api.jar" />
     280                <pathelement location="../../jetty/jettylib/jasper-el.jar" />
     281                <pathelement location="../../jetty/jettylib/tomcat-juli.jar" />
    277282                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
    278283                <pathelement location="../../jetty/jettylib/commons-logging.jar" />
    279284                <pathelement location="../../jetty/jettylib/commons-el.jar" />
  • apps/susidns/src/build.xml

    a b  
    1414                <pathelement location="${lib}/org.mortbay.jetty.jar"/>
    1515        <pathelement location="WEB-INF/lib/jstl.jar" />
    1616        <pathelement location="WEB-INF/lib/standard.jar" />
    17         <pathelement location="${lib}/jasper-compiler.jar" />
    18         <pathelement location="${lib}/jasper-runtime.jar" />
     17        <pathelement location="${lib}/jasper.jar" />
     18        <pathelement location="${lib}/tomcat-juli.jar" />
     19        <pathelement location="${lib}/el-api.jar" />
     20        <pathelement location="${lib}/jasper-el.jar" />
    1921        <pathelement location="${lib}/javax.servlet.jar" />
    2022        <pathelement location="${lib}/jsp-api.jar" />
    2123        <pathelement location="${lib}/commons-logging.jar" />
  • build.xml

    a b  
    679679        <copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
    680680        <!-- all jetty stuff -->
    681681        <copy todir="pkg-temp/lib" >
    682             <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar" />
     682            <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar el-api.jar tomcat-juli.jar" />
    683683        </copy>
    684684        <copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
    685685        <copy file="build/streaming.jar" todir="pkg-temp/lib/" />
Note: See TracBrowser for help on using the repository browser.