2017-09-23 30 views
2

在我的project.clj中,我試圖設置一些jvm-opts,當我做lein run,lein jar,lein uberjarlein installlein的「安裝」和「jar」任務配置文件

到目前爲止,只有uberjardev條目似乎工作(我可以在運行時通過System/getProperty閱讀)

:profiles {:dev  {:jvm-opts ["-Dcompiling-utils=true"]} 
      :uberjar {:jvm-opts ["-Dcompiling-utils=true"]} 
      :install {:jvm-opts ["-Dcompiling-utils=true"]}} 

如何獲得lein installlein jar個人資料?

感謝

回答

1

對於一個給定的任務,你可以通過使用高階任務with-profile啓動情景:

lein with-profile install install 
lein with-profile install jar