bnsmith
bnsmith

Reputation: 1697

Using the RootProject feature of sbt to do something other than 'sbt compile'

I'm trying to use the RootProject feature of SBT to download another project from a git repo, for example:

lazy val schwatcher = RootProject(uri("https://github.com/lloydmeta/schwatcher.git"))

lazy val root = project in file(".") dependsOn schwatcher

This successfully downloads the git repo and basically runs the "sbt compile" command on the git repo, compiling all of the classes. However, I'd like it to go one step beyond running the usual "sbt compile" command. Instead, I want it to run "sbt package" so that a jar file is produced. Is there any way to do this?

Thanks.

Upvotes: 2

Views: 61

Answers (1)

lloydmeta
lloydmeta

Reputation: 1339

Have you tried using the One-Jar SBT plugin? I used it a while back for another project and it was simple to use.

There is also the sbt-assembly plugin, which is more maintained.

Upvotes: 1

Related Questions