- Add the sbt plugin to
project/plugins.sbt, like so:
addSbtPlugin("com.lightbend" % "sbt-whitesource" % "0.1.18")
- Set the Organization API Key (from WhiteSource's Integrate page) by appending to
~/.sbt/0.13/credentials.sbt, like so:
credentials += Credentials(realm = "whitesource", host = "whitesourcesoftware.com", userName = "", passwd = "********" /* Organization API Key */)
Or set the
WHITESOURCE_PASSWORD environment variable. On Travis CI, use its Encrypted Environment Variables feature.
- In your
build.sbtset the product name and the aggregate project name and token, also available from WhiteSource's Integrate page:
whitesourceProduct in ThisBuild := "Lightbend Reactive Platform" whitesourceAggregateProjectName in ThisBuild := "akka-2.5" whitesourceAggregateProjectToken in ThisBuild := "1234abc-******"
whitesourceUpdate task to upload your projects' info to WhiteSource.
This plugin is a port of whitesource-maven-plugin v3.2.4 to sbt, providing very similar options and features.
The following keys might be of particular interest:
whitesourceServiceUrl in ThisBuild: Specifies the WhiteSource Service URL (or IP) to use, for on-premise installations
As the whitesource library relies on the Apache
httpclient its logging can be configured as described here: https://hc.apache.org/httpcomponents-client-ga/logging.html
For instance passing these options to sbt shows the requests and responses:
-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog -Dorg.apache.commons.logging.simplelog.showdatetime=true -Dorg.apache.commons.logging.simplelog.log.org.apache.http=DEBUG
To view the diff payload, it needs to be urldecoded, base64-decoded and then un-gzipped.
Copyright 2017 Lightbend, Inc.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.