Prerequisites
Before you begin, ensure you have the following installed:Installation
Maven
Add the following dependency to yourpom.xml:
pom.xml for a project using the SCANOSS SDK:
mvn exec:java. Replace com.example.YourMainClass with the fully qualified name of your entry point class.
Gradle
Add the following to yourbuild.gradle dependencies block:
Note: Ensure the version matches the Maven dependency above. Check Maven Central for the latest available release.
Default API Endpoint
By default, theScanner class sends requests to the SCANOSS Open Source Software Knowledge Base (OSSKB) API at:
Scanner instance accordingly. Refer to the Configuration section for details.
Quick Start
To perform a scan using the defaultScanner configuration:
Scanner.builder().build() constructs a Scanner instance using the default API endpoint and settings. The scanFile method returns the scan results as a JSON string.