Skip to content

Latest commit

 

History

History
154 lines (118 loc) · 5.12 KB

File metadata and controls

154 lines (118 loc) · 5.12 KB

relsvr-rap Command-Line Usage Guide

The relsvr-rap CLI builds Relativity Application Package (RAP) files from your application schema, assemblies, and custom pages.

Command Syntax

relsvr-rap.exe build --source <path> --input <file> --version <version> --relativity-server-release <year> [--warnings-as-errors <true|false>] [--log-file <path>] [--log-level <level>]

Parameters

Parameter Required Type Description
--source Yes String Repository root for the RAP build. Paths inside the input XML are resolved from this directory.
--input Yes String Path to the RAP build XML (for example, DevelopmentScripts\build.xml). Can be absolute or relative to --source.
--version Yes String RAP package version (for example, 1.0.0.0).
--relativity-server-release Yes Integer Target Relativity Server release year (for example, 2024, 2025).
--warnings-as-errors No Boolean Treat warnings as build failures when set to true.
--log-file No String File path for build logs (for example, Artifacts\Logs\rapbuild.log).
--log-level No String Logging verbosity. Typical values: Debug, Information, Warning, Error, Fatal.

Quick Start for This Repository

From the repo root (server-sample-rap):

relsvr-rap.exe build `
  --source "C:\Projects\MyRelativityApp" `
  --input "DevelopmentScripts\build.xml" `
  --version "1.0.0.0" `
  --relativity-server-release 2024 `
  --log-file "Artifacts\Logs\rapbuild.log"

The repository build script (build.ps1) already runs this command after restore/build steps.

Additional Examples

Basic Build

relsvr-rap.exe build --source C:\MyApp --input DevelopmentScripts\build.xml --version 1.0.0.0 --relativity-server-release 2025

Disable Warnings-As-Errors

relsvr-rap.exe build --source C:\MyApp --input DevelopmentScripts\build.xml --version 2.0.0.0 --relativity-server-release 2025 --warnings-as-errors false

Full Example

relsvr-rap.exe build `
  --source "C:\Projects\MyRelativityApp" `
  --input "DevelopmentScripts\build.xml" `
  --version "1.5.0.0" `
  --relativity-server-release 2025 `
  --warnings-as-errors false `
  --log-file "Artifacts\Logs\rapbuild.log" `
  --log-level Debug

Expected Repository Layout

MyRelativityApplication/
├── DevelopmentScripts/
|   └── build.xml
├── ApplicationsXML/
|   └── application.xml
├── Source/
|   ├── MyApp/
|   |   ├── MyApp.csproj
|   |   └── bin/
|   |       └── MyApp.dll
|   └── MyApp.CustomPage/
|       ├── MyApp.CustomPage.csproj
|       ├── Controllers/
|       ├── Views/
|       └── MyApp.CustomPage/
└── Artifacts/
    ├── Logs/
    └── MyRelativityApplication.rap

build.xml Configuration

The XML file provided to --input defines what goes into the RAP package.

<BuildTools>
  <RAPBuilder>
    <Applications>
      <Application name="SampleRap">
        <Destination>Artifacts\SampleRap.rap</Destination>
        <ApplicationSchema>ApplicationsXML/application.xml</ApplicationSchema>

        <Assemblies>
          <Assembly>Source\SampleRap\bin\SampleRap.dll</Assembly>
        </Assemblies>

        <ResourceFiles />

        <CustomPages>
          <CustomPage guid="a412cfce-098d-4339-96ba-72933ac2e707">Source\SampleRap.CustomPage\SampleRap.CustomPage</CustomPage>
        </CustomPages>
      </Application>
    </Applications>
  </RAPBuilder>
</BuildTools>

application.xml Alignment Requirements

The application.xml schema must stay aligned with build.xml.

  • Assembly names in application.xml must match assemblies included in build.xml.
  • Custom page GUIDs must match exactly between both files.
  • The application name/version metadata should reflect the package you are building.

The easiest way to create application.xml is exporting the application schema from Relativity and then validating that it matches your build inputs.

Build Output

After a successful build in this repository:

Artifacts/
├── Logs/
|   ├── buildsummary.log
|   ├── builderrors.log
|   └── rapbuild.log
└── SampleRap.rap

SampleRap.rap is the deployable package.

Common Errors and Solutions

Error Cause Solution
relsvr-rap is not recognized Tool not installed or not on PATH Install the tool and ensure your shell can resolve relsvr-rap
Source directory does not exist Invalid source` path Verify the path exists and is readable
Project input file does not exist Invalid input` path Ensure DevelopmentScripts\build.xml exists at the specified location
Assembly not found in schema build.xml and application.xml are out of sync Add/update the assembly entry in application.xml
Custom page GUID mismatch GUID differs between files Ensure the same GUID is used in both files

Return Codes

  • 0 Success
  • 1 General error (for example, bad path or missing file)
  • 4 RAPBuilder validation/build logic error