2004-08-01 05:31:15 +00:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<project basedir="." default="all" name="jetty">
|
2008-03-08 20:37:45 +00:00
|
|
|
|
2014-02-03 23:24:45 +00:00
|
|
|
<property name="jetty.ver" value="8.1.14.v20131031" />
|
2012-11-21 18:05:50 +00:00
|
|
|
<property name="jetty.base" value="jetty-distribution-${jetty.ver}" />
|
2014-02-03 23:24:45 +00:00
|
|
|
<property name="jetty.sha1" value="a6690261a822157c82fcc6327d05ac8c7dfed0a3" />
|
2011-12-23 00:56:48 +00:00
|
|
|
<property name="jetty.filename" value="${jetty.base}.zip" />
|
2012-11-21 18:05:50 +00:00
|
|
|
<property name="jetty.url" value="http://download.eclipse.org/jetty/${jetty.ver}/dist/${jetty.filename}" />
|
2008-11-14 14:48:08 +00:00
|
|
|
<property name="verified.filename" value="verified.txt" />
|
2009-04-26 15:54:51 +00:00
|
|
|
<property name="javac.compilerargs" value="" />
|
2014-02-21 13:59:27 +00:00
|
|
|
<property name="javac.version" value="1.6" />
|
2012-01-10 04:03:30 +00:00
|
|
|
<property name="tomcat.lib" value="apache-tomcat-deployer/lib" />
|
2008-03-08 20:37:45 +00:00
|
|
|
|
2004-08-01 05:31:15 +00:00
|
|
|
<target name="all" depends="build" />
|
2008-03-08 20:37:45 +00:00
|
|
|
|
2013-04-07 15:01:02 +00:00
|
|
|
<!--
|
|
|
|
- We now check in the jars we need to ${jetty.base}, so
|
|
|
|
- fetchJettylib, verifyJettylib, and extractJettylib are not used unless
|
|
|
|
- updating to a new Jetty version by changing ${jetty.ver} and ${jetty.sha1} above.
|
|
|
|
-->
|
|
|
|
|
2008-03-08 20:37:45 +00:00
|
|
|
<target name="ensureJettylib" >
|
2013-04-07 15:01:02 +00:00
|
|
|
<available property="jetty.zip.extracted" file="${jetty.base}" type="dir" />
|
|
|
|
<condition property="jetty.zip.available" >
|
|
|
|
<or>
|
|
|
|
<istrue value="${jetty.zip.extracted}" />
|
|
|
|
<available file="${jetty.filename}" type="file" />
|
|
|
|
</or>
|
|
|
|
</condition>
|
|
|
|
<ant target="copyJettylib" />
|
2004-08-01 06:46:59 +00:00
|
|
|
</target>
|
2013-04-07 15:01:02 +00:00
|
|
|
<!--
|
2012-02-29 15:12:25 +00:00
|
|
|
<target name="ensureJettylib" depends="extractJettylib" />
|
2013-04-07 15:01:02 +00:00
|
|
|
-->
|
2008-03-08 20:37:45 +00:00
|
|
|
|
|
|
|
<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="" />
|
2010-06-14 17:29:23 +00:00
|
|
|
<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:" />
|
2008-03-08 20:37:45 +00:00
|
|
|
<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}" />
|
2007-12-02 03:13:15 +00:00
|
|
|
</target>
|
2008-03-08 20:37:45 +00:00
|
|
|
|
2010-01-31 20:26:57 +00:00
|
|
|
<condition property="verified.already" >
|
2013-04-07 15:01:02 +00:00
|
|
|
<or>
|
|
|
|
<istrue value="${jetty.zip.extracted}" />
|
|
|
|
<and>
|
|
|
|
<available file="${jetty.filename}" />
|
|
|
|
<uptodate property="foo.bar.baz" srcfile="${jetty.filename}" targetfile="${verified.filename}" />
|
|
|
|
</and>
|
|
|
|
</or>
|
2010-01-31 20:26:57 +00:00
|
|
|
</condition>
|
2008-11-14 14:48:08 +00:00
|
|
|
|
2013-04-07 15:01:02 +00:00
|
|
|
<target name="verifyJettylib" depends="fetchJettylib" unless="verified.already" >
|
2008-03-08 20:37:45 +00:00
|
|
|
<condition property="jetty.zip.verified" >
|
|
|
|
<checksum file="${jetty.filename}" algorithm="SHA" property="${jetty.sha1}" />
|
|
|
|
</condition>
|
2010-01-31 05:06:50 +00:00
|
|
|
<fail message="Jetty archive does not match its checksum!" >
|
2008-03-08 20:37:45 +00:00
|
|
|
<condition>
|
|
|
|
<not>
|
|
|
|
<istrue value="${jetty.zip.verified}" />
|
|
|
|
</not>
|
|
|
|
</condition>
|
|
|
|
</fail>
|
2008-11-14 14:48:08 +00:00
|
|
|
<touch file="${verified.filename}" />
|
2005-02-16 jrandom
* (Merged the 0.5-pre branch back into CVS HEAD)
* Replaced the old tunnel routing crypto with the one specified in
router/doc/tunnel-alt.html, including updates to the web console to view
and tweak it.
* Provide the means for routers to reject tunnel requests with a wider
range of responses:
probabalistic rejection, due to approaching overload
transient rejection, due to temporary overload
bandwidth rejection, due to persistent bandwidth overload
critical rejection, due to general router fault (or imminent shutdown)
The different responses are factored into the profiles accordingly.
* Replaced the old I2CP tunnel related options (tunnels.depthInbound, etc)
with a series of new properties, relevent to the new tunnel routing code:
inbound.nickname (used on the console)
inbound.quantity (# of tunnels to use in any leaseSets)
inbound.backupQuantity (# of tunnels to keep in the ready)
inbound.length (# of remote peers in the tunnel)
inbound.lengthVariance (if > 0, permute the length by adding a random #
up to the variance. if < 0, permute the length
by adding or subtracting a random # up to the
variance)
outbound.* (same as the inbound, except for the, uh, outbound tunnels
in that client's pool)
There are other options, and more will be added later, but the above are
the most relevent ones.
* Replaced Jetty 4.2.21 with Jetty 5.1.2
* Compress all profile data on disk.
* Adjust the reseeding functionality to work even when the JVM's http proxy
is set.
* Enable a poor-man's interactive-flow in the streaming lib by choking the
max window size.
* Reduced the default streaming lib max message size to 16KB (though still
configurable by the user), also doubling the default maximum window
size.
* Replaced the RouterIdentity in a Lease with its SHA256 hash.
* Reduced the overall I2NP message checksum from a full 32 byte SHA256 to
the first byte of the SHA256.
* Added a new "netId" flag to let routers drop references to other routers
who we won't be able to talk to.
* Extended the timestamper to get a second (or third) opinion whenever it
wants to actually adjust the clock offset.
* Replaced that kludge of a timestamp I2NP message with a full blown
DateMessage.
* Substantial memory optimizations within the router and the SDK to reduce
GC churn. Client apps and the streaming libs have not been tuned,
however.
* More bugfixes thank you can shake a stick at.
2005-02-13 jrandom
* Updated jbigi source to handle 64bit CPUs. The bundled jbigi.jar still
only contains 32bit versions, so build your own, placing libjbigi.so in
your install dir if necessary. (thanks mule!)
* Added support for libjbigi-$os-athlon64 to NativeBigInteger and CPUID
(thanks spaetz!)
2005-02-16 22:23:47 +00:00
|
|
|
</target>
|
2008-03-08 20:37:45 +00:00
|
|
|
|
2013-04-07 15:01:02 +00:00
|
|
|
<target name="extractJettylib" depends="verifyJettylib" unless="jetty.zip.extracted" >
|
2011-12-23 00:56:48 +00:00
|
|
|
<!-- for .tgz -->
|
|
|
|
<!--
|
2010-01-31 05:06:50 +00:00
|
|
|
<gunzip src="${jetty.filename}" dest="jetty.tar" />
|
|
|
|
<untar src="jetty.tar" dest="." />
|
2011-12-23 00:56:48 +00:00
|
|
|
-->
|
|
|
|
<!-- for .zip -->
|
|
|
|
<unzip src="${jetty.filename}" dest="." />
|
2013-04-07 15:01:02 +00:00
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="copyJettylib" depends="extractJettylib" >
|
2005-02-16 jrandom
* (Merged the 0.5-pre branch back into CVS HEAD)
* Replaced the old tunnel routing crypto with the one specified in
router/doc/tunnel-alt.html, including updates to the web console to view
and tweak it.
* Provide the means for routers to reject tunnel requests with a wider
range of responses:
probabalistic rejection, due to approaching overload
transient rejection, due to temporary overload
bandwidth rejection, due to persistent bandwidth overload
critical rejection, due to general router fault (or imminent shutdown)
The different responses are factored into the profiles accordingly.
* Replaced the old I2CP tunnel related options (tunnels.depthInbound, etc)
with a series of new properties, relevent to the new tunnel routing code:
inbound.nickname (used on the console)
inbound.quantity (# of tunnels to use in any leaseSets)
inbound.backupQuantity (# of tunnels to keep in the ready)
inbound.length (# of remote peers in the tunnel)
inbound.lengthVariance (if > 0, permute the length by adding a random #
up to the variance. if < 0, permute the length
by adding or subtracting a random # up to the
variance)
outbound.* (same as the inbound, except for the, uh, outbound tunnels
in that client's pool)
There are other options, and more will be added later, but the above are
the most relevent ones.
* Replaced Jetty 4.2.21 with Jetty 5.1.2
* Compress all profile data on disk.
* Adjust the reseeding functionality to work even when the JVM's http proxy
is set.
* Enable a poor-man's interactive-flow in the streaming lib by choking the
max window size.
* Reduced the default streaming lib max message size to 16KB (though still
configurable by the user), also doubling the default maximum window
size.
* Replaced the RouterIdentity in a Lease with its SHA256 hash.
* Reduced the overall I2NP message checksum from a full 32 byte SHA256 to
the first byte of the SHA256.
* Added a new "netId" flag to let routers drop references to other routers
who we won't be able to talk to.
* Extended the timestamper to get a second (or third) opinion whenever it
wants to actually adjust the clock offset.
* Replaced that kludge of a timestamp I2NP message with a full blown
DateMessage.
* Substantial memory optimizations within the router and the SDK to reduce
GC churn. Client apps and the streaming libs have not been tuned,
however.
* More bugfixes thank you can shake a stick at.
2005-02-13 jrandom
* Updated jbigi source to handle 64bit CPUs. The bundled jbigi.jar still
only contains 32bit versions, so build your own, placing libjbigi.so in
your install dir if necessary. (thanks mule!)
* Added support for libjbigi-$os-athlon64 to NativeBigInteger and CPUID
(thanks spaetz!)
2005-02-16 22:23:47 +00:00
|
|
|
<mkdir dir="jettylib" />
|
2011-12-23 00:56:48 +00:00
|
|
|
<!-- We copy everything to names without the version numbers so we
|
2013-04-07 15:01:02 +00:00
|
|
|
can update them later. Where there was something similar in Jetty 5/6,
|
|
|
|
we use the same names so they will overwrite the Jetty 5/6 jar on upgrade.
|
2012-01-01 17:57:59 +00:00
|
|
|
Otherwise we use the same name as the symlink in Ubuntu /usr/share/java.
|
2011-12-23 00:56:48 +00:00
|
|
|
Reasons for inclusion:
|
|
|
|
start.jar: Needed for clients.config startup of eepsites
|
|
|
|
jetty-util-xxx.jar: LifeCycle (base class for stuff), URIUtil (used in i2psnark)
|
2012-11-22 21:17:50 +00:00
|
|
|
jetty-deploy, -http, -io, -security, -servlet, -webapp: All split out from main server jar in Jetty 7
|
|
|
|
jetty-continuation-xxx.jar: Needed? Useful?
|
|
|
|
jetty-servlets-xxx.jar: Needed for CGI for eepsite
|
|
|
|
jetty-sslengine-xxx.jar: Old Jetty 6, now a dummy
|
|
|
|
jetty-java5-threadpool-xxx.jar: Old Jetty 6, now a dummy
|
2012-01-01 17:57:59 +00:00
|
|
|
jetty-rewrite-handler: Not used by I2P, but only 20KB and could be useful for eepsites
|
2012-01-14 22:20:39 +00:00
|
|
|
jetty-management: Not used by I2P, but only 34KB and could be useful for eepsites, and we bundled it with Jetty 5
|
2014-02-03 23:24:45 +00:00
|
|
|
javax.servlet.jsp-2.2.0.v201112011158.jar: Required API
|
|
|
|
servlet-api-3.0.jar: Required API
|
2012-01-01 17:57:59 +00:00
|
|
|
All of these are available in the Ubuntu packages libjetty-java and libjetty-extra-java
|
2011-12-23 00:56:48 +00:00
|
|
|
-->
|
2012-01-01 17:57:59 +00:00
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/start.jar" tofile="jettylib/jetty-start.jar" />
|
2012-11-21 18:05:50 +00:00
|
|
|
<copy file="${jetty.base}/lib/jetty-server-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jetty.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-continuation-${jetty.ver}.jar" tofile="jettylib/jetty-continuation.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-deploy-${jetty.ver}.jar" tofile="jettylib/jetty-deploy.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-http-${jetty.ver}.jar" tofile="jettylib/jetty-http.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-io-${jetty.ver}.jar" tofile="jettylib/jetty-io.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-jmx-${jetty.ver}.jar" tofile="jettylib/org.mortbay.jmx.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-rewrite-${jetty.ver}.jar" tofile="jettylib/jetty-rewrite-handler.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-security-${jetty.ver}.jar" tofile="jettylib/jetty-security.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlet-${jetty.ver}.jar" tofile="jettylib/jetty-servlet.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-servlets-${jetty.ver}.jar" tofile="jettylib/jetty-servlets.jar" />
|
2011-12-23 00:56:48 +00:00
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-util-${jetty.ver}.jar" tofile="jettylib/jetty-util.jar" />
|
2012-11-21 18:05:50 +00:00
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-webapp-${jetty.ver}.jar" tofile="jettylib/jetty-webapp.jar" />
|
|
|
|
<copy preservelastmodified="true" file="${jetty.base}/lib/jetty-xml-${jetty.ver}.jar" tofile="jettylib/jetty-xml.jar" />
|
|
|
|
<jar destfile="jettylib/jetty-java5-threadpool.jar" >
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Note" value="Intentionally empty" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
|
|
|
<jar destfile="jettylib/jetty-sslengine.jar" >
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Note" value="Intentionally empty" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
2014-02-03 23:24:45 +00:00
|
|
|
<jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" filesetmanifest="mergewithoutmain" >
|
|
|
|
<zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/servlet-api-3.0.jar" />
|
|
|
|
<zipfileset excludes="about.html about_files about_files/* META-INF/ECLIPSEF.* META-INF/eclipse.inf plugin.properties" src="${jetty.base}/lib/jsp/javax.servlet.jsp-2.2.0.v201112011158.jar" />
|
|
|
|
</jar>
|
2012-02-29 15:12:25 +00:00
|
|
|
<!--
|
2013-04-07 15:01:02 +00:00
|
|
|
<delete file="jetty.tar" />
|
2010-01-31 05:06:50 +00:00
|
|
|
<delete dir="${jetty.base}" />
|
2012-02-29 15:12:25 +00:00
|
|
|
-->
|
2012-03-11 18:30:43 +00:00
|
|
|
<!-- commons-logging.jar not in Jetty 6 but we have it in launch4j so copy it over,
|
|
|
|
needed for old plugins and things. We add tomcat-juli below.
|
2011-12-23 00:56:48 +00:00
|
|
|
-->
|
2012-03-11 18:30:43 +00:00
|
|
|
<jar destfile="jettylib/commons-logging.jar" filesetmanifest="mergewithoutmain" >
|
|
|
|
<zipfileset excludes="META-INF/LICENSE.txt META-INF/NOTICE.txt" src="../../installer/lib/launch4j/lib/commons-logging.jar" />
|
|
|
|
</jar>
|
2012-01-10 04:03:30 +00:00
|
|
|
<ant target="copyTomcatLib" />
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<!-- Tomcat.
|
|
|
|
The glassfish jars bundled in Jetty 6 are way too old.
|
|
|
|
For compatibility with very old I2P installations where the classpath
|
|
|
|
was set individually in wrapper.config, we rename and combine the jars as follows:
|
|
|
|
jasper.jar : jasper-runtime.jar
|
|
|
|
jasper-el.jar + el-api.jar : commons-el.jar
|
2012-03-11 18:30:43 +00:00
|
|
|
tomcat-juli.jar : Add to commons-logging.jar
|
2012-01-10 04:03:30 +00:00
|
|
|
empty jar : jasper-compiler.jar
|
2012-01-10 20:17:35 +00:00
|
|
|
Also, take NOTICE and LICENSE out of each one, we bundle those separately.
|
2014-02-03 23:24:45 +00:00
|
|
|
|
|
|
|
Not as of Jetty 8 (using from Jetty):
|
|
|
|
servlet-api.jar + jsp-api.jar : javax.servlet.jar
|
|
|
|
If we go to Tomcat 7:
|
|
|
|
tomcat-api.jar + tomcat-util.jar: Add to javax.servlet.jar (as of Tomcat 7 / Jetty 8)
|
2012-01-10 04:03:30 +00:00
|
|
|
-->
|
|
|
|
<target name="copyTomcatLib" >
|
2012-03-11 18:30:43 +00:00
|
|
|
<jar destfile="jettylib/jasper-runtime.jar" filesetmanifest="merge" >
|
2012-01-10 20:17:35 +00:00
|
|
|
<zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper.jar" />
|
|
|
|
</jar>
|
2012-03-11 18:30:43 +00:00
|
|
|
<jar destfile="jettylib/commons-el.jar" duplicate="preserve" filesetmanifest="merge" >
|
2012-01-10 20:17:35 +00:00
|
|
|
<zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/jasper-el.jar" />
|
2012-01-10 04:03:30 +00:00
|
|
|
<zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/el-api.jar" />
|
|
|
|
</jar>
|
2014-02-03 23:24:45 +00:00
|
|
|
<!--
|
2012-03-11 18:30:43 +00:00
|
|
|
<jar destfile="jettylib/javax.servlet.jar" duplicate="preserve" filesetmanifest="mergewithoutmain" >
|
2012-01-10 20:17:35 +00:00
|
|
|
<zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/servlet-api.jar" />
|
2012-01-10 04:03:30 +00:00
|
|
|
<zipfileset excludes="META-INF/**/*" src="${tomcat.lib}/jsp-api.jar" />
|
2014-02-03 23:24:45 +00:00
|
|
|
<zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-api.jar" />
|
|
|
|
<zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-util.jar" />
|
2012-01-10 04:03:30 +00:00
|
|
|
</jar>
|
2014-02-03 23:24:45 +00:00
|
|
|
-->
|
2012-03-11 18:30:43 +00:00
|
|
|
<!-- Ant bug, don't set update and filesetmanifest or the update doesn't happen,
|
|
|
|
Their bug tracker claims fixed in 1.8.0 but broken for me in 1.8.1
|
|
|
|
-->
|
|
|
|
<jar destfile="jettylib/commons-logging.jar" update="true" >
|
2012-01-10 20:17:35 +00:00
|
|
|
<zipfileset excludes="META-INF/LICENSE META-INF/NOTICE" src="${tomcat.lib}/tomcat-juli.jar" />
|
|
|
|
</jar>
|
2012-03-11 18:30:43 +00:00
|
|
|
<jar destfile="jettylib/jasper-compiler.jar" >
|
|
|
|
<manifest>
|
|
|
|
<attribute name="Note" value="Intentionally empty" />
|
|
|
|
</manifest>
|
|
|
|
</jar>
|
2004-08-01 05:31:15 +00:00
|
|
|
</target>
|
2008-03-08 20:37:45 +00:00
|
|
|
|
2008-11-09 16:05:13 +00:00
|
|
|
<target name="build" depends="jar" />
|
2011-12-23 00:56:48 +00:00
|
|
|
|
2004-08-01 05:31:15 +00:00
|
|
|
<target name="builddep" />
|
2012-11-21 18:05:50 +00:00
|
|
|
|
2013-04-07 15:01:02 +00:00
|
|
|
<condition property="depend.available">
|
|
|
|
<typefound name="depend" />
|
|
|
|
</condition>
|
|
|
|
|
|
|
|
<target name="depend" if="depend.available">
|
|
|
|
<depend
|
|
|
|
cache="../../build"
|
|
|
|
srcdir="./java/src"
|
|
|
|
destdir="./build/obj" >
|
|
|
|
<classpath>
|
|
|
|
<pathelement location="../../../core/java/build/i2p.jar" />
|
|
|
|
<pathelement location="./jettylib/commons-logging.jar" />
|
|
|
|
<pathelement location="./jettylib/org.mortbay.jetty.jar" />
|
|
|
|
<pathelement location="./jettylib/javax.servlet.jar" />
|
|
|
|
<pathelement location="./jettylib/jetty-http.jar" />
|
|
|
|
<pathelement location="./jettylib/jetty-io.jar" />
|
2013-04-23 18:22:48 +00:00
|
|
|
<pathelement location="./jettylib/jetty-security.jar" />
|
2013-04-07 15:01:02 +00:00
|
|
|
<pathelement location="./jettylib/jetty-util.jar" />
|
|
|
|
<pathelement location="./jettylib/jetty-xml.jar" />
|
|
|
|
</classpath>
|
|
|
|
</depend>
|
|
|
|
</target>
|
|
|
|
|
|
|
|
<target name="compile" depends="builddep, ensureJettylib, depend" >
|
2008-11-09 16:05:13 +00:00
|
|
|
<mkdir dir="./build" />
|
|
|
|
<mkdir dir="./build/obj" />
|
|
|
|
<javac
|
|
|
|
srcdir="./java/src"
|
2014-02-21 13:59:27 +00:00
|
|
|
debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
|
2008-11-09 16:05:13 +00:00
|
|
|
destdir="./build/obj"
|
2011-02-17 12:47:35 +00:00
|
|
|
includeAntRuntime="false"
|
2013-04-23 18:22:48 +00:00
|
|
|
classpath="../../core/java/build/i2p.jar:./jettylib/commons-logging.jar:./jettylib/javax.servlet.jar:./jettylib/org.mortbay.jetty.jar:./jettylib/jetty-http.jar:./jettylib/jetty-io.jar:./jettylib/jetty-security.jar:./jettylib/jetty-util.jar:./jettylib/jetty-xml.jar" >
|
2009-04-26 15:54:51 +00:00
|
|
|
<compilerarg line="${javac.compilerargs}" />
|
|
|
|
</javac>
|
2008-11-09 16:05:13 +00:00
|
|
|
</target>
|
2011-02-17 12:47:35 +00:00
|
|
|
|
2011-06-08 20:15:53 +00:00
|
|
|
<target name="listChangedFiles" depends="jarUpToDate" if="shouldListChanges" >
|
2011-02-17 12:47:35 +00:00
|
|
|
<exec executable="mtn" outputproperty="workspace.changes" errorproperty="mtn.error2" failifexecutionfails="false" >
|
|
|
|
<arg value="list" />
|
|
|
|
<arg value="changed" />
|
|
|
|
<arg value="." />
|
|
|
|
</exec>
|
|
|
|
<!-- \n in an attribute value generates an invalid manifest -->
|
|
|
|
<exec executable="tr" inputstring="${workspace.changes}" outputproperty="workspace.changes.tr" errorproperty="mtn.error2" failifexecutionfails="false" >
|
|
|
|
<arg value="-s" />
|
|
|
|
<arg value="[:space:]" />
|
|
|
|
<arg value="," />
|
|
|
|
</exec>
|
2011-06-08 20:15:53 +00:00
|
|
|
</target>
|
|
|
|
|
2011-12-23 00:56:48 +00:00
|
|
|
<!-- With Jetty 5 we replaced classes in the jar, but with Jetty 6 we
|
|
|
|
put our stuff in its own jar so we can work with standard Jetty 6 packages
|
|
|
|
-->
|
2011-06-08 20:15:53 +00:00
|
|
|
<target name="jar" depends="compile, jarUpToDate, listChangedFiles" unless="jar.uptodate" >
|
|
|
|
<!-- set if unset -->
|
|
|
|
<property name="workspace.changes.tr" value="" />
|
2012-03-04 14:28:50 +00:00
|
|
|
<!-- old jetty 5 classes blow up the build if you forgot to do distclean -->
|
|
|
|
<delete dir="build/obj/org" />
|
2011-12-30 21:58:16 +00:00
|
|
|
<copy todir="build/obj" file="resources/log4j.properties" />
|
|
|
|
<jar destfile="./jettylib/jetty-i2p.jar" basedir="./build/obj" includes="**/*.class log4j.properties" >
|
2011-02-17 12:47:35 +00:00
|
|
|
<manifest>
|
2012-03-01 16:04:17 +00:00
|
|
|
<attribute name="Built-By" value="${build.built-by}" />
|
2011-02-17 12:47:35 +00:00
|
|
|
<attribute name="Build-Date" value="${build.timestamp}" />
|
|
|
|
<attribute name="Base-Revision" value="${workspace.version}" />
|
2013-06-12 13:42:38 +00:00
|
|
|
<!-- needed by JettyStart for pre-0.7.5 wrapper.config -->
|
|
|
|
<attribute name="Class-Path" value="jetty-deploy.jar jetty-xml.jar" />
|
2011-02-17 12:47:35 +00:00
|
|
|
<attribute name="Workspace-Changes" value="${workspace.changes.tr}" />
|
|
|
|
</manifest>
|
2008-11-09 16:05:13 +00:00
|
|
|
</jar>
|
|
|
|
</target>
|
2011-02-17 12:47:35 +00:00
|
|
|
|
|
|
|
<target name="jarUpToDate">
|
2011-12-23 15:41:05 +00:00
|
|
|
<uptodate property="jar.uptodate" targetfile="jettylib/jetty-i2p.jar" >
|
2011-02-17 12:47:35 +00:00
|
|
|
<srcfiles dir= "build/obj" includes="**/*.class" />
|
|
|
|
</uptodate>
|
2011-06-08 20:15:53 +00:00
|
|
|
<condition property="shouldListChanges" >
|
|
|
|
<and>
|
|
|
|
<not>
|
|
|
|
<isset property="jar.uptodate" />
|
|
|
|
</not>
|
|
|
|
<isset property="mtn.available" />
|
|
|
|
</and>
|
|
|
|
</condition>
|
2011-02-17 12:47:35 +00:00
|
|
|
</target>
|
|
|
|
|
2008-11-09 16:05:13 +00:00
|
|
|
<target name="clean" >
|
|
|
|
<delete dir="./build" />
|
2008-11-14 14:48:08 +00:00
|
|
|
<delete file="${verified.filename}" />
|
2008-11-09 16:05:13 +00:00
|
|
|
</target>
|
2004-08-01 05:31:15 +00:00
|
|
|
<target name="cleandep" depends="clean" />
|
|
|
|
<target name="distclean" depends="clean">
|
2010-02-07 20:16:18 +00:00
|
|
|
<delete dir="./jettylib" />
|
2012-02-29 15:12:25 +00:00
|
|
|
<!--
|
2004-08-01 05:31:15 +00:00
|
|
|
<echo message="Not actually deleting the jetty libs (since they're so large)" />
|
2012-02-29 15:12:25 +00:00
|
|
|
-->
|
2004-08-01 05:31:15 +00:00
|
|
|
</target>
|
2009-08-15 19:51:13 +00:00
|
|
|
<target name="reallyclean" depends="distclean">
|
|
|
|
</target>
|
|
|
|
<target name="totallyclean" depends="clean">
|
|
|
|
<delete dir="./jettylib" />
|
|
|
|
<delete file="${jetty.filename}" />
|
|
|
|
</target>
|
2008-11-09 16:05:13 +00:00
|
|
|
<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>
|
2010-01-31 05:06:50 +00:00
|
|
|
<include name="${jetty.base}/javadoc/" />
|
2008-11-09 16:05:13 +00:00
|
|
|
</patternset>
|
2010-01-31 05:06:50 +00:00
|
|
|
<mapper type="glob" from="${jetty.base}/javadoc/*" to="javadoc/*" />
|
2008-11-09 16:05:13 +00:00
|
|
|
</unzip>
|
|
|
|
</target>
|
|
|
|
|
2004-08-01 05:31:15 +00:00
|
|
|
</project>
|