source: build.xml @ 4723127

Last change on this file since 4723127 was 4723127, checked in by zzz <zzz@…>, 16 years ago

added ref for the 0.4 routerconsole stuff, but its not ready for use, so, er, dont use it

  • Property mode set to 100644
File size: 8.1 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
2<project basedir="." default="all" name="i2p">
3    <target name="all" >
4        <echo message="Useful targets: " />
5        <echo message="  build:     build existing code into ./build/, but dont clean" />
6        <echo message="  javadoc:   generate javadoc for the entire project into ./build/javadoc" />
7        <echo message="  clean:     clean up the ./build/ dir" />
8        <echo message="  distclean: clean up all derived files" />
9        <echo message="  dist:      distclean, then build and javadoc" />
10        <echo message="  prepGUI:   pull the LGPL and APL code for JFreeChart that we use in the GUIs" />
11        <echo message="  buildGUI:  build the heartbeat and netmonitor GUIs (must have run prepGUI already)" />
12        <echo message="  buildWEB:  build the Jetty instance and router console web application" />
13    </target>
14    <target name="dist" depends="distclean, build, javadoc" />
15    <target name="build" depends="builddep, jar" />
16    <target name="buildclean" depends="distclean, builddep, jar" />
17    <target name="builddep">
18        <!-- build *everything* here, but only once -->
19        <ant dir="core/java/" target="jar" />
20        <ant dir="router/java/" target="jar" />
21        <ant dir="apps/ministreaming/java/" target="jar" />
22        <ant dir="apps/i2ptunnel/java/" target="jar" />
23        <ant dir="apps/httptunnel/java/" target="jar" />
24        <ant dir="apps/phttprelay/java/" target="jar" />
25        <ant dir="apps/sam/java/" target="jar" />
26        <ant dir="apps/heartbeat/java/" target="jar" />
27        <ant dir="apps/netmonitor/java/" target="jar" />
28        <ant dir="apps/time/java/" target="jar" />
29        <ant dir="installer/java/" target="jar" />
30    </target>
31    <target name="compile" />
32    <target name="jar" depends="compile" >
33        <copy file="core/java/build/i2p.jar" todir="build/" />
34        <copy file="router/java/build/router.jar" todir="build/" />
35        <copy file="apps/ministreaming/java/build/mstreaming.jar" todir="build/" />
36        <copy file="apps/i2ptunnel/java/build/i2ptunnel.jar" todir="build/" />
37        <copy file="apps/httptunnel/java/build/httptunnel.jar" todir="build/" />
38        <copy file="apps/phttprelay/java/build/phttprelay.war" todir="build/" />
39        <copy file="apps/sam/java/build/sam.jar" todir="build/" />
40        <copy file="apps/heartbeat/java/build/heartbeat.jar" todir="build/" />
41        <copy file="apps/netmonitor/java/build/netmonitor.jar" todir="build/" />
42        <copy file="apps/time/java/build/timestamper.jar" todir="build/" />
43        <copy file="installer/java/build/install.jar" todir="build/" />
44        <copy file="installer/java/build/guiinstall.jar" todir="build/" />
45        <copy file="installer/java/build/fetchseeds.jar" todir="build/" />
46    </target>
47    <target name="javadoc">
48        <mkdir dir="./build" />
49        <mkdir dir="./build/javadoc" />
50        <javadoc 
51            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" 
52            destdir="./build/javadoc" 
53            packagenames="*" 
54            use="true" 
55            splitindex="true" 
56            windowtitle="I2P" />
57    </target>
58    <target name="clean">
59        <delete dir="./build" />
60    </target>
61    <target name="distclean" depends="clean">
62        <ant dir="core/java/" target="distclean" />
63        <ant dir="router/java/" target="distclean" />
64        <ant dir="apps/ministreaming/java/" target="distclean" />
65        <ant dir="apps/i2ptunnel/java/" target="distclean" />
66        <ant dir="apps/httptunnel/java/" target="distclean" />
67        <ant dir="apps/phttprelay/java/" target="distclean" />
68        <ant dir="apps/sam/java/" target="distclean" />
69        <ant dir="apps/heartbeat/java/" target="distclean" />
70        <ant dir="apps/netmonitor/java/" target="distclean" />
71        <ant dir="apps/time/java/" target="distclean" />
72        <ant dir="installer/java/" target="distclean" />
73        <delete>
74            <fileset dir="." includes="**/*.class" />
75            <fileset dir="." includes="**/*.java~" />
76        </delete>
77    </target>
78    <target name="distGUI" depends="clean, buildGUI">
79        <mkdir dir="build/lib" />
80        <copy file="apps/jfreechart/jfreechart-0.9.17/jfreechart-0.9.17.jar" todir="build/lib" />
81        <copy file="apps/jfreechart/jfreechart-0.9.17/lib/log4j-1.2.8.jar" todir="build/lib" />
82        <copy file="apps/jfreechart/jfreechart-0.9.17/lib/jcommon-0.9.2.jar" todir="build/lib" />
83        <copy file="apps/jfreechart/GUI-licenses.txt" todir="build/" />
84        <copy file="apps/netmonitor/java/build/netviewer.jar" todir="build/lib" />
85        <copy file="apps/heartbeat/java/build/heartbeatGUI.jar" todir="build/lib" />
86        <zip destfile="build/gui.zip" basedir="build/" includes="GUI-licenses.txt lib/*.jar" />
87    </target>
88    <target name="prepGUI">
89        <echo message="The code being fetched comes from http://www.jfree.org/jfreechart/" />
90        <echo message="It includes code licensed under the LGPL and the APL - please see" />
91        <echo message="the JFreeChart site (or the info downloaded) for source and details" />
92        <ant dir="apps/jfreechart/" target="fetchJfreechart" />
93        <ant dir="apps/jfreechart/" target="build" />
94    </target>
95    <target name="buildGUI">
96        <echo message="Building the GUIs for the heartbeat and netmonitor apps, which depend upon" />
97        <echo message="the JFreeChart and related packages.  The following will fail if you haven't" />
98        <echo message="already run 'ant prepGUI' to fetch the LGPL/APL'ed code" />
99        <ant dir="apps/heartbeat/java" target="buildGUI" />
100        <ant dir="apps/netmonitor/java" target="buildGUI" />
101        <copy file="apps/jfreechart/jfreechart-0.9.17/jfreechart-0.9.17.jar" todir="build/" />
102        <copy file="apps/jfreechart/jfreechart-0.9.17/lib/log4j-1.2.8.jar" todir="build/" />
103        <copy file="apps/jfreechart/jfreechart-0.9.17/lib/jcommon-0.9.2.jar" todir="build/" />
104        <copy file="apps/jfreechart/GUI-licenses.txt" todir="build/" />
105        <copy file="apps/netmonitor/java/build/netviewer.jar" todir="build/" />
106        <copy file="apps/heartbeat/java/build/heartbeatGUI.jar" todir="build/" />
107        <echo message="GUIs created.  You will need the following files to run them: " />
108        <echo message="jfreechart-0.9.17.jar log4j-1.2.8.jar jcommon-0.9.2.jar" />
109        <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" />
110        <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" />
111    </target>
112    <target name="buildWEB">
113        <ant dir="apps/routerconsole/java" target="build" />
114        <copy file="apps/routerconsole/java/build/routerconsole.jar" todir="build/" />
115        <copy file="apps/routerconsole/java/build/routerconsole.war" todir="build/" />
116        <copy file="apps/routerconsole/java/jetty-4.2.21-min/extra/lib/org.mortbay.jetty-jdk1.2.jar" todir="build/" />
117        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/ant.jar" todir="build/" />
118        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jasper-compiler.jar" todir="build/" />
119        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jasper-runtime.jar" todir="build/" />
120        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jcert.jar" todir="build/" />
121        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/jnet.jar" todir="build/" />
122        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/xercesImpl.jar" todir="build/" />
123        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/xml-apis.jar" todir="build/" />
124        <copy file="apps/routerconsole/java/jetty-4.2.21-min/ext/javax.servlet.jar" todir="build/" />
125        <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" />
126        <echo message="In addition, you will need to place the routerconsole.war file under your i2p install dir as webapps/routerconsole.war" />
127    </target>
128</project>
Note: See TracBrowser for help on using the repository browser.