Skip to content

Commit

Permalink
try to reproduce issue 475
Browse files Browse the repository at this point in the history
  • Loading branch information
MasseGuillaume committed Nov 17, 2023
1 parent e4d3b36 commit 593ff38
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 0 deletions.
23 changes: 23 additions & 0 deletions src/sbt-test/sbt-assembly/large-dep/build.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
lazy val root = (project in file(".")).
settings(
version := "0.1.0",
scalaVersion := "2.12.18",
libraryDependencies ++= Seq(
"org.apache.cassandra" % "cassandra-all" % "4.0.0"
),
assembly / mainClass := Some("foo.Hello"),
assembly / assemblyJarName := "foo.jar",
TaskKey[Unit]("check") := {
val outputJar = (crossTarget.value / "foo.jar").toString

val process = sys.process.Process("java", Seq("-jar", outputJar))
val out = (process!!)
if (out.trim != "hello") sys.error("unexpected output: " + out)


val process2 = sys.process.Process("ls", Seq("-lh", outputJar))
println(process2!!)

()
}
)
7 changes: 7 additions & 0 deletions src/sbt-test/sbt-assembly/large-dep/project/assembly.sbt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
val pluginVersion = System.getProperty("plugin.version")
if(pluginVersion == null)
throw new RuntimeException("""|The system property 'plugin.version' is not defined.
|Specify this property using the scriptedLaunchOpts -D.""".stripMargin)
else addSbtPlugin("com.eed3si9n" % "sbt-assembly" % pluginVersion)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package foo

object Hello extends App {
println("hello")
}
3 changes: 3 additions & 0 deletions src/sbt-test/sbt-assembly/large-dep/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
> assembly

> check

0 comments on commit 593ff38

Please sign in to comment.