201N/A<?xml version="1.0" encoding="UTF-8"?>
201N/A<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
201N/A<html xmlns="http://www.w3.org/1999/xhtml">
201N/A <head>
201N/A <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
201N/A <title>How to build {OpenGrok</title>
201N/A </head>
201N/A <body>
201N/A <h1>How to build {OpenGrok</h1>
201N/A <p>The easiest way to build (or modify) {OpenGrok is by using
1086N/A <a href="http://www.netbeans.org">NetBeans</a>, but you can also build
201N/A {OpenGrok from the command line.
201N/A </p>
201N/A <h2>Requirements</h2>
201N/A <p>You need the following:</p>
201N/A <ul>
201N/A <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>
1086N/A 1.6 or higher</li>
1318N/A <li><a href="http://ant.apache.org/">Apache Ant</a> 1.8 or later
201N/A if you don't intend to build using NetBeans</li>
201N/A <li>The source code is located in a
201N/A <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a>
201N/A repository</li>
222N/A <li>The analyzers are generated from lex by using
201N/A <a href="http://jflex.de/">JFlex</a></li>
201N/A </ul>
201N/A
201N/A <h2>Check out the source</h2>
201N/A <p>The first thing you need to do is to check out the source code. You
201N/A might do this from within NetBeans if you have the Mercurial plugin
201N/A installed, or you can check out the source with the following
201N/A command:
201N/A </p>
229N/A
229N/A <pre>hg clone ssh://anon&#64;hg.opensolaris.org/hg/opengrok/trunk</pre>
201N/A
201N/A <h2>Prepare the source for compilation</h2>
201N/A <p>Copy <code>JFlex.jar</code> into the <code>lib</code> directory in
222N/A the OpenGrok source. (If you are using NetBeans, you could
222N/A alternatively add JFlex.jar to Ant's classpath at
222N/A Tools-&gt;Options-&gt;Miscellaneous-&gt;Ant. If you are
222N/A running Ant from the command line, it should also work if you put
222N/A JFlex.jar into your <code>~/.ant/lib</code> directory.)
222N/A </p>
201N/A
201N/A <h2>Compile the source</h2>
201N/A <p>If you use NetBeans you should be able to open OpenGrok as a project
201N/A and build it from there. If you want to build from the command line,
201N/A execute the following command:</p>
229N/A
229N/A <pre>ant</pre>
222N/A
222N/A <p>If the build is successful, you should now find the
222N/A binaries under the <code>dist</code> directory.</p>
222N/A
201N/A </body>
201N/A</html>