Create standalone jar using SBT

前端 未结 5 929
孤独总比滥情好
孤独总比滥情好 2020-12-23 13:24

I was a heavy Maven user and now I\'m gradually using SBT for some of my projects.

I\'d like to know how could I use SBT to create a standalone Java project? This pr

5条回答
  •  粉色の甜心
    2020-12-23 14:06

    'sbt package' will produce a jar file.

    If you want it to be executable you need to add the following to your .sbt config:

    mainClass in Compile := Some("your.main.Class")
    

提交回复
热议问题