-
Notifications
You must be signed in to change notification settings - Fork 175
Getting Started
GumTree requires Java 11 to run. Also we use Gradle to manage the dependencies and the build of GumTree. We therefore recommend also to have Gradle.
- You have to install srcML if you want to diff C++ and C# code
- You have to install cgum if you want to diff C code
- You have to install pythonparser to diff Python code
All external tools have to be available in your system's path.
You can download a release of GumTree directly on GitHub. Unzip the file and you will find gumtree's binaries in the bin
folder.
You can build GumTree with the following commands:
git clone https://github.com/GumTreeDiff/gumtree.git
cd gumtree
./gradlew build -x test
You will have a zip
distribution of GumTree in the dist/build/distributions
folder. The gumtree
binary is located in the bin
folder contained in this archive.
- Instead of
./gradlew build -x test
, rungradlew.bat build -x test
- If you get an
The input line is too long. The syntax of the command is incorrect.
error when trying to rungumtree.bat
, then you've just bumped into a Gradle issue, see comments from there for possible workarounds.
GumTree's Maven modules are available here: http://mvnrepository.com/artifact/com.github.gumtreediff.
You can use our docker image. Follow our instructions.
You can unzip the archive 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.
The class containing the main
method to run GumTree is com.github.gumtreediff.client.Run
. You can run this class without parameters to find out the available commands. Note that if you want to have all available commands and parsers at your disposal, you need to set up the classpath to include the projects of the gumtree distribution.
For instance, the arguments 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:4567/.