Command Reference
Build Scanner
Integrating into the pom.xml files
java -jar sl-build-scanner.jar -pom -configfile <arg> -workspacepath <arg> [-pluginversion <arg>]configfile
The path to the JSON configuration you created with the parameters to be provided to the SeaLights Maven Plugin
workspacepath
The base path to the location of the pom.xml files to update
pluginversion
(Optional) Version of the Maven SeaLights Plugin to insert into the pom.xml
Restoring the pom.xml file to its previous state
java -jar sl-build-scanner.jar -restorePom -workspacepath <arg>workspacepath
The base path to the location of the pom.xml files to update
Maven tool
Command line flags passed to Sealights maven plugin
mvn <arg> [{-DrunTestsOnly=<arg> | -DrunFunctionalTests=<arg>}] [-Dsl.modulesToSkip=<arg>]runTestsOnly
false
Set to true to skip build-scanner Note: when working with the Jenkins plugin this flag will not work, and you should use the runFunctionalTests=true
runFunctionalTests
false
(Deprecated: prefer including this flag in your JSON config file instead) Set to true to skip build-scanner and only validate partially build session data (for example packages included are not mandatory)
sl.modulesToSkip
(Optional) A comma separated list of modules to skip.
JSON Configuration file parameters
Create a JSON configuration file with the following parameters to provide the necessary configuration fields to the SeaLights Maven plugin:
configuration section with the following parameters
token or tokenFile - set with a token or a file containing the token obtained from the SeaLights dashboard
If you create a Build Session ID externally, provide the following fields:
buildSessionId or buildSessionIdFile - Set with a build session id or a file containing the build session id created by the config step
createBuildSessionId - Set to false
If you want to create a Build Session ID using the SeaLights Maven plugin, provide the following fields:
createBuildSessionId - Set to true
appName - Name of the application as you want to see it on the SeaLights dashboard
branchName - Name of the branch as you want to see it on the SeaLights dashboard
buildName - Name of the build as you want to see it on the SeaLights dashboard
packagesIncluded - Comma-separated list of packages to include in scan. Note: This is defining a subset, so it must include the asterisk to include all sub packages/classes
packagesExcluded - (Optional) Comma-separated list of packages to include in scan. Note: This is defining a subset, so it must include the asterisk to include all sub packages/classes
If you want to create a Pull Request Build Session ID using the SeaLights Maven plugin, provide the following fields:
createPRBuildSessionId - Set to true
appName - Name of the application as you want to see it on the SeaLights dashboard
targetBranch - The branch to which this PR will be merged into (already reported to SeaLights)
pullRequestNumber - The number assigned to the Pull Request from the source control
latestCommit - The full SHA of the last commit made to the Pull Request
repositoryUrl - The pull request URL for the PR to be scanned, up until the section before the pullRequestNumber value
packagesIncluded - Comma-separated list of packages to include in scan. Note: This is defining a subset, so it must include the asterisk to include all sub packages/classes
packagesExcluded - (Optional) Comma-separated list of packages to include in scan. Note: This is defining a subset, so it must include the asterisk to include all sub packages/classes
executionType - Provide which executions need to handled by the Maven plugin
full - Execute both the build scanner and the test listener
testsonly - Execute only the test listener
scanonly - Execute only the build scanner
filesincluded - (Optional) Set to the binary files to scan. Default:
*.classfilesexcluded - (Optional) Set to the binary files to excluded from the scan. Default:
*test-classes*workspacepath - Set to with the path to the binary files to scan (Different per module). Default:
${project.build.outputDirectory}Note: there are rare cases that this needs to be changed. Make sure you really need to change it before doing so.moduleNameArtifactId - (Optional) Set to true to set automatically the module name for each sub-project to be based on
${project.artifactId}. Default: false.recursive - (Optional) Set to true to scan all the subdirectories of workspacepath. Default:
trueincludeResources - (Optional) Set to include the token and build session ID files in the built resources
includeTokenResource - (Optional) On top of
includeResourcesabove, set tofalseto exclude the token file from the built resources. By default istrue.testStage - (Optional) Set the name of the test stage as will be displayed on the SeaLights dashboard
labId - (Optional) Unique ID for a set of test labs in case multiple labs are running simultaneously
filesStorage - Set to the temp folder for the agent to create temporary files in. For example:
/tmporC:\\TemplogEnabled - Set to true if you want a log to be created
logLevel - Set the log level to create. For example:
INFOproxy - (Optional) Address of proxy to run connection through
sealightsJvmParams - Entry to provide JVM params to the SeaLights agent. It should be of the format
{"key1":"val1", "key2":"val2"}metadata section with CI details
jobName - Set to the name of the build job. For example:
${JOB_NAME}logsUrl - Set to the link that the SeaLights dashboard should provide to view the build log. For example:
${BUILD_URL}/console
Last updated
Was this helpful?

