mirror of
https://github.com/ysoftdevs/odc-analyzer.git
synced 2026-01-15 16:23:52 +01:00
Added config option for NuGet -source
This commit is contained in:
@@ -21,7 +21,7 @@ import scala.concurrent.{ExecutionContext, Future}
|
||||
|
||||
case class OdcDbConnectionConfig(driverClass: String, driverJar: String, url: String, user: String, password: String)
|
||||
|
||||
case class OdcConfig(odcPath: String, extraArgs: Seq[String] = Seq(), workingDirectory: String = ".", propertyFile: Option[String], cleanTmpDir: Boolean = true)
|
||||
case class OdcConfig(odcPath: String, extraArgs: Seq[String] = Seq(), workingDirectory: String = ".", propertyFile: Option[String], cleanTmpDir: Boolean = true, dotNetNugetSource: Option[String])
|
||||
|
||||
case class SingleLibraryScanResult(mainDependencies: Seq[GroupedDependency], transitiveDependencies: Seq[GroupedDependency], includesTransitive: Boolean, limitationsOption: Option[String])
|
||||
|
||||
@@ -95,13 +95,14 @@ class OdcService @Inject() (odcConfig: OdcConfig, odcDbConnectionConfig: OdcDbCo
|
||||
val packagesConfigFile = dir.resolve("..").resolve("packages.config")
|
||||
Files.write(packagesConfigFile, packagesConfig.toString().getBytes(UTF_8))
|
||||
import sys.process._
|
||||
Seq(
|
||||
val cmd = Seq(
|
||||
nugetBin,
|
||||
"restore",
|
||||
packagesConfigFile.toString,
|
||||
"-PackagesDirectory",
|
||||
dir.toString
|
||||
).!!
|
||||
) ++ odcConfig.dotNetNugetSource.fold(Seq[String]())(source => Seq("-source", source))
|
||||
cmd.!!
|
||||
}
|
||||
|
||||
private def consumeStream(in: InputStream): Array[Byte] = {
|
||||
|
||||
@@ -149,10 +149,11 @@ slick.dbs.odc {
|
||||
## (i) You will also need to configure contexts.odc-workers for this functionality.
|
||||
# odc {
|
||||
# odcPath = "/path/to/dependency-check-X.Y.Z-release"
|
||||
# workingDirectory = "/path/to/odc/config" # directory ODC works in; you can use relative paths from this directory
|
||||
# propertyFile = "odc.props" # path to ODC property file
|
||||
# extraArgs = [] # Unstable conf; This might be changed or removed without any notice!!!
|
||||
# cleanTmpDir = true # Leave temporary directory for debugging
|
||||
# workingDirectory = "/path/to/odc/config" # [optional] directory ODC works in; you can use relative paths from this directory
|
||||
# propertyFile = "odc.props" # [optional] path to ODC property file
|
||||
# dotNetNugetSource = "https://path/to/your/nuget/proxy" # [optional]
|
||||
# extraArgs = [] # [optional] Unstable conf; This might be changed or removed without any notice!!!
|
||||
# cleanTmpDir = true # [optional] Keep temporary directory content for debugging
|
||||
# }
|
||||
|
||||
silhouette {
|
||||
|
||||
Reference in New Issue
Block a user