updated build proc to conditionally fetch the jetty libs from http://dev.i2p.net/jettylib.tar.bz2

now the main ant 'dist' will build the web stuff as well (but ant 'build' wont)
This commit is contained in:
jrandom
2004-08-01 05:31:15 +00:00
committed by zzz
parent 96f9618081
commit bd78a66bd4
3 changed files with 58 additions and 24 deletions

25
apps/jetty/build.xml Normal file
View File

@ -0,0 +1,25 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="jetty">
<available property="jetty.available" file="jettylib" />
<target name="all" depends="build" />
<target name="fetchJettylib" unless="jetty.available" >
<echo message="The libraries contained within the fetched file are from Jetty's 4.2.21 " />
<echo message="distribution (http://jetty.mortbay.org/) which we have copied to our website since" />
<echo message="theirs doesn't have direct HTTP access to the libs. These are not " />
<echo message="necessary for using I2P, but are used by some applications on top of I2P," />
<echo message="such as the routerconsole." />
<get src="http://dev.i2p.net/jettylib.tar.bz2" verbose="true" dest="jettylib.tar.bz2" />
<untar src="jettylib.tar.bz2" compression="bzip2" dest="." />
<delete file="jettylib.tar.bz2" />
</target>
<target name="build" depends="fetchJettylib" />
<target name="builddep" />
<target name="compile" />
<target name="jar" />
<target name="clean" />
<target name="cleandep" depends="clean" />
<target name="distclean" depends="clean">
<echo message="Not actually deleting the jetty libs (since they're so large)" />
</target>
</project>

View File

@ -2,22 +2,21 @@
<project basedir="." default="all" name="routerconsole">
<target name="all" depends="clean, build" />
<target name="build" depends="builddep, jar" />
<target name="builddep" depends="jetty" >
<target name="builddep">
<ant dir="../../../router/java/" target="build" />
<!-- router will build core -->
</target>
<target name="jetty">
<untar src="jetty-4.2.21-min.tar.bz2" compression="bzip2" dest="." />
<ant dir="jetty-4.2.21-min/extra/jdk1.2/" target="all" />
<target name="prepare">
<ant dir="../../jetty/" target="build" />
</target>
<target name="compile">
<target name="compile" depends="prepare">
<mkdir dir="./build" />
<mkdir dir="./build/obj" />
<javac
srcdir="./src"
debug="true" deprecation="on" source="1.3" target="1.3"
destdir="./build/obj"
classpath="../../../core/java/build/i2p.jar:../../../router/java/build/router.jar:jetty-4.2.21-min/extra/lib/org.mortbay.jetty-jdk1.2.jar" />
classpath="../../../core/java/build/i2p.jar:../../../router/java/build/router.jar:../../jetty/jettylib/org.mortbay.jetty-jdk1.2.jar" />
</target>
<target name="jar" depends="compile">
<jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class">
@ -52,6 +51,5 @@
<target name="distclean" depends="clean">
<!-- router will clean core -->
<ant dir="../../../router/java/" target="distclean" />
<delete dir="./jetty-4.2.21-min" />
</target>
</project>

View File

