Building JRDS

Requirements

  • Java >= 1.6.0_21
  • Ant >= 1.7

You can also find 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.

cp $JRDS_HOME/jrds.profile.js $DOJOSRC/
cd $DOJOSRC/util/buildscripts
./build.sh releaseName=jrds localeList=en-us mini=true profileFile=$DOJOSRC/jrds.profile.js \
      cssOptimize=comments optimize=shrinksafe action=release
cd $DOJOSRC/release/jrds
rsync -avR dojo/dojo.js dojo/nls/dojo_en-us.js $JRDS_HOME/web

Maven build

Packaging of jrds using maven is not yet ready, but external plugins can already be build using it. But as dojo is not packaged using maven it must be manually installed.

At the first try to build jrds using maven, you should get an error message like:

[ERROR] Failed to execute goal on project jrds: Could not resolve dependencies for project fr.jrds:jrds:jar:1.0-SNAPSHOT: Could not find artifact org.dojotoolkit:dojo:zip:1.10.4 in jrds (http://jrds.fr/jenkins/plugin/repository/everything) -> [Help 1]

It says that the artifact for dojo is now available and show the current dojo version (1.10.4). To solve this problem, the first step is to download the current version's pom from dojo's pom and also the zip file from http://dojotoolkit.org/download/. Once it's done, install it in your local maven repository using:

mvn install:install-file -Dfile=dojo-1.*.zip -DpomFile=dojo-1.*.pom -Dpackaging=zip
 
building.txt · Last modified: 2016/10/05 23:16 by root     Back to top