Programmatic Scanning #9268
Replies: 3 comments 9 replies
-
If you want to add a specific scanner to the classpath, you can directly depend on it, for example, for ScanCode you would need this dependency: implementation("org.ossreviewtoolkit.plugins.scanners:scancode-scanner:34.0.0") If you want to add all scanner plugins to the classpath, you can depend on the BOM like this: implementation(platform("org.ossreviewtoolkit.plugins:scanners:34.0.0")) ORT finds plugins using Java's Service Loader. Each plugin extension point, like the Be aware that many plugins rely on other tools being installed on the system, for example, to use the ScanCode plugin you would have to install ScanCode first. Also, the next release will be the first one to be built with Java 21, so you would also have to at least use Java 21 to use ORT as a dependency. You can also have a look at these two projects which also use ORT programmatically: |
Beta Was this translation helpful? Give feedback.
-
Hey guys, have you seen this jgit related issue on Windows yet? This happens at the end of a scan (scancode) run:
I ran into the same issue in my own code that clones a repo then tried to delete it recursively with kotlin.io.Path function. The only work-around I found was to switch to the blocking java.io.File operation.
I've only tested on Windows and not on linux yet. I'm testing on Windows at the moment because scancode isn't compatible with ARM-based Macs. :( I'm not switching/coercing the arch on my Mac to intel as the scancode installation requires. I'll be running in Docker when the code is further along. EDIT: running ORT 36.0.0 on JDK 21.0.5, Kotlin 2.0.21. Also fails on JDK 21.0.4 / Kotlin 2.0.20. |
Beta Was this translation helpful? Give feedback.
-
Hey fellas, I get this warning when running scans using the latest ScanCode version: Here's my scancode version output:
I see #8881 mentions this in this comment. Which ScanCode version do you recommend using? |
Beta Was this translation helpful? Give feedback.
-
Hey guys, great tool! I'd like to programmatically scan projects from a Java/Kotlin program without shelling out to the CLI (ProcessBuilder). What's the trick to get the plugins/commands on the classpath when called from a separate application within the same process? I've tried including the various ORT modules as implementation dependencies, but not successfully.
I see references to "pluginClasspath" dependencies in your build.gradle.kts files. Is something like that the key?
e.g. "pluginClasspath"(platform(projects.plugins.versionControlSystems))
Please point me to any docs/code on the topic. Thanks!
Beta Was this translation helpful? Give feedback.
All reactions