sbt源代码中的主要方法在哪里?

wan*_*kai 0 scala sbt

我克隆了sbt源代码,尝试对其进行研究,但找不到

def main
Run Code Online (Sandbox Code Playgroud)

要么

extends App 
Run Code Online (Sandbox Code Playgroud)

即使在sbt \ main \ src \ main \ scala \ sbt \ Main.scala中

我搜索了所有源文件,发现一些文件具有主要方法,但是所有这些文件都在测试程序中,我认为这些方法是sbt的主要方法

那么sbt的主要方法在哪里?

Iva*_*iuc 5

如何在基于* nix的系统上快速找到它

查找启动的Java进程的pid sbt

ps aux | grep java
0:35.42 /usr/bin/java -Xms512m -Xmx3g -Xss2m -jar /.sbt/launchers/1.3.3/sbt-launch.jar shell

Run Code Online (Sandbox Code Playgroud)

这告诉您主类位于sbt-launch.jarjar文件中

将信号3发送到JVM或使用jstack获取JVM的线程转储

 kill -3 xxxx
Run Code Online (Sandbox Code Playgroud)

这是

    at sbt.xMain.run(Main.scala:39)
    at xsbt.boot.Launch$$anonfun$run$1.apply(Launch.scala:111)
    at xsbt.boot.Launch$.withContextLoader(Launch.scala:130)
    at xsbt.boot.Launch$.run(Launch.scala:111)
    at xsbt.boot.Launch$$anonfun$apply$1.apply(Launch.scala:37)
    at xsbt.boot.Launch$.launch(Launch.scala:119)
    at xsbt.boot.Launch$.apply(Launch.scala:20)
    at xsbt.boot.Boot$.runImpl(Boot.scala:56)
    at xsbt.boot.Boot$.main(Boot.scala:18)
    at xsbt.boot.Boot.main(Boot.scala)
Run Code Online (Sandbox Code Playgroud)