Skip to content
Jean-Rémy Falleri edited this page Aug 19, 2016 · 27 revisions

Installation

GumTree requires Java 1.8 to run. Also we use Gradle to manage the dependencies and the build of GumTree. We therefore recommend also to have Gradle.

From source

You can build GumTree with the following commands:

git clone https://github.com/GumTreeDiff/gumtree.git
cd gumtree
./gradlew build

You will have a tar.gz distribution of GumTree in the dist/build/distributions folder.

From maven

GumTree's Maven modules are available here: http://mvnrepository.com/artifact/com.github.gumtreediff.

Dealing with C files

To be able to deal with C code, you have to compile an external tool, cgum, and make it available in the path.

Usage

From the distribution

You can unzip the archives previously described, and just run the gumtree binary suited to your system. The gumtree binary takes a command as first parameter. For instance gumtree webdiff file1.java file2.java will perform a diff and will display it in a browser.

From Java

The class to run any command line in GumTree is fr.labri.gumtree.client.Run. You can check out the help of this class to discover the main commands.

For instance java fr.labri.gumtree.client.Run webdiff file1.java file2.java will compute the diff between file1.java and file2.java, and launch a local web server that will show you the output of the diff. This server is accessible via the URL http://localhost:4754/.

Clone this wiki locally