SBT support in FOSSA CLI depends on the following tools existing in your environment:
- Java (defaults to
java, configure with
- SBT (defaults to
sbt, configure with
In addition, SBT requires the following plugin to be installed:
net.virtual-void.sbt-dependency-graph: install by adding
addSbtPlugin("net.virtual-void" % "sbt-dependency-graph" % "0.9.0")to your SBT configuration
fossa init to detect all directories with a
build.sbt file at their root. fossa runs
sbt projects at these directories roots and creates a module for each sbt project with configuration set to
compile by default.
Manual: Add an
sbt module with the path to the directory where a
build.sbt file is located in your project. Set target to
<project>:<configuration> where project is the desired sbt project and configuration is the configuration analysis is desired for.
analyze: modules: - name: your-sbt-project type: sbt path: . target: <project>:<configuration>
Analysis parses the output of
sbt -no-colors <project>/<configuration>:dependencyList to retrieve a full list of dependencies utilized by your project.
- Currently fossa can only analyze a project if the user has
- To use SBT 1.3.x you will need to add
ThisBuild / useCoursier := falseto your
build.sbt, because coursier was made the default and does not pull license info.
- You cannot use SBT 1.4.x presently as the
net.virtual-void.sbt-dependency-graphplugin has been insourced.
- For initialisation to work robustly you may need to disable any configuration which writes output