Prerequisites
Before running any CLI commands, ensure the following are in place:
| Requirement | Details |
|---|---|
| Java 17+ | Must be installed and available on PATH |
| Detect CLI JAR | detect-cli.jar built and available in tools/lib/ |
| All dependency JARs | Copied into tools/lib/ (or use a single fat JAR) |
| Unica Platform running | Authentication is performed against Platform |
| Detect backend running | REST API must be reachable at the configured URL |
| Configuration file | detect-cli.properties on classpath |
| OAuth2 credentials | Valid clientId and clientSecret from Platform |
| Network connectivity | Ports Platform and Detect must be accessible |
Obtaining OAuth2 Credentials
OAuth2 credentials must be obtained from Unica Platform using the clientDetails utility:
Windows:
cd %UNICA_PLATFORM_HOME%\tools\bin
./clientDetails.sh -a UnicaDetect
Linux:
cd $UNICA_PLATFORM_HOME/tools/bin
./clientDetails.sh -a UnicaDetect
Copy the output clientId and clientSecret values into your detect-cli.properties file.