Home | History | Annotate | Download | only in doc
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      3 <html xmlns="http://www.w3.org/1999/xhtml">
      4     <head>
      5         <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
      6         <title>How to build {OpenGrok</title>
      7     </head>
      8     <body>
      9         <h1>How to build {OpenGrok</h1>
     10         <p>The easiest way to build (or modify) {OpenGrok is by using
     11             <a href="www.netbeans.org">NetBeans</a>, but you can also build
     12             {OpenGrok from the command line.
     13         </p>
     14         <h2>Requirements</h2>
     15         <p>You need the following:</p>
     16         <ul>
     17             <li><a href="http://java.sun.com/javase/downloads/index.jsp">JDK</a>
     18             1.5 or higher</li>
     19             <li><a href="http://ant.apache.org/">Apache Ant</a> 1.6.5 or later
     20             if you don't intend to build using NetBeans</li>
     21             <li>The source code is located in a 
     22                 <a href="http://www.selenic.com/mercurial/wiki/">Mercurial</a> 
     23             repository</li>
     24             <li>The analyzers are generated from lex by using
     25             <a href="http://jflex.de/">JFlex</a></li>
     26         </ul>
     27         
     28         <h2>Check out the source</h2>
     29         <p>The first thing you need to do is to check out the source code. You
     30             might do this from within NetBeans if you have the Mercurial plugin
     31             installed, or you can check out the source with the following 
     32             command:
     33         </p>
     34 
     35         <pre>hg clone ssh://anon&#64;hg.opensolaris.org/hg/opengrok/trunk</pre>
     36         
     37         <h2>Prepare the source for compilation</h2>
     38         <p>Copy <code>JFlex.jar</code> into the <code>lib</code> directory in
     39         the OpenGrok source. (If you are using NetBeans, you could
     40         alternatively add JFlex.jar to Ant's classpath at
     41         Tools-&gt;Options-&gt;Miscellaneous-&gt;Ant. If you are
     42         running Ant from the command line, it should also work if you put
     43         JFlex.jar into your <code>~/.ant/lib</code> directory.)
     44         </p>
     45         
     46         <h2>Compile the source</h2>
     47         <p>If you use NetBeans you should be able to open OpenGrok as a project
     48             and build it from there. If you want to build from the command line,
     49         execute the following command:</p>
     50 
     51         <pre>ant</pre>
     52 
     53         <p>If the build is successful, you should now find the
     54         binaries under the <code>dist</code> directory.</p>
     55 
     56     </body>
     57 </html>
     58