XRadar basic architecture

The main running platform for the XRadar used to be ant, but since 1.0, xradar has become a java based software. The goals of this plafform changes are :

  1. Better way to logging, trace and debug xradar transformation
  2. Ease the integration of xradar in other platform (java command line tool,ant, maven, maven2, Eclipse,...) and especially maven2, as a maven2 plugin is the our main target at this moment.
  3. Ease packaging: XRadar will now be released as a simple jars.
This idea has been very successful for tools such as checkstyle or PMD, so we decide to do the some with XRadar !

XRadar protocol

To package all the resources of xradar ( stylesheets, img, properties...) in one jar, we designed a URL resolver that handle a xradar specific protocol. This resolver is able to resolve url such as this one:

xradar://stylesheets/radar/static/graph/style.xsl
				

In this example, the resolver will look for the file /radar/static/graph/style.xsl in the classpath. Most likely, this file will be found in the xradar-1.0.jar (however, note that you can add your own entry in classpath to override specific part of xradar; a "nice to have" feature). If this fails, meaning, the resources is NOT in the classpath, it uses the same part of the url to look, relativly in the file system ( so in this case, it will look for './radar/static/graph/style.xsl' on the file-system).

Note the first word 'stylesheets' is the host on a generic URL semantic. Here, it serves no purpose. So i just use it as a classifier for the file that addresses the url:

  1. stylesheets, is used obviously when you load an xsl file.
  2. resources, is used for static resources such as jpg files or xml file.

This semantic is NOT mandatory, sometime the xslt engine retrieve de default context and may load an xml file with the 'stylesheets' host. However, you should stick to this convention when add manually url to the files.

Where can i find those file path

We tried to externalize almost everything ( all the filename of the xslt for instance) in the org.sourceforge.xradar.statics.defaultValues.properties files. This file can also be overriden using the same classpath tricks. So if you want to modify some xslt to correct a bug or try something, you can simply override anything by adding in the classpath, before the xradar.jar.

I want to change an xslt and try the modification, how can i do it ?

Well, the simple way is to use mvn2 to package a new version. Just run :

$ mvn clean site package ; mv target/xradar-1.0-beta.jar
				

Run the testproject and see what you get !

Note that site must be run in order to have a successfull package task

I have trouble, i want more info about what's going on inside xradar

XRadar java uses the java logging api provided by the java. To have verbose logging, use the provided logging file in the src/main/resources:

export ANT_OPTS="-Djava.util.logging.config.file=../src/main/resources/logging.properties"
					
This is logging already a lot of stuff, but if you want, please had more logs in the java source code !

I want to help, but want can i do

Look to the TODO or FIXME tags inside the source code and see what you can do about it, or simply try to write any missing javadoc. If you can't write the javadoc, that means that it SHOULD be written done !