Changes

Jump to: navigation, search

OpenGrok

456 bytes removed, 22:37, 12 November 2008
OpenGrok
== Introduction ==OpenGrok is a source code searcher similar in idea to MXR. It is very advanced and written in Java. It uses Apache Lucene to build a search database for a source code tree. This tool is perfect for the source browser new mercurial repository as it has built in hg repo parsing. There is only version number searching capability I think: you can't use my , for example, FIREFOX_3_1b1_RELEASE in the History box. If there is interest in Mozilla adopting this program, I'd be willing to write support for it. I'd also like to customize the look and feel for the OpenSolaris communityMozilla web sites. It uses Java Servlets running on Java5I have a list of things to do in my script.
== Features and Benefits ====== File History ==== [[OpenGrok maintains code version history. I am currently unsure of whether it looks at the CVS versioning information or whether it compares files between indexes. There is also options for many diffs and comparing different, non-concurrent versions.[http://cvs.opensolaris.org/source/history/on/usr/src/uts/sun/io/eri.c Examplescript|The Script]]
After ==Setup==Setting this up is fairly easy if you know your way around a little looking at unix shell. You will need the OpenSolaris OpenGrokfollowing tools:* JDK 1.5+* Servlet container - JBoss, it seems that the version histories are more Wiki style than CVS styleGlassfish, Tomcat, Jetty, etc.* Exuberant Ctags* Mercurial* Basic unix programs: sed, zip, unzip, nice, so they are arbitrarybash
==== Extendable ====If there are files which cannot be analysed by the included analysers, OpenGrok allows the user to develop their own analysers, I am unsure of whether or not there is a JavaScript analyser allready, maybe even an XPCOM/XUL analyser could be written, but I don't know assuming you have set up all the first thing about XPCOM/XUL so this maybe allready implemented in another languagerequired applications installed and configured.
==== In File Linking ====The indexer hyperlinks all symbols You are going to need to download the file opengrok binary release tarball from [http://opensolaris.org/os/project/opengrok/ OpenGrok]. Untar it (tar zxf opengrok-0.7.tar.gz) and line number make note of their declarationthe directory you put it in. If Next you will configure the symbol is following variables in multiple files it shows a list of all files which have itmy script:<pre>#Mercurial Repository to useREPO=http://hg.mozilla.org/mozilla-central <-- Change to your HG Repo
#Base directory for contentsBASEDIR==== Integrates Well ====The header and footer are completely customizable. /home/jhford/mozilla <-- This is the base directory for the OpenGrok could be integrated with the current MDC potentially. The header data files and footer are implemented through a variable which holds the copmlete html of the header and footer.HG repo
#This is the name of the data directory for OpenGrokDATADIR== Example Implementation ==[http://cvs.opensolaris.org/source/ OpenSolaris]data-dir <-- This is the folder *name* for opengrok's data
== Installation Procedure ==#This is the name of the source directory for OpenGrokSRCDIR==== Notes ====I will be listing notes src-dir <-- This is the folder *name* for my own reference, feel free to use themopengrok's copy of HG code
==== Steps ====* Install Ubuntu Linux as a server from the Ubuntu DVD* Install the following packages #OpenGrok install path - ctags -> exuberant-ctags - sun-java5-jdk - tomcat5 tomcat5-admin tomcat5-webapps - Installs GNU Java which must be removed -make (using 3.81, may need 3Where is opengrok.80)jar? -CVS* Run OGDIR="sudo update-alternatives --config java" and "apt-get remove --purge java-gcj-compat"* Change the tomcat5 config (/etchome/defaultjhford/tomcat5) to point to the new default Java runtime (opengrok/usr/lib/jvm/javaopengrok-10.5.07" <--sun/)* Setup a Mozilla code directory (mkdir /var/mozilla)* Checkout code via CVS using make from [http://ftpthis is where the OpenGrok tarball files ended up.gnu.org/pub/gnu/make/makeIt is likely where you ran "tar zxf opengrok-30.807.tar.gz GNU] [http://developer.mozilla.org/en/docs/Mozilla_Source_Code_Via_CVS Guide on CVS Checkout]* Follow guide at the [http://www.opensolaris.org/os/project/opengrok/manual OpenSolaris Project Guide]"
#OpenGrok source.war from opengrok tarballOGCONTEXT==== Important Info ====* /var/lib/tomcat5 is "grokzilla" <-- this variable defines the default $CATALINA_HOME* grokzilla in http:/etc/defaultchina:8080/tomcat5 has some configuration filesgrokzilla * My SRC_ROOT is /var/mozillaOGWAR="${OGCONTEXT}.war" <-- Likely, you will never need to change this* My DATA_ROOT is /var/tmp/opengrok_data* My run#Your application server's .sh uses a ctags at war deployment directoryWEBAPPDIR="/usrhome/binjhford/ctags not the default[http:tomcat//forumsapache-tomcat-6.polarion0.org18/viewtopic.php?t=437&sid=a17ad7393e3db6953bda83a14ea349f0 nugget]webapps" <-- This is where your app server's war deployment folder is or where you want the resulting war file<pre> [Then run the script and notice that you have opengrok! It will likely show up at http://mail-archives.apache.org/mod_mboxlocalhost:8080/tomcat-users/200104.mbox/%3C4.3.2.7.1.20010417193712.00b221c0@mail.gyldan.com%3E nugget2]grokzilla
1
edit

Navigation menu