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