diff --git a/blended.updater.tools/src/main/scala/blended/updater/tools/configbuilder/RuntimeConfigBuilder.scala b/blended.updater.tools/src/main/scala/blended/updater/tools/configbuilder/RuntimeConfigBuilder.scala index 4436fa967..c68d1da67 100644 --- a/blended.updater.tools/src/main/scala/blended/updater/tools/configbuilder/RuntimeConfigBuilder.scala +++ b/blended.updater.tools/src/main/scala/blended/updater/tools/configbuilder/RuntimeConfigBuilder.scala @@ -46,10 +46,12 @@ object RuntimeConfigBuilder { description = "Lookup additional feature configuration(s) from file {0}", maxCount = -1) def addFeatureRepo(repo: String): Unit = featureRepos ++= Seq(repo) + var featureRepos: Seq[String] = Seq() @CmdOption(names = Array("-m", "--maven-url"), args = Array("url"), maxCount = -1) def addMavenUrl(mavenUrl: String) = this.mavenUrls ++= Seq(mavenUrl) + var mavenUrls: Seq[String] = Seq() @CmdOption(names = Array("--debug")) @@ -97,7 +99,14 @@ object RuntimeConfigBuilder { } } + /** + * Same as [[RuntimeConfigBuilder#main]], but does not call `sys.exit` but throws an exception in case of non-success. + * @param args + */ + def run(args: Array[String]): Unit = { run(args = args, debugLog = None) + } + def run( args: Array[String], debugLog: Option[String => Unit] = None, @@ -213,6 +222,7 @@ object RuntimeConfigBuilder { val newRuntimeConfig = if (options.updateChecksums) { var checkedFiles: Map[File, String] = Map() + def checkAndUpdate(file: File, r: Artifact): Artifact = { checkedFiles.get(file).orElse(RuntimeConfigCompanion.digestFile(file)).map { checksum => checkedFiles += file -> checksum diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 45fc54cdf..6b84feefb 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -140,6 +140,7 @@ trait Dependencies { val travesty = "net.mikolak" %% "travesty" % s"0.9.1_2.5.17" val typesafeConfig = "com.typesafe" % "config" % "1.3.3" + // FIXME: Rename to typesafeSslConfigCore val typesafeConfigSSL = "com.typesafe" %% "ssl-config-core" % "0.3.6" val wiremock = "com.github.tomakehurst" % "wiremock" % "2.1.11"