什么优先于SBT_OPTS或.sbtopts?
我在文章、博客和其他回答中都看到了这两个问题,但不清楚我应该在我的项目中使用哪一个?答案在 由于列表中较低的选项具有较高的优先级,我们可以假设什么优先于SBT_OPTS或.sbtopts?,sbt,Sbt,我在文章、博客和其他回答中都看到了这两个问题,但不清楚我应该在我的项目中使用哪一个?答案在 由于列表中较低的选项具有较高的优先级,我们可以假设.sbtopts优先于SBT\u OPTS。这很有意义,因为您可以在.bashrc中设置SBT\u OPTS,并且应该有一种方法可以根据.sbtopts提供的每个项目自动覆盖它。答案在 由于列表中较低的选项具有较高的优先级,我们可以假设.sbtopts优先于SBT\u OPTS。这很有意义,因为您可以在.bashrc中设置SBT\u OPTS,并且应该有一
.sbtopts
优先于SBT\u OPTS
。这很有意义,因为您可以在.bashrc
中设置SBT\u OPTS
,并且应该有一种方法可以根据.sbtopts
提供的每个项目自动覆盖它。答案在
由于列表中较低的选项具有较高的优先级,我们可以假设.sbtopts
优先于SBT\u OPTS
。这很有意义,因为您可以在.bashrc
中设置SBT\u OPTS
,并且应该有一种方法可以自动覆盖.sbtopts
提供的每个项目
# jvm options and output control
JAVA_OPTS environment variable, if unset uses "$default_java_opts"
.jvmopts if this file exists in the current directory, its contents
are appended to JAVA_OPTS
SBT_OPTS environment variable, if unset uses "$default_sbt_opts"
.sbtopts if this file exists in the current directory, its contents
are prepended to the runner args
/etc/sbt/sbtopts if this file exists, it is prepended to the runner args
-Dkey=val pass -Dkey=val directly to the java runtime
-J-X pass option -X directly to the java runtime
(-J is stripped)
-S-X add -X to sbt's scalacOptions (-S is stripped)
In the case of duplicated or conflicting options, the order above
shows precedence: JAVA_OPTS lowest, command line options highest.