为什么 sbt 当前项目名称是“默认"?在0.10? [英] Why is sbt current project name "default" in 0.10?

查看:46
本文介绍了为什么 sbt 当前项目名称是“默认"?在0.10?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 sbt 0.10 构建一个 Scala 项目,只使用 build.sbt 文件而不是完整的配置.

I'm using sbt 0.10 to build a Scala project using just a build.sbt file instead of a full configuration.

每次启动 sbt 时,它都会给我如下消息:

Every time I start sbt it gives me the messages as follows:

[info] Set current project to default-ee699e (in build file:/Users/.../project/plugins/)
[info] Set current project to default-8febe7 (in build file:/Users/.../)

我确实在 build.sbt 文件中设置了 namemainClass 设置,所以我不知道我需要设置什么使项目名称 default-XXXX 消失.

I did set the name and mainClass settings in the build.sbt file, so I don't know what I need to set to get the project names default-XXXX go away.

下面给出的答案是正确的,因为这是装饰性的.如果您切换到 sbt 的完整配置,那么它会使用该项目的名称,而不是 default-XXXX.

the answer given below is correct in that this is cosmetic. If you switch to a full configuration of sbt, then it uses that project's name as opposed to default-XXXX however.

推荐答案

该消息可能有点误导,并不是说您必须设置当前项目",而是告诉您它在做什么.

The message can be a bit misleading, it's not saying that you must "set the curent project", it's telling you what it's doing.

它将当前项目设置到 plugins 文件夹,执行它的操作(编译等),然后将当前项目设置到您的实际构建文件夹并再次执行它.

It sets the current project to the plugins folder, does it's stuff (compile, etc.), then sets the current project to your actual build folder and does it's thing once again.

您无需设置任何其他内容.

You don't need to set anything else.

这篇关于为什么 sbt 当前项目名称是“默认"?在0.10?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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