I Prefer Maven To SBT as Scala Build Tool
王福强
To work with scala with pleasure and effeciency, I had tried SBT, maven, gradle from time to time, but at last I stay with Maven as my main build tool for scala.
Although SBT is popular in scala community, and I had put a lot of time and attention to it before, let’s say:
- The chapter about SBT in “Real World Scala”(incomplete), https://github.com/CSUG/real_world_scala/blob/master/02_sbt.markdown
- How to write a SBT 0.10+ plugin?
- Understanding SBT In My Way, 2011/10/09
But at last, I found, it’s tricky to follow up the version and evolution of this tool, so I stay with maven finally, and with springboot’s maven plugin, everything gets simple:
- maven with scala-maven-plugin build java and scala;
- springboot maven plugin package the whole application into an executable jar(that means, a simple command
java -jar xyz.jar
will launch the application without any surprises); - systemd with a consistent unit file deploys application with ease;
I do know docker and kubernetes, but most the time, springboot + maven + systemd get my things done.
Granularity matters, if I run a startup with few projects, kubernetes is too heavey, with JVM, docker container seems not so necessary, maybe with GraalVM and its native image or ScalaNative, docker container or kubernetes make some sense.
It’s not always the best way, but it’s my way.
「福强私学」来一个?
「福强私学」, 一部沉淀了个人成长、技术与架构、组织与管理以及商业上的方法与心法的百科全书。
开天窗,拉认知,订阅「福报」,即刻拥有自己的全模态人工智能。