OpenGrok Setup for source code browsing

Daily routine for any developer is to search the code base for occurrence of a variable, function call and rest. Some times we remember the function name but forget to file name of the function.

Having tools like eclipse would solve this problem, but what if you have to look  for code for multiple techonlogies like c++, java and different release versions.

And if non developer wants to check a snippet of code, it would be next to impossible task..

Open Grok solves all  this problem.

OpenGrok is a source code search and cross reference engine. It helps programmers to search, cross-reference and navigate source code trees.

 Following are list of steps for installing and using opengrok..

 Required components:
1. Open Grok Binary
2. Ctags
3. Apache Tomcat

1. Copy Open Grok to a specific folder. .extract opengrok (say C:\opengrok)
2. Copy Ctags to a specific folder. (say C:\ctags)
3. Generatae Configiration.xml file using above command.

C:\opengrok\lib>java -jar opengrok.jar -W C:\opengrok\configuration.xml -c C:\ctags\ctags.exe  -P -S -v -s  C:\CodeSource -d C:\opengrok\grokdata

4. this would generate a configuration.xml file

Confiugration.xml file :

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.7.0_09" class="java.beans.XMLDecoder">
 <object class="org.opensolaris.opengrok.configuration.Configuration">
  <void property="cmds">
   <object class="java.util.Collections" method="unmodifiableMap">
    <object class="java.util.HashMap">
     <void method="put">
     <void method="put">
  <void property="ctags">
  <void property="dataRoot">
  <void property="sourceRoot">
  <void property="verbose">

5.   extract. source.war file present in C:\opengrok\lib
edit web.xml file:

  <description>A wicked fast source browser</description>
    <description>Full path to the configuration file where OpenGrok can read it's configuration</description>

6. create war file again and deploy it in tomcat foler.