-
Notifications
You must be signed in to change notification settings - Fork 756
How to build OpenGrok from source
The easiest way to build (or modify) {OpenGrok is by using NetBeans (latest preferred), but you can also build {OpenGrok from the command line.
You need the following:
- JDK 1.8 or higher
- Apache Ant 1.9 or later
- The source code is located in a git repository
- First build has to happen with ant/mvn which downloads all dependencies
- Junit 4.x for testing if you don't have Netbeans
The first thing you need to do is to check out the source code. You might do this from within NetBeans if you have the Mercurial plugin installed, or you can check out the source with the following command:
git clone https://github.com/OpenGrok/OpenGrok
(or clone any of your forks)
OpenGrok uses ant project as main one. Please select the top directory or the opengrok-web-nbproject as 2 possible netbeans projects.
OpenGrok does have a maven pom.xml for its modules, but these are not really tested to work with IDEs (though feel free to improve them to get mvn work with IDEs in better way).
First build should download all needed dependencies, so don't get scared about missing jars.
If you use NetBeans you should be able to open OpenGrok as a project and build it from there(ignore "Resolve problem" for jar files other than junit, but setup a webapp server for the -web-nbproject application). If you want to build from the command line, execute the following command(it will need internet connection first time, so setup any proxies if needed):
ant
If the build is successful, you should now find the binaries under the dist
directory.
Or if you want to use junit testing + javadoc generation target, you can try:
ant default
If the build is successful, you should have javadoc in dist/javadoc
directory & junit test results in build/test/results/*.xml
directory.
For other setup & development tools like findbugs, checkstyle, pmd, ... please refer to README.txt in the downloaded/cloned sources.
Note that there is an experimental maven build system being implemented. If you want to help with it, we'd only be glad.
Travis CI: OpenGrok on Travis
Inspecting indexes: Luke - this site is abandoned, we maintain a fork on tarzanek/Luke