
(while i want to spend another few days on it, there are more pressing things and this will meet my needs for testnet). the engine works as before, and the gui now actually plots out and follows the chart over time. The gui does have a lot of things left to be done before it can be adopted by joe sixpack - * load/store the URLs being monitored so you don't have to reenter them on each startup * clear out the x axis on refetch (now it just keeps growing, which is good and bad) * adjustable refresh rate * implement snapshots (saving all the current state files to a dir, and allowing that dir to be loaded all at once) * beautification (override the colors, etc) the net.i2p.heartbeat.** code is all public domain, BUT net.i2p.heartbeat.gui.JFreeChart* classes depend on the LGPL'ed jfreechart code, which in turn depends on apache licensed code (log4j). for the time being, this code doesn't include the jfreechart code (and dependencies), but the ant task in apps/heartbeat/java 'fetchJfreechart' downloads it and places it under apps/heartbeat/java/lib, after which you can build the GUI by running the ant task 'buildGUI' (buildGUI / etc are NOT in the standard build process). once we figure out all the details to comply with the requirements of log4j's license we'll do so. but for now, the above works.
78 lines
3.7 KiB
XML
78 lines
3.7 KiB
XML
<?xml version="1.0" encoding="UTF-8"?>
|
|
<project basedir="." default="all" name="heartbeat">
|
|
<target name="all" depends="clean, buildGUI" />
|
|
<target name="build" depends="builddep, jar">
|
|
<echo message="heartbeat engine built, but to get the heartbeat GUI, run the buildGUI target" />
|
|
<echo message="However, to build the GUI, you need to fetch it the JFreeChart package by running the fetchJfreechart target" />
|
|
</target>
|
|
<target name="fetchJfreechart">
|
|
<mkdir dir="./lib" />
|
|
<get src="http://www.jfree.org/jfreechart/jfreechart-0.9.17.zip" dest="lib/jfreechart-0.9.17.zip" />
|
|
<unzip src="lib/jfreechart-0.9.17.zip" dest="lib/" />
|
|
</target>
|
|
<target name="buildGUI" depends="build, jfreechart, jarGUI" />
|
|
<target name="builddep">
|
|
<ant dir="../../../core/java/" target="build" />
|
|
</target>
|
|
<target name="compile">
|
|
<mkdir dir="./build" />
|
|
<mkdir dir="./build/obj" />
|
|
<javac srcdir="./src" debug="true" destdir="./build/obj" includes="**/*.java" excludes="net/i2p/heartbeat/gui/**" classpath="../../../core/java/build/i2p.jar" />
|
|
</target>
|
|
<target name="compileGUI">
|
|
<mkdir dir="./build" />
|
|
<mkdir dir="./build/obj" />
|
|
<javac debug="true" destdir="./build/obj">
|
|
<src path="src/" />
|
|
<classpath path="../../../core/java/build/i2p.jar" />
|
|
<classpath path="lib/jfreechart-0.9.17/lib/jcommon-0.9.2.jar" />
|
|
<classpath path="lib/jfreechart-0.9.17/lib/log4j-1.2.8.jar" />
|
|
<classpath path="lib/jfreechart-0.9.17/jfreechart-0.9.17.jar" />
|
|
</javac>
|
|
</target>
|
|
<target name="jfreechart">
|
|
<ant dir="./lib/jfreechart-0.9.17/" antfile="ant/build.xml" target="compile" />
|
|
</target>
|
|
<target name="jar" depends="compile">
|
|
<jar destfile="./build/heartbeat.jar" basedir="./build/obj" includes="**/*.class">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.i2p.heartbeat.Heartbeat" />
|
|
<attribute name="Class-Path" value="i2p.jar heartbeat.jar" />
|
|
</manifest>
|
|
</jar>
|
|
</target>
|
|
<target name="jarGUI" depends="compileGUI">
|
|
<copy file="lib/jfreechart-0.9.17/jfreechart-0.9.17.jar" todir="build/" />
|
|
<copy file="lib/jfreechart-0.9.17/lib/log4j-1.2.8.jar" todir="build/" />
|
|
<copy file="lib/jfreechart-0.9.17/lib/jcommon-0.9.2.jar" todir="build/" />
|
|
<jar destfile="./build/heartbeatGUI.jar" basedir="./build/obj" includes="**">
|
|
<manifest>
|
|
<attribute name="Main-Class" value="net.i2p.heartbeat.gui.HeartbeatMonitor" />
|
|
<attribute name="Class-Path" value="log4j-1.2.8.jar jcommon-0.9.2.jar jfreechart-0.9.17.jar heartbeatGUI.jar i2p.jar" />
|
|
</manifest>
|
|
</jar>
|
|
<echo message="You will need to copy the log4j, jcommon, and jfreechart jar files from build/ into your lib dir" />
|
|
</target>
|
|
<target name="javadoc">
|
|
<mkdir dir="./build" />
|
|
<mkdir dir="./build/javadoc" />
|
|
<javadoc
|
|
sourcepath="./src:../../../core/java/src:../../../core/java/test" destdir="./build/javadoc"
|
|
packagenames="*"
|
|
use="true"
|
|
access="package"
|
|
splitindex="true"
|
|
windowtitle="I2P heartbeat monitor" />
|
|
</target>
|
|
<target name="clean">
|
|
<delete dir="./build" />
|
|
</target>
|
|
<target name="cleandep" depends="clean">
|
|
<ant dir="../../../core/java/" target="cleandep" />
|
|
<ant dir="../../../core/java/" target="cleandep" />
|
|
</target>
|
|
<target name="distclean" depends="clean">
|
|
<ant dir="../../../core/java/" target="distclean" />
|
|
</target>
|
|
</project>
|