From ab3cd4323612fd172557595ffbf0e0aad3cbd9fb Mon Sep 17 00:00:00 2001 From: Dmitry Polienko Date: Fri, 22 Nov 2019 16:26:57 +0700 Subject: [PATCH 1/2] Add a test for #1284 --- src/sbt-test/jlink/test-jlink-misc/build.sbt | 9 +++++++++ src/sbt-test/jlink/test-jlink-misc/test | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/sbt-test/jlink/test-jlink-misc/build.sbt b/src/sbt-test/jlink/test-jlink-misc/build.sbt index 2e8deae19..67488751f 100644 --- a/src/sbt-test/jlink/test-jlink-misc/build.sbt +++ b/src/sbt-test/jlink/test-jlink-misc/build.sbt @@ -5,6 +5,7 @@ import scala.sys.process.Process import com.typesafe.sbt.packager.Compat._ val runChecks = taskKey[Unit]("Run checks for a specific issue") +val runFailingChecks = taskKey[Unit]("Run checks for a specific issue, expecting them to fail") // Exclude Scala by default to simplify the test. autoScalaLibrary in ThisBuild := false @@ -80,3 +81,11 @@ val issue1266 = project runChecks := jlinkBuildImage.value ) + +// Should fail for invalid jlink inputs +val issue1284 = project + .enablePlugins(JlinkPlugin) + .settings( + jlinkModules := List("no-such-module"), + runFailingChecks := jlinkBuildImage.value + ) diff --git a/src/sbt-test/jlink/test-jlink-misc/test b/src/sbt-test/jlink/test-jlink-misc/test index 0d327a3ac..41461a975 100644 --- a/src/sbt-test/jlink/test-jlink-misc/test +++ b/src/sbt-test/jlink/test-jlink-misc/test @@ -4,4 +4,5 @@ > issue1247BadAutoModuleName/runChecks > issue1247ExternalModule/runChecks > issue1247JakartaJavaModules/runChecks -> issue1266/runChecks \ No newline at end of file +> issue1266/runChecks +-> issue1284/runFailingChecks \ No newline at end of file From 45296e0558475e5cdbeb3ce392aec45bf6bfb007 Mon Sep 17 00:00:00 2001 From: Dmitry Polienko Date: Fri, 22 Nov 2019 16:34:53 +0700 Subject: [PATCH 2/2] Update tool-launcher --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 24ae0e454..918ddc29b 100644 --- a/build.sbt +++ b/build.sbt @@ -19,7 +19,7 @@ libraryDependencies ++= Seq( // for jdkpackager "org.apache.ant" % "ant" % "1.10.5", // workaround for the command line size limit - "com.github.eldis" % "tool-launcher" % "0.2.1", + "com.github.eldis" % "tool-launcher" % "0.2.2", "org.scalatest" %% "scalatest" % "3.0.5" % Test )