For the complete documentation index, see llms.txt. This page is also available as Markdown.

Scanning a build

In order to collect coverage information SeaLights agents need to first scan the binary files for the build information.

It can be the *.class, *.jar or even the *.war files.

Scanning a build (single module)

Scanning a build in Java is done using the Java Build scanner with the -scan flag for files located in workspace folder only.

java -jar sl-build-scanner.jar scan --tokenFile /path/to/sltoken.txt --buildSessionIdFile buildSessionId.txt --scanDir "/path/to/war/files" --includeFiles "*.war"

Scanning a build in Java for all files located in workspace folder and it's subdirectories, is done using the Java Build scanner with the scan flag and --recursive flag.

java -jar sl-build-scanner.jar scan --tokenFile /path/to/sltoken.txt --buildSessionIdFile buildSessionId.txt --scanDir "/path/to/war/files" --includeFiles "*.class" --recursive

Scanning multi modules

If you want to report separate parts of the application as separate modules, you can do so with the --moduleName option.

java -jar sl-build-scanner.jar scan --tokenFile /path/to/sltoken.txt --buildSessionIdFile buildSessionId.txt --scanDir "/path/to/war/files" --includeFiles "*.war" --moduleName "moduleName"

When you finish reporting all the modules, you need to send the event with the buildend option and either the --ok or --failed depending on the result of your build process.

java -jar sl-build-scanner.jar buildend --ok --tokenFile sltoken.txt --buildSessionIdFile buildSessionId.txt

See Command Reference for full parameter details

Last updated

Was this helpful?