xerial / sbt-pack

A sbt plugin for creating distributable Scala packages.
495 stars 76 forks source link

Copy Runtime dependencies. #378

Open alecuba16 opened 1 year ago

alecuba16 commented 1 year ago

Hi!

I'm trying to copy a runtime dependency "mysql-connector-java" which is defined as:

lazy val hbase = (project in file("hbase")) .enablePlugins(PackPlugin) .settings( libraryDependencies ++= Seq( // add hadoop dependencies "org.apache.hbase" % "hbase-client" % "1.4.13", "org.apache.spark" %% "spark-core" % sparkVersion, "org.apache.spark" %% "spark-sql" % sparkVersion, // mysql driver "mysql" % "mysql-connector-java" % "5.1.49" % Runtime), ) )

Launching sbt hbase/pack doesn't copy the mysql-*.jar to the /lib directory.

Do I have to configure something more to force the copy of that jar to the /lib directory?

thanks!

codingismy11to7 commented 1 year ago

seems like a regression at some point? or maybe we're doing something wrong, because i don't see how this wouldn't be a bigger issue. we're upgrading from v0.12 (which copies runtime dependencies) to v0.17, and the runtime jars are no longer included in lib so we're crashing at startup

codingismy11to7 commented 1 year ago

just confirmed that runtime dependencies are copied on v0.16, so just upgrading to that version for the time being

darklore commented 4 months ago

Same problem in my environment. it occurs from sbt-pack v0.17 to latest version.

darklore commented 2 months ago

@alecuba16 @codingismy11to7 It seems hbase/Runtime/pack packs runtime dependencies