How to build {OpenGrok

The easiest way to build (or modify) {OpenGrok is by using NetBeans(v6.1 and up preferred), but you can also build {OpenGrok from the command line.

Requirements

You need the following:

  • JDK 1.6 or higher
  • Apache Ant 1.7 or later
  • The source code is located in a Mercurial repository
  • The analyzers are generated from lex by using JFlex
  • Junit 4.x for testing if you don't have Netbeans

Check out the source

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:

hg clone ssh://anon@hg.opensolaris.org/hg/opengrok/trunk opengrok-dev

Prepare the source for compilation

Copy JFlex.jar into the lib directory in the OpenGrok source. (If you are using NetBeans, you could alternatively add JFlex.jar to Ant's classpath at Tools->Options->Miscellaneous->Ant. If you are running Ant from the command line, it should also work if you put JFlex.jar into your ~/.ant/lib directory.) Optionally you need junit*.jar there too.

Compile the source

If you use NetBeans you should be able to open OpenGrok as a project and build it from there. If you want to build from the command line, execute the following command:

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.

Continuous Integration (hudson) for OpenGrok

 Hudson is hosted on http://hudson.drizzle.org/job/OpenGrok/.
 You can find open tasks there, or different bug checkers. Some of these are good for getting acquainted with the code and can be a "low hanging fruit" fixes.

Development Facts

last modified by taz on 2009/11/22 07:49
Collectives
Project


© Sun Microsystems Inc. 2009
XWiki Enterprise 1.8.2.19075 - Documentation
Terms Of Use | Privacy | Trademarks | Copyright Policy | Site Guidelines | Site map | Help
Your use of this web site or any of its content or software indicates your agreement to be bound by these Terms of Use.