Skip to content

Per project configuration

Vladimir Kotal edited this pageMar 24, 2025· 28 revisions

Table of contents

Per project properties

Each project can have its own set of properties. These control various aspects of how the project (plus its repositories) is handled.

Setup

The setting of per-project tunables is done in read-only configuration file. The file can look like this:

<?xml version="1.0" encoding="UTF-8"?>
<java version="1.8.0_121" class="java.beans.XMLDecoder">
 <object class="org.opengrok.indexer.configuration.Configuration" id="Configuration0">

  ...

  <void property="projects">
   <void method="put">
    <string>PROJECT_NAME</string>
    <object class="org.opengrok.indexer.configuration.Project">
     <void property="navigateWindowEnabled">
      <boolean>true</boolean>
     </void>
    </object>
   </void>
  </void>

 </object>
</java>

Warning: keep in mind that this way the read-only configuration can only be used for initial global indexing. After that comment per-project settings out in read-only configuration and use RESTful API to set per project properties. For more info see https://.com/oracle/opengrok/issues/2147

Properties

PropertyTypeMeaning
annotationCacheEnabledbooleanenable annotation cache, generated during reindex
navigateWindowEnabledbooleandisplay navigate window automatically when browsing xrefs
tabSizeintsize of tabulator in spaces. project reindex is necessary after changing the value !
handleRenamedFilesbooleandisables or enables handling of renamed files
historyEnabledbooleanenables or disables history for particular project
historyCacheEnabledbooleanenables or disables history cache for particular project. If enabled, it requires historyEnabled to be true.
indexedbooleanmarks the project (not) indexed. When the value is False, the project is not displayed in the web application.
mergeCommitsEnabledbooleanenables or disables storing merge commits in history
bugPagestringURL of service where one can query information about bugs
bugPatternstringregular expression to extract bug identification. The regexp is expected to have a single group.
reviewPagestringsimilar to bugPage but for code review links
reviewPatternstringsimilar to bugPattern but for code review links
usernamestringusername to use for repository authentication. Common for all repositories of given project. Currently works for Subversion repositories only.
passwordstringpassword to use for repository authentication. Common for all repositories of given project. Currently works for Subversion repositories only.