2012-01-01 23:31:41 +00:00
|
|
|
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/apps/jetty/build.xml
|
|
|
|
+++ b/apps/jetty/build.xml
|
|
|
|
@@ -2,76 +2,18 @@
|
|
|
|
<project basedir="." default="all" name="jetty">
|
|
|
|
|
|
|
|
<property name="jetty.ver" value="6.1.26" />
|
|
|
|
- <property name="jetty.base" value="jetty-${jetty.ver}" />
|
|
|
|
- <property name="jetty.sha1" value="9485913f1a1945a849a90f1a34853d22350bc524" />
|
|
|
|
- <property name="jetty.filename" value="${jetty.base}.zip" />
|
|
|
|
- <property name="jetty.url" value="http://dist.codehaus.org/jetty/${jetty.base}/${jetty.filename}" />
|
|
|
|
- <property name="verified.filename" value="verified.txt" />
|
|
|
|
<property name="javac.compilerargs" value="" />
|
|
|
|
|
|
|
|
<target name="all" depends="build" />
|
|
|
|
-
|
|
|
|
<target name="ensureJettylib" >
|
|
|
|
- <available property="jetty.zip.available" file="${jetty.filename}" type="file" />
|
|
|
|
- <available property="jetty.zip.extracted" file="jettylib" type="dir" />
|
|
|
|
<ant target="fetchJettylib" />
|
|
|
|
<ant target="verifyJettylib" />
|
|
|
|
<ant target="extractJettylib" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
- <target name="fetchJettylib" unless="jetty.zip.available" >
|
|
|
|
- <echo message="It seems that you don't have '${jetty.filename}' deployed." />
|
|
|
|
- <echo message="The build script can download this file for you automatically," />
|
|
|
|
- <echo message="or alternatively you can obtain it manually from:" />
|
|
|
|
- <echo message="${jetty.url}" />
|
|
|
|
- <echo message="" />
|
|
|
|
- <echo message="The libraries contained in the fetched file provide the Jetty web server" />
|
|
|
|
- <echo message="(http://jetty.mortbay.org/). They are not absolutely necessary" />
|
|
|
|
- <echo message="but strongly recommended, since they are used by some applications" />
|
|
|
|
- <echo message="on top of I2P, like the router console." />
|
|
|
|
- <echo message="" />
|
|
|
|
- <echo message="Even if you deploy the Jetty archive manually into directory apps/jetty/," />
|
|
|
|
- <echo message="the build script will still attempt to verify its checksums, which must be:" />
|
|
|
|
- <echo message="SHA1 ${jetty.sha1}" />
|
|
|
|
- <echo message="" />
|
|
|
|
- <input message="Download Jetty archive automatically?" validargs="y,n" addproperty="jetty.download" />
|
|
|
|
- <fail message="Aborting as requested. Please deploy the Jetty archive manually." >
|
|
|
|
- <condition>
|
|
|
|
- <equals arg1="${jetty.download}" arg2="n"/>
|
|
|
|
- </condition>
|
|
|
|
- </fail>
|
|
|
|
- <get src="${jetty.url}" verbose="true" dest="${jetty.filename}" />
|
|
|
|
- </target>
|
|
|
|
-
|
|
|
|
- <condition property="verified.already" >
|
|
|
|
- <and>
|
|
|
|
- <available file="${jetty.filename}" />
|
|
|
|
- <uptodate property="foo.bar.baz" srcfile="${jetty.filename}" targetfile="${verified.filename}" />
|
|
|
|
- </and>
|
|
|
|
- </condition>
|
|
|
|
-
|
|
|
|
- <target name="verifyJettylib" unless="verified.already" >
|
|
|
|
- <condition property="jetty.zip.verified" >
|
|
|
|
- <checksum file="${jetty.filename}" algorithm="SHA" property="${jetty.sha1}" />
|
|
|
|
- </condition>
|
|
|
|
- <fail message="Jetty archive does not match its checksum!" >
|
|
|
|
- <condition>
|
|
|
|
- <not>
|
|
|
|
- <istrue value="${jetty.zip.verified}" />
|
|
|
|
- </not>
|
|
|
|
- </condition>
|
|
|
|
- </fail>
|
|
|
|
- <touch file="${verified.filename}" />
|
|
|
|
- </target>
|
|
|
|
-
|
|
|
|
- <target name="extractJettylib" unless="jetty.zip.extracted" >
|
|
|
|
- <!-- for .tgz -->
|
|
|
|
- <!--
|
|
|
|
- <gunzip src="${jetty.filename}" dest="jetty.tar" />
|
|
|
|
- <untar src="jetty.tar" dest="." />
|
|
|
|
- -->
|
|
|
|
- <!-- for .zip -->
|
|
|
|
- <unzip src="${jetty.filename}" dest="." />
|
|
|
|
+ <target name="verifyJettylib" />
|
|
|
|
+ <target name="fetchJettylib" />
|
|
|
|
+ <target name="extractJettylib">
|
|
|
|
<mkdir dir="jettylib" />
|
|
|
|
<!-- We copy everything to names without the version numbers so we
|
|
|
|
can update them later. Where there was something similar in Jetty 5,
|
2012-01-02 02:04:51 +00:00
|
|
|
@@ -86,30 +28,27 @@
|
|
|
|
jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
|
|
|
|
All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
|
2012-01-01 23:31:41 +00:00
|
|
|
-->
|
2012-01-02 02:04:51 +00:00
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
|
2012-01-01 23:31:41 +00:00
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/${jetty.base}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
|
2012-01-02 02:04:51 +00:00
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-java5-threadpool-${jetty.ver}.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-rewrite-handler-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
|
2012-01-01 23:31:41 +00:00
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/ext/jetty-sslengine-${jetty.ver}.jar" tofile="jettylib/jetty-sslengine.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/ant-1.6.5.jar" tofile="jettylib/ant.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/commons-el-1.0.jar" tofile="jettylib/commons-el.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jasper-compiler-5.5.15.jar" tofile="jettylib/jasper-compiler.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jasper-runtime-5.5.15.jar" tofile="jettylib/jasper-runtime.jar" />
|
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/jsp-2.0/jsp-api-2.0.jar" tofile="jettylib/jsp-api.jar" />
|
2012-01-02 02:04:51 +00:00
|
|
|
- <copy preservelastmodified="true" file="${jetty.base}/lib/servlet-api-2.5-20081211.jar" tofile="jettylib/javax.servlet.jar" />
|
2012-01-01 23:31:41 +00:00
|
|
|
- <delete file="jetty.tar" />
|
|
|
|
- <delete dir="${jetty.base}" />
|
|
|
|
- <!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over, we need it
|
|
|
|
- for org.apache.jasper.JspC compiler
|
|
|
|
- -->
|
|
|
|
- <copy preservelastmodified="true" file="../../installer/lib/launch4j/lib/commons-logging.jar" todir="jettylib/" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/commons-el-1.0.jar" tofile="jettylib/commons-el.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/commons-logging.jar" todir="jettylib/" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/el-api-2.1.jar" tofile="jettylib/el-api.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jasper-el.jar" todir="jettylib/" />
|
2012-01-02 02:04:51 +00:00
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jetty-java5-threadpool.jar" tofile="jettylib/jetty-java5-threadpool.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jetty-rewrite-handler.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
|
2012-01-01 23:31:41 +00:00
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jetty-sslengine.jar" tofile="jettylib/jetty-sslengine.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jetty-start.jar" tofile="jettylib/jetty-start.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jetty-util.jar" tofile="jettylib/jetty-util.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/jetty.jar" tofile="jettylib/org.mortbay.jetty.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/servlet-api.jar" tofile="jettylib/javax.servlet.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/java/tomcat-juli.jar" tofile="jettylib/tomcat-juli.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/jetty/lib/jsp-2.1/ant.jar" tofile="jettylib/ant.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/jetty/lib/jsp-2.1/jasper.jar" tofile="jettylib/jasper.jar" />
|
|
|
|
+ <copy preservelastmodified="true" file="/usr/share/jetty/lib/jsp-2.1/jsp-api.jar" tofile="jettylib/jsp-api.jar" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="build" depends="jar" />
|
|
|
|
|
|
|
|
<target name="builddep" />
|
|
|
|
- <target name="compile" depends="builddep, ensureJettylib" >
|
2012-01-02 02:04:51 +00:00
|
|
|
+ <target name="compile" depends="builddep, extractJettylib" >
|
2012-01-01 23:31:41 +00:00
|
|
|
<mkdir dir="./build" />
|
|
|
|
<mkdir dir="./build/obj" />
|
|
|
|
<javac
|
2012-01-02 02:04:51 +00:00
|
|
|
@@ -173,7 +112,6 @@
|
2012-01-01 23:31:41 +00:00
|
|
|
<target name="cleandep" depends="clean" />
|
|
|
|
<target name="distclean" depends="clean">
|
|
|
|
<delete dir="./jettylib" />
|
|
|
|
- <echo message="Not actually deleting the jetty libs (since they're so large)" />
|
|
|
|
</target>
|
|
|
|
<target name="reallyclean" depends="distclean">
|
|
|
|
</target>
|
2012-01-02 02:04:51 +00:00
|
|
|
@@ -181,22 +119,10 @@
|
2012-01-01 23:31:41 +00:00
|
|
|
<delete dir="./jettylib" />
|
|
|
|
<delete file="${jetty.filename}" />
|
|
|
|
</target>
|
|
|
|
- <target name="javadoc" >
|
|
|
|
- <available property="jetty.zip.available" file="${jetty.filename}" type="file" />
|
|
|
|
- <available property="jetty.zip.javadocExtracted" file="build/javadoc" type="dir" />
|
|
|
|
- <ant target="fetchJettylib" />
|
|
|
|
- <ant target="verifyJettylib" />
|
|
|
|
- <ant target="extractJavadoc" />
|
|
|
|
- </target>
|
|
|
|
- <target name="extractJavadoc" unless="jetty.zip.javadocExtracted" >
|
|
|
|
- <mkdir dir="./build" />
|
|
|
|
- <mkdir dir="./build/javadoc" />
|
|
|
|
- <unzip src="${jetty.filename}" dest="./build/javadoc" >
|
|
|
|
- <patternset>
|
|
|
|
- <include name="${jetty.base}/javadoc/" />
|
|
|
|
- </patternset>
|
|
|
|
- <mapper type="glob" from="${jetty.base}/javadoc/*" to="javadoc/*" />
|
|
|
|
- </unzip>
|
|
|
|
+ <target name="javadoc">
|
|
|
|
+ <echo message="Javadocs are available in the package "libjetty-java-doc"" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
+ <target name="extractJavadoc" />
|
|
|
|
+
|
|
|
|
</project>
|
|
|
|
--- a/apps/i2ptunnel/java/build.xml
|
|
|
|
+++ b/apps/i2ptunnel/java/build.xml
|
|
|
|
@@ -164,13 +164,15 @@
|
|
|
|
<!-- there are various jspc ant tasks, but they all seem a bit flakey -->
|
|
|
|
<java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
|
|
|
|
<classpath>
|
|
|
|
- <pathelement location="../../jetty/jettylib/jasper-compiler.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/commons-logging.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/ant.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/commons-el.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/commons-logging.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/el-api.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper-el.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/jsp-api.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/ant.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/tomcat-juli.jar" />
|
|
|
|
<pathelement location="build/i2ptunnel.jar" />
|
|
|
|
</classpath>
|
|
|
|
<arg value="-d" />
|
|
|
|
@@ -187,10 +189,12 @@
|
|
|
|
destdir="../jsp/WEB-INF/classes/" srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
|
|
|
|
<compilerarg line="${javac.compilerargs}" />
|
|
|
|
<classpath>
|
|
|
|
- <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/commons-logging.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/commons-el.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/commons-logging.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/el-api.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper-el.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/jsp-api.jar" />
|
|
|
|
<pathelement location="build/i2ptunnel.jar" />
|
|
|
|
</classpath>
|
|
|
|
--- a/apps/routerconsole/java/build.xml
|
|
|
|
+++ b/apps/routerconsole/java/build.xml
|
|
|
|
@@ -238,8 +238,10 @@
|
|
|
|
-->
|
|
|
|
<java classname="org.apache.jasper.JspC" fork="true" failonerror="true">
|
|
|
|
<classpath>
|
|
|
|
- <pathelement location="../../jetty/jettylib/jasper-compiler.jar" />
|
|
|
|
- <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/tomcat-juli.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/el-api.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper-el.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/commons-logging.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/commons-el.jar" />
|
|
|
|
@@ -273,7 +275,10 @@
|
|
|
|
srcdir="../jsp/WEB-INF/classes" includes="**/*.java">
|
|
|
|
<compilerarg line="${javac.compilerargs}" />
|
|
|
|
<classpath>
|
|
|
|
- <pathelement location="../../jetty/jettylib/jasper-runtime.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/el-api.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/jasper-el.jar" />
|
|
|
|
+ <pathelement location="../../jetty/jettylib/tomcat-juli.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/javax.servlet.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/commons-logging.jar" />
|
|
|
|
<pathelement location="../../jetty/jettylib/commons-el.jar" />
|
|
|
|
--- a/apps/susidns/src/build.xml
|
|
|
|
+++ b/apps/susidns/src/build.xml
|
|
|
|
@@ -14,8 +14,10 @@
|
|
|
|
<pathelement location="${lib}/org.mortbay.jetty.jar"/>
|
|
|
|
<pathelement location="WEB-INF/lib/jstl.jar" />
|
|
|
|
<pathelement location="WEB-INF/lib/standard.jar" />
|
|
|
|
- <pathelement location="${lib}/jasper-compiler.jar" />
|
|
|
|
- <pathelement location="${lib}/jasper-runtime.jar" />
|
|
|
|
+ <pathelement location="${lib}/jasper.jar" />
|
|
|
|
+ <pathelement location="${lib}/tomcat-juli.jar" />
|
|
|
|
+ <pathelement location="${lib}/el-api.jar" />
|
|
|
|
+ <pathelement location="${lib}/jasper-el.jar" />
|
|
|
|
<pathelement location="${lib}/javax.servlet.jar" />
|
|
|
|
<pathelement location="${lib}/jsp-api.jar" />
|
|
|
|
<pathelement location="${lib}/commons-logging.jar" />
|
|
|
|
--- a/build.xml
|
|
|
|
+++ b/build.xml
|
|
|
|
@@ -679,7 +679,7 @@
|
|
|
|
<copy file="build/i2ptunnel.jar" todir="pkg-temp/lib/" />
|
|
|
|
<!-- all jetty stuff -->
|
|
|
|
<copy todir="pkg-temp/lib" >
|
|
|
|
- <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar" />
|
|
|
|
+ <fileset dir="build" includes="commons*.jar jasper*.jar javax*.jar jetty*.jar jsp*.jar org.mortbay.jetty.jar el-api.jar tomcat-juli.jar" />
|
|
|
|
</copy>
|
|
|
|
<copy file="build/mstreaming.jar" todir="pkg-temp/lib/" />
|
|
|
|
<copy file="build/streaming.jar" todir="pkg-temp/lib/" />
|