Using jardiff is relatively simple, I suggest just grabbing the jardiff-0.1-uber.jar, as this is executable from the command line, and includes all the dependencies.
If you ever need to list the options that jardiff understands
java -jar jardiff-0.1-uber.jar --helpThis lists all the options as follows:
usage: JarDiff -f <from jar> -t <to jar> [-F <from name>] [-T <to name>]
[[-o <xml|html|xhtml|text>]|[-x <xsl file>]] [-O <file>]
[-s <href>] [-fa <href>] [-ta <href>]
-o,--output-format output format, xml or html
-F,--from-name from name
-T,--to-name to name
-O,--out output file
-f,--from from jar file
-h,--help print help on command line arguments
-t,--to to jar file
-x,--xsl custom xsl sheet to format output with
-fa,--from-api relative location of from api
-ta,--to-api relative location of to api
-s,--stylesheet stylesheet to link to when generating html
For instance, the following would be a typical invocation:
java -jar jardiff-0.1-uber.jar -f jardiff-0.1.jar -t jardiff-0.2.jar -o text
This will print out in text the public API changes between jardiff-0.1.jar and jardiff-0.2.jar
Another typical invocation would be to write a html report on the differences between two versions of a project, for example:
java -jar jardiff-0.1-uber.jar -f myproject-0.1.jar -t myproject-0.2.jar -o html -O diff-0.1-0.2.html
This will write a file called "diff-0.1-0.2.html" in the current directory.
If you want to read the raw xml report. (Jardiff uses xml for it's own
internal format, and uses built in stylesheets to convert output to
text, html and xhtml) you would use -o xml.
If you're brave enough to build your own style sheet for jardiff. (It's
probably a good idea to use one of the built in stylesheets and build
upon it if you want to do this, the built in xml format is not that
easy to deal with), you would specify -x mystylesheet.xsl.
The stylesheet argument specifies a relative href to a stylesheet to be used, this is used instead of the generated style information.
The from-api and to-api arguments specify hrefs to the api docs for the from api, and api docs for the to api.
An example of command line execute is included in the distribution in the src/examples directory.