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