diff --git a/src/main/scala/com/typesafe/sbt/packager/debian/DebianPlugin.scala b/src/main/scala/com/typesafe/sbt/packager/debian/DebianPlugin.scala index 04142da01..f1dd28583 100644 --- a/src/main/scala/com/typesafe/sbt/packager/debian/DebianPlugin.scala +++ b/src/main/scala/com/typesafe/sbt/packager/debian/DebianPlugin.scala @@ -91,8 +91,8 @@ object DebianPlugin extends AutoPlugin with DebianNativePackaging { packageSummary in Debian := (packageSummary in Linux).value, maintainer in Debian := (maintainer in Linux).value, validatePackageValidators in Debian := Seq( - nonEmptyMappings((linuxPackageMappings in Debian).value.flatMap(_.mappings)), - filesExist((linuxPackageMappings in Debian).value.flatMap(_.mappings)), + nonEmptyMappings((mappings in Debian).value), + filesExist((mappings in Debian).value), checkMaintainer((maintainer in Debian).value, asWarning = false) ), // override the linux sourceDirectory setting diff --git a/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala b/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala index 7116ffcae..e64eba484 100644 --- a/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala +++ b/src/main/scala/com/typesafe/sbt/packager/docker/DockerPlugin.scala @@ -402,11 +402,11 @@ object DockerPlugin extends AutoPlugin { } private[this] def validateExposedPorts(ports: Seq[Int], udpPorts: Seq[Int]): Validation.Validator = () => { - if (ports.isEmpty && udpPorts.isEmpty) { - List( - ValidationWarning( - description = "There are no exposed ports for your docker image", - howToFix = """| Configure the `dockerExposedPorts` or `dockerExposedUdpPorts` setting. E.g. + if(ports.isEmpty && udpPorts.isEmpty) { + List(ValidationWarning( + description = "There are no exposed ports for your docker image", + howToFix = + """| Configure the `dockerExposedPorts` or `dockerExposedUdpPorts` setting. E.g. | | // standard tcp ports | dockerExposedPorts ++= Seq(9000, 9001) @@ -414,8 +414,7 @@ object DockerPlugin extends AutoPlugin { | // for udp ports | dockerExposedUdpPorts += 4444 """.stripMargin - ) - ) + )) } else { List.empty } @@ -424,12 +423,10 @@ object DockerPlugin extends AutoPlugin { private[this] def validateDockerVersion(dockerVersion: Option[DockerVersion]): Validation.Validator = () => { dockerVersion match { case Some(_) => List.empty - case None => - List( - ValidationWarning( - description = - "sbt-native-packager wasn't able to identify the docker version. Some features may not be enabled", - howToFix = """|sbt-native packager tries to parse the `docker version` output. This can fail if + case None => List(ValidationWarning( + description = "sbt-native-packager wasn't able to identify the docker version. Some features may not be enabled", + howToFix = + """|sbt-native packager tries to parse the `docker version` output. This can fail if | | - the output has changed: | $ docker version --format '{{.Server.Version}}' @@ -448,9 +445,10 @@ object DockerPlugin extends AutoPlugin { | import com.typesafe.sbt.packager.docker.DockerVersion | dockerVersion := Some(DockerVersion(17, 5, 0, Some("ce")) """.stripMargin - ) - ) + )) } } + + } diff --git a/src/main/scala/com/typesafe/sbt/packager/validation/Validation.scala b/src/main/scala/com/typesafe/sbt/packager/validation/Validation.scala index 302d1f152..f25b7afae 100644 --- a/src/main/scala/com/typesafe/sbt/packager/validation/Validation.scala +++ b/src/main/scala/com/typesafe/sbt/packager/validation/Validation.scala @@ -37,7 +37,7 @@ object Validation { * @return aggregated result of all validator function */ def apply(validators: Seq[Validator]): Validation = validators.flatMap(_.apply()).foldLeft(Validation(Nil, Nil)) { - case (validation, error: ValidationError) => validation.copy(errors = validation.errors :+ error) + case (validation, error: ValidationError) => validation.copy(errors = validation.errors :+ error) case (validation, warning: ValidationWarning) => validation.copy(warnings = validation.warnings :+ warning) } diff --git a/src/main/scala/com/typesafe/sbt/packager/validation/ValidationKeys.scala b/src/main/scala/com/typesafe/sbt/packager/validation/ValidationKeys.scala index d291a7018..e4babb20b 100644 --- a/src/main/scala/com/typesafe/sbt/packager/validation/ValidationKeys.scala +++ b/src/main/scala/com/typesafe/sbt/packager/validation/ValidationKeys.scala @@ -2,6 +2,7 @@ package com.typesafe.sbt.packager.validation import sbt._ + trait ValidationKeys { /** @@ -19,4 +20,4 @@ trait ValidationKeys { val validatePackageValidators = taskKey[Seq[Validation.Validator]]("validator functions") } -object ValidationKeys extends ValidationKeys +object ValidationKeys extends ValidationKeys \ No newline at end of file