Building JRDS

Requirements

  • Java >= 1.6.0_21
  • Ant >= 1.7

You can also found another example on asyd's blog about jrds.

Building RRD4j and JRDS

Don't forget to set the JAVA_HOME

JAVA_HOME=...
export JAVA_HOME

Start by cloning the source code from github.

git clone git://github.com/fbacchella/jrds.git jrds
cd jrds
JRDS_HOME=$PWD

Resolve dependancies using ivy.

mkdir -p $HOME/.ant/lib
curl -o $HOME/.ant/lib/ivy.jar http://repo1.maven.org/maven2/org/apache/ivy/ivy/2.2.0/ivy-2.2.0.jar
cd $JRDS_HOME
CLASSPATH=$HOME/.ant/lib/ivy.jar ant resolve

Building extra probes (optional)

Some probes like rpc or jkstat needs external library, check the ant build.xml file and build them.

FIXME

Running test

Unit test are run with ant test, the results are in build/tests/.

Building JRDS for standalone mode

The local.properties should be

appserv.home = .
appserv.servlet-api = ${appserv.home}/libjetty

Then build the standalone package

ant jetty

The build will be in build/jrds.tar.gz, with all the needed jars.

Building JRDS for usage in a application server

The local.properties should be, for a tomcat webserver :

appserv.home = .../apache-tomcat-6.0.20
appserv.servlet-api = ${appserv.home}/lib

Then build the war, that will not include the J2EE libraries

ant

The build will be in build/jrds.war, with all the needed jars included.

GUI developpement

The JRD's GUI uses the Dojo toolkit

Rebuild Dojo

Dojo is spread in many javascript files. To optimize download, they are packed in a few custom fields. After a Dojo upgrade or a modification of the dojo.require list, one should rebuild it.

cd $DOJOSRC/util/buildscripts
./build.sh releaseName=jrds localeList=en-us mini=true profileFile=$JRDS_HOME/jrds.profile.js \
      cssOptimize=comments optimize=shrinksafe action=release
cd $DOJOSRC/release/jrds
rsync -avR dojo/dojo-jrds.js dojo/dojo.js dojo/nls/dojo-jrds_en-us.js $JRDS_HOME/web
 
building.txt · Last modified: 2013/04/18 12:39 by root     Back to top