如何为SBT默认项目 [英] How to set the default project for SBT

查看:115
本文介绍了如何为SBT默认项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

假设我有一个生成具有​​三个项目:A,B和C.如果我目前在A的情况下并重新加载构建,这可能会改变的背景下重装后是C。正因为如此,我也重装后每次改变我的项目上下文。

Assume I have a build with three projects: A, B and C. If I am currently in the context of A and reload the build, it might change the context to be C after the reload. Because of this, I have to change my project context every time after reloading.

有没有一种方法来设置一个特定的项目作为默认背景?

Is there a way to set a specific project as the default context?

推荐答案

SBT选择第一个项目lexographical变量名,所以我只是把我的项目名称为:

SBT chooses the first lexographical project variable name, so I just set my project name to:

val aaaFrontend = PlayProject(

此外,还有一个项目序列,我相信你可以重写。

Also, there's a projects Seq that I believe you can override.

最后,在SBT 0.12你可以做你.sbtrc:

Finally, in SBT 0.12 you can do it in you .sbtrc:

alias boot = ;reload ;project X ;iflast shell

这篇关于如何为SBT默认项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