CLI: build Command

RAP Builder is invoked using the relsvr-rap command.

Commands

relsvr-rap currently exposes a single command:

Command Description
build Packages your application artifacts into a .rap file, validating the inputs and verifying SDK compatibility.

Each command has its own set of arguments. The arguments for build are documented below.

Synopsis

Copy
relsvr-rap build [OPTIONS]

build Arguments

Required Arguments

Argument Short Form Type Description
--source -s string The root directory of your repository. All relative paths in the --input file are resolved against this directory.
--input -i string Path to the build.xml file that describes the RAP components to package.
--version -v string The application version to stamp on the RAP (e.g., 1.0.0.0). This updates the <Version> element in application.xml.
--relativity-server-release -r integer The Relativity Server version this RAP targets. Valid values: 2024, 2025, 2026.

Optional Arguments

Argument Short Form Type Default Description
--warnings-as-errors -w boolean true Treat warnings as build failures when set to true.
--log-file -l string RAPBuilderLogs/log_<timestamp>.txt Path for the build log file. If not specified, a timestamped log file is created in a RAPBuilderLogs directory.
--log-level --ll string Information Minimum severity level for log output. See Log Levels below.

Log Levels

The --log-level argument accepts the following values (from most to least verbose):

Level Description
Verbose Logs the most detailed diagnostic output, including per-assembly validation tracing.
Debug Logs diagnostic information useful for troubleshooting.
Information Logs standard progress messages. This is the default.
Warning Logs only warnings and errors.
Error Logs only errors.
Fatal Logs only fatal errors that halt execution.

Usage Examples

Basic Build

Copy
relsvr-rap build --source . --input build.xml --version 1.0.0 --relativity-server-release 2025

Using Short-Form Arguments

Copy
relsvr-rap build -s . -i build.xml -v 1.0.0 -r 2025

Build with Debug Logging

Copy
relsvr-rap build `
  --source . `
  --input DevelopmentScripts/build.xml `
  --version 2.1.0.0 `
  --relativity-server-release 2025 `
  --log-level Debug `
  --log-file logs/build-debug.log

Allow Warnings Without Failing the Build

Copy
relsvr-rap build `
  --source . `
  --input build.xml `
  --version 1.0.0 `
  --relativity-server-release 2025 `
  --warnings-as-errors false

Server 2026 builds. When you target --relativity-server-release 2026, RAP Builder validates that every assembly targets .NET Framework 4.8.1 and reports Warning-level findings for any that do not. Because --warnings-as-errors defaults to true, a 2026 build fails until those assemblies are retargeted. While migrating, pass --warnings-as-errors false to surface the findings without failing the build. See Target Framework Validation (Server 2026).

Exit Codes

Code Meaning
0 Build completed successfully.
1 General error (bad path, missing file, invalid arguments).
4 RAPBuilder validation or build logic error (schema mismatch, SDK version failure, etc.).

Viewing Help

To display built-in help text:

Copy
relsvr-rap --help
relsvr-rap build --help

To display the installed version:

Copy
relsvr-rap --version
Feedback