ort: PATH Error using ScanCode as a Scanner on Cygwin
When I execute gradlew cli:run --args="--info scan -f JSON -i <ort_file_path>\ort\analyzer\analyzer-result.json -o <folder_path>\ort\scanner" I get:
> Configure project :
Reckoned version: 0.1.0-beta.0.4184+20191104T155526Z
> Task :cli:run
________ _____________________
\_____ \\______ \__ ___/ the OSS Review Toolkit, version 0.1.0-beta.0.4184+20191104T155526Z.
/ | \| _/ | | Running 'scan' on Java 12.0.2 and Windows 10 with
/ | \ | \ | | OS = Windows_NT
\_______ /____|_ / |____| COMSPEC = C:\WINDOWS\system32\cmd.exe
\/ \/
More environment variables:
TERM = cygwin
JAVA_HOME = C:\Program Files\Java\jdk-12.0.2
ANDROID_HOME = C:\Program Files (x86)\Android\android-sdk
Using scanner 'ScanCode' with storage 'FileBasedStorage'.
16:55:38.481 [main] INFO com.here.ort.commands.ScannerCommand - Local file storage has 0 scan results files.
16:55:41.674 [main] INFO com.here.ort.scanner.LocalScanner - Bootstrapping scanner 'ScanCode' as required version 3.0.2 was not found in PATH.
16:55:41.675 [main] INFO com.here.ort.scanner.scanners.ScanCode - Downloading ScanCode from https://github.com/nexB/scancode-toolkit/archive/v3.0.2.zip...
16:55:43.077 [main] INFO com.here.ort.scanner.scanners.ScanCode - Retrieved ScanCode from local cache.
16:57:16.856 [main] INFO com.here.ort.scanner.scanners.ScanCode - Unpacking '<my_user_path>\AppData\Local\Temp\ort13965838901154634866ScanCode-v3.0.2.zip' to '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2'...
16:57:55.651 [main] INFO com.here.ort.utils.ProcessCapture - Running '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\scancode.bat --version' in '<my_user_path>\Documents\04_oss-review-toolkit\oss-review-toolkit\cli'...
Exception in thread "main" java.io.IOException: Running '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\scancode.bat --version' in '<my_user_path>\Documents\04_oss-review-toolkit\oss-review-toolkit\cli' failed with exit code 1:
The script chardetect.exe is installed in '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The scripts futurize.exe and pasteurize.exe are installed in '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script pygmentize.exe is installed in '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The scripts csv2rdf.exe, rdf2dot.exe, rdfgraphisomorphism.exe, rdfpipe.exe and rdfs2dot.exe are installed in '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script spdx-tv2rdf.exe is installed in '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
The script calc-prorate.exe is installed in '<my_user_path>\AppData\Local\Temp\ort16223165339819254102ScanCode-3.0.2\scancode-toolkit-3.0.2\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
at com.here.ort.utils.ProcessCapture.requireSuccess(ProcessCapture.kt:145)
at com.here.ort.utils.CommandLineTool$DefaultImpls.run(CommandLineTool.kt:90)
at com.here.ort.scanner.scanners.ScanCode$getVersion$tool$1.run(ScanCode.kt:245)
at com.here.ort.utils.CommandLineTool$DefaultImpls.getVersion(CommandLineTool.kt:99)
at com.here.ort.scanner.scanners.ScanCode$getVersion$tool$1.getVersion(ScanCode.kt:245)
at com.here.ort.utils.CommandLineTool$DefaultImpls.getVersion$default(CommandLineTool.kt:97)
at com.here.ort.scanner.scanners.ScanCode.getVersion(ScanCode.kt:249)
at com.here.ort.scanner.LocalScanner$scannerDir$2.invoke(LocalScanner.kt:117)
at com.here.ort.scanner.LocalScanner$scannerDir$2.invoke(LocalScanner.kt:74)
at kotlin.SynchronizedLazyImpl.getValue(LazyJVM.kt:74)
at com.here.ort.scanner.LocalScanner.getScannerDir(LocalScanner.kt)
at com.here.ort.scanner.LocalScanner.getVersion$default(LocalScanner.kt:148)
at com.here.ort.scanner.LocalScanner.getDetails(LocalScanner.kt:165)
at com.here.ort.scanner.LocalScanner.scanPackages$suspendImpl(LocalScanner.kt:169)
at com.here.ort.scanner.LocalScanner.scanPackages(LocalScanner.kt)
at com.here.ort.scanner.Scanner$scanOrtResult$results$1.invokeSuspend(Scanner.kt:135)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(Dispatched.kt:241)
at kotlinx.coroutines.EventLoopImplBase.processNextEvent(EventLoop.common.kt:270)
at kotlinx.coroutines.BlockingCoroutine.joinBlocking(Builders.kt:79)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking(Builders.kt:54)
at kotlinx.coroutines.BuildersKt.runBlocking(Unknown Source)
at kotlinx.coroutines.BuildersKt__BuildersKt.runBlocking$default(Builders.kt:36)
at kotlinx.coroutines.BuildersKt.runBlocking$default(Unknown Source)
at com.here.ort.scanner.Scanner.scanOrtResult(Scanner.kt:135)
at com.here.ort.commands.ScannerCommand.runCommand(ScannerCommand.kt:192)
at com.here.ort.CommandWithHelp.run(CommandWithHelp.kt:55)
at com.here.ort.Main.runCommand(Main.kt:139)
at com.here.ort.CommandWithHelp.run(CommandWithHelp.kt:55)
at com.here.ort.Main.run(Main.kt:122)
at com.here.ort.Main.main(Main.kt:99)
> Task :cli:run FAILED
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':cli:run'.
> Process 'command 'C:\Program Files\Java\jdk-12.0.2\bin\java.exe'' finished with non-zero exit value 1
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.3/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 3m 40s
44 actionable tasks: 21 executed, 23 up-to-date
I hope I don’t need to further downgrade my OpenJDK version 😃, by the way there is a newer available version of the scancode-toolkit (v3.1.1).
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 40 (21 by maintainers)
@CleanHit, I believe there’s nothing left to do here WRT the original issue, so I’m closing this. I haven’t had time to finish work on my branch to specify a different scanner for projects, but strictly speaking that’s unrelated to the original issue, so I’ve created a separate one.
Thinking about it, IIUC what you want is (in ORT-speak) to skip the scan of the project source code, and only scan the source code of all dependency packages. Which is something that is currently not supported, but which could probably be easily added as part of the work in my branch to specify a different scanner for projects: You could simply set that scanner to
nonethen.Ok now it has a problem with not finding
svn, I’ll install the tortoiseSVN and run it again.