How can I execute multiple lein tasks in one command?

£可爱£侵袭症+ 提交于 2019-12-10 08:07:23

问题


I'm new to leiningen.

When I tried to execute following,

$ lein clean jar

I got

Wrong number of arguments to clean task. 
Expected []
$ 

How can I execute multiple tasks in one command?


回答1:


Yes, it is possible to execute multiple leiningen tasks in sequence with one command.

Example:

lein do clean, test



回答2:


You can't do it at the command line directly, but you can with an alias in your project.clj file:

:aliases
{"go" ["do" "clean," "jar"]}

So at the command line you would then be able to:

lein go

(The comma after clean is needed, because lein do expects a comma after each command in order to allow passing arguments to the commands.)



来源:https://stackoverflow.com/questions/35914444/how-can-i-execute-multiple-lein-tasks-in-one-command

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!