@ -1,19 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="all" name="i2p">
<available property="jettylib.available" file="apps/jetty/jettylib" />
<target name="all" >
<echo message="Useful targets: " />
<echo message=" build: build existing code into ./build/, but dont clean" />
<echo message=" javadoc: generate javadoc for the entire project into ./build/javadoc" />
<echo message=" clean: clean up the ./build/ dir" />
<echo message=" distclean: clean up all derived files" />
<echo message=" dist: distclean, then build and javadoc" />
<echo message=" dist: distclean, then build and javadoc (including the web app and associated libs)" />
<echo message=" prepGUI: pull the LGPL and APL code for JFreeChart that we use in the GUIs" />
<echo message=" buildGUI: build the heartbeat and netmonitor GUIs (must have run prepGUI already)" />
<echo message=" buildWEB: build the Jetty instance and router console web application" />
<echo message=" prepWEB: pull down the Jetty libraries and whatever they depend on for the router console web application" />
<echo message=" buildWEB: build the router console web application (depends upon prepWEB)" />
</target>
<target name="dist" depends="distclean, build, javadoc" />
<target name="dist" depends="distclean, build, buildWEB, javadoc" />
<target name="build" depends="builddep, jar" />
<target name="buildclean" depends="distclean, builddep, jar" />
<target name="buildclean" depends="distclean, build" />
<target name="builddep">
<!-- build *everything* here, but only once -->
<ant dir="core/java/" target="jar" />
@ -26,6 +29,7 @@
<ant dir="apps/heartbeat/java/" target="jar" />
<ant dir="apps/netmonitor/java/" target="jar" />
<ant dir="apps/time/java/" target="jar" />
<ant dir="apps/routerconsole/java/" target="jar" />
<ant dir="installer/java/" target="jar" />
</target>
<target name="compile" />
@ -48,7 +52,8 @@
<mkdir dir="./build" />
<mkdir dir="./build/javadoc" />
<javadoc
sourcepath="core/java/src:core/java/test:router/java/src:router/java/test:apps/ministreaming/java/src:apps/i2ptunnel/java/src:apps/httptunnel/java/src"
sourcepath="core/java/src:core/java/test:router/java/src:router/java/test:apps/ministreaming/java/src:apps/i2ptunnel/java/src:apps/httptunnel/java/src:apps/routerconsole/java/src"
classpath="apps/jetty/jettylib/org.mortbay.jetty.jar"
destdir="./build/javadoc"
packagenames="*"
use="true"
@ -68,6 +73,7 @@
<ant dir="apps/sam/java/" target="distclean" />
<ant dir="apps/heartbeat/java/" target="distclean" />
<ant dir="apps/netmonitor/java/" target="distclean" />
<ant dir="apps/routerconsole/java/" target="distclean" />
<ant dir="apps/time/java/" target="distclean" />
<ant dir="installer/java/" target="distclean" />
<delete>
@ -109,20 +115,25 @@
<echo message="To run the netmonitor GUI: java -cp jfreechart-0.9.17.jar:log4j-1.2.8.jar:jcommon-0.9.2.jar -jar netviewer.jar" />
<echo message="To run the heartbeat GUI: java -cp jfreechart-0.9.17.jar:log4j-1.2.8.jar:jcommon-0.9.2.jar -jar heartbeatGUI.jar" />
</target>
<target name="buildWEB">
<target name="prepWEB">
<ant dir="apps/jetty" target="fetchJettylib" />
</target>
<target name="buildWEB" if="jettylib.available">
<ant dir="apps/routerconsole/java" target="build" />
<copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
<copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/extra/lib/org.mortbay.jetty-jdk1.2.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/ant.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jasper-compiler.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jasper-runtime.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jcert.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jnet.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/xercesImpl.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/xml-apis.jar" todir="build/" />
<copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/javax.servlet.jar" todir="build/" />
<echo message="You will need the org.*, ant.jar, jasper-*.jar, jcert.jar, jnet.jar, xerces.jar, xml-apis.jar, and routerconsole.jar in your router's classpath" />
<echo message="In addition, you will need to place the routerconsole.war file under your i2p install dir as webapps/routerconsole.war" />
<copy file="apps/jetty/jettylib/org.mortbay.jetty.jar" todir="build/" />
<copy file="apps/jetty/jettylib/org.mortbay.jetty-jdk1.2.jar" todir="build/" />
<copy file="apps/jetty/jettylib/ant.jar" todir="build/" />
<copy file="apps/jetty/jettylib/jasper-compiler.jar" todir="build/" />
<copy file="apps/jetty/jettylib/jasper-runtime.jar" todir="build/" />
<copy file="apps/jetty/jettylib/jnet.jar" todir="build/" />
<copy file="apps/jetty/jettylib/xercesImpl.jar" todir="build/" />
<copy file="apps/jetty/jettylib/xml-apis.jar" todir="build/" />
<copy file="apps/jetty/jettylib/javax.servlet.jar" todir="build/" />
<echo message="You will need the org.*, ant.jar, jasper-*.jar, jnet.jar, xercesImpl.jar, xml-apis.jar, " />
<echo message="and routerconsole.jar in your router's classpath. In addition, you will need to place the " />
<echo message="routerconsole.war file under your i2p install dir as webapps/routerconsole.war and will want " />
<echo message="to add the RouterConsoleRunner to the router's clientApp list (it must be in the router's JVM)" />
</target>
</project>