Information for Developers

Contents:

I SVNSearcher:

II SVNIndexer:


III SVNIndexer-webapplication:

I SVNSearcher:

About project

SVNSearcher is an open source project. Main functionality is indexing and fulltext searching in SVN documents.
SVNSearcher includes two application: SVNIndexer (Java application) and SVNIndexer-webapplication (Java web application).

SVNIndexer makes index files based on Apache Lucene

SVNIndexer-webapplication is a client of Apache Lucene index files and also provides user interface on web site.

You can download, use and develope the project according to OpenSource licence.

Project improving

  • Changes in user configuration file(s):

    • Now if user wants to index many repositories (from different URLs) must start SVNIndexer many times with other configuration (properties) file. All repositories must has the same authorization option or have disabled this option - there is only 1 properties file for all configuration. SVNIndexer write infrmation about indexed repositories to index as only URL + repositoryName for each repository.


    • This should be changed for:
      • Each repository can have own properties file, or if doesn't have or file doesn't have set all properties then rest information are got from defult property file.
      • In each property file must be declared at least repository Name. Other information (also URL) can be got from default file.
      • Default file must have declared at least URL.
      • ULR + repName is a unique String, for all repisitories in index.

    • Working after change in SVNIndexer:

      • Firstly SVNIndexer tries to get repositories Names from directPath (given special URL in default file, or path in local file system). For each found repName adds URL from default file (and also other information if defined in default file). That prepared repositories list is a special Java object. Each repository is also one special Java object.
      • After this (or if directPath wasn't declared) SVNIndexer takes propeties files (names of these files are freely). From each file takes repName and URL if exists (if not URL is taken from default file) and check if this URL + repName is on the special repositories list. If it is, then update information from list by the information from property file.
      • For each repository on special list try to connect to them, adds URL + repName to index and update each repository.

    • SVNIndexer-webapplication then will be working:

      • Prepare special list with repositories information.
      • For each file must specify URL + repName (get '/' repository and all before this is URL + repName) and groups, found in query, files in groups for the same authorization file and authorize each groups.

      Note that this solution doesn't need to keep other information in index like: user, password, auth file path, but has high complexity.

  • Currently external library to recognizing files type (JMimeMagic) doesn't work well with some encodings
  • Other ideas, but not precisely stated (depends on individual needs):

  • User can set directories as observed and receives e-mail after change in these directories. Main problems connected with this idea:
    • How to authorize user and what if rights for observed directories was changed?
    • How often user will receive e-mail? Sending e-mails after each commit makes huge traffic. Some solution is that user clicks on special link in e-mail after received e-mail.

If you have some idea how to improve SVNSearcher in these or other ways please visit project's forum and write about it.

II SVNIndexer:

Management

SVNIndexer application is management by Apache Maven tool, so you have to install Apache Maven if you want to compile project.

In source package (you can get it from Download section) you can find prepared pom.xml file with all external libraries needed to compile SVNIndexer.

To install all dependencies mentioned in pom.xml, to you local Maven repository,
run script.sh (Linux/Unix) or script.bat (Windows). Note that this installation scripts
use enviroment variable $MY_LIBRARY_PATH. This variable will be automatically set
if you start scripts from SVNIndexer project directory.

Now you can execute mvn compile or mvn package to build SVNIndexer with your changes in source files.

Content description

  • /lib: Content all needed external libraries (dependencies from pom.xml). If you add new library to project, put here *.jar files and add successive inscription to pom.xml, Meta-Inf/Manifest.mf and installation scripts.


  • Meta-Inf/Manifest.mf: Manifest file needed to create jar file. Content also information about Class-Path to all external library in /lib


  • /src: Java source files directory.


  • /src/config.xml: Configuration file which describes all Classes which implement interfaces (currently for parsing each file type and recognizing file type)


  • conf.properties: Property file template with description for all properties.


  • listExample.txt: Example file with repositories names.


  • log4j.properties: Configuration file for log4j libraries. This file is excluded from SVNIndexer.jar file, that user can modify settings about logs.


  • readme.txt: User should see in this file only description about installation. Developers should see extra information about compilation.


  • script.bat script.sh: External library installation scripts (on Linux/Unix and Windows)


  • startJar.bat startJar.sh: This scripts run application (on Linux/Unix and Windows). User can start it manually or using Cron.
    Note that if you make jar file for SVNIndexer (default in /target directory) these scripts need to have jar file directly in project directory.


  • addCron.sh: This scripts adds task of running indexing to cron tab.


  • pom.xml: The Project Object Model (POM) for SVNIndexer


III SVNIndexer-webapplication:

Management

SVNIndexer-webapplication is management by Apache Maven tool, so you have to install Apache Maven if you want to compile project.

In source package (you can get it from Download section) you can find prepared pom.xml file with all external libraries needed to compile SVNIndexer-webapplication.

To install all dependencies mentioned in pom.xml, to you local Maven repository,
run script.sh (Linux/Unix) or script.bat (Windows). Note that this installation scripts
use enviroment variable $MY_LIBRARY_PATH. This variable will be automatically set
if you start scripts from SVNIndexer-webapplication project directory.

Now you can execute mvn compile or mvn package to build SVNIndexer with your changes in source files.

Content description

  • /Authorization: Content files needed to compile libAuthorization.so module.


  • /Authorization/svn_authz_test: this file is currently not using. This ruby script is alternative method to authorize user without libAuthorization.so module.


  • readme.txt: User should see in this file only description about installation. Developers should see extra information about compilation.


  • script.bat script.sh: External library installation scripts (on Linux/Unix and Windows)


  • pom.xml: The Project Object Model (POM) for SVNIndexer-webapplication


  • /public_html: Directory with JSP application files


  • /public_html/Web-inf/web.xml: Configuration file for web application. Note that uset must set here path to property file and also configure Tomcat authorization options.


  • /public_html/text: Directory with pages text content for web application. If you add new language version for web application, put here properties file.


  • /public_html/Web-inf/lib: Content all needed external libraries (dependencies from pom.xml). If you add new library to project, put here *.jar files and add successive inscription to pom.xml and installation scripts


Knows bugs

  • After each query, in Searcher.java key words from query are matched to found file body and each found word in body is made bolded (by adding "<b></b>" ).
    If query has "b b ..." single (one or more) letter then each process of bolding body words makes "b" in before tags: "<b></b>" another bold.
    This bug should be fixed by not taking added "<b></b>" as file body.


  • SVNIndexer-webapplication has multi language supports (using TagLib library i18n in JSP files), but messages from Servlet (Searcher.java) are not translated and are only in English (for example: messages about Errors or tags on page bottom)
    This can be corrected by checking locales and addind library for translate in classes Searcher.java and NavigatorTagHandler.java


Trademarks

Acrobat, Adobe, PDF and Reader are registered trademarks of Adobe Systems Incorporated.

Linux is a registered trademark of Linus Torvalds.

Microsoft, Word, Excel, PowerPoint, Office, Windows are registered trademarks of Microsoft Corporation.

EJB, Enterprise JavaBeans, Java, JavaServer, JDBC, JSP, J2EE, Solaris, Sun Microsystems, Java Naming and Directory Interface, SOAP with Attachments API for Java, JavaServer Pages and SunSoft are trademarks of Sun Microsystems, Inc.

UNIX is a registered trademark in the United States and other countries, exclusively licensed through X/Open Company, Ltd.

Apache, Apache POI and POI, Apache Tomcat and Tomcat, Xerces-C, Apache Lucene and Lucene, log4j, Apache Maven and Maven are trademarks of the Apache Software Foundation

Subversion, SVN are a trademark of Subversion Corporation

All other marks are the property of their respective owners