sbt 配置 vs 常春藤配置 [英] sbt Configuration vs Ivy configuration

查看:38
本文介绍了sbt 配置 vs 常春藤配置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读 Ivy 以更好地理解 SBT.然而,有一点让我感到困惑:在 Ivy 中,模块的配置决定了如何使用或构建它.我只是想知道 sbt 中的配置集是否固定:编译、测试、运行、提供(?)、全局(?)、默认(?)?

I have read Ivy to better understand SBT. However, one thing is puzzling me: in Ivy it is all about the configuration of a module that determines how to use or construct it. I was just wondering if the set of configuration are fixed in sbt: Compile, test, run, provided(?), global(?), default(?)?

如果可以设置一个新的,你会怎么做?

If it is possible to set a new one, how would you go about this?

发布工件的默认配置是什么?

What is the default configuration in which an artifact is published?

您如何设置产品工件 conf 不是默认的?如何删除默认的?

How can you set that the product artifact conf is other than the default one? How to remove the default one?

有没有办法列出可用的配置?

Is there a way to list the available configurations?

推荐答案

如果可以设置新的,那怎么可能?

If it is possible to set new one, how would it be possible?

是的.请参阅在 sbt 中定义自定义配置.

发布工件的默认配置是什么?

What is the default configuration in which a artifact are published?

包含您的 src/main 代码的主要配置称为 Compile.

The main configuration that contains your src/main code is called Compile.

如何设置默认的产品工件conf?如何删除默认的?

How can you set that the product artifact conf other than the default one? How to remove the default one?

您可以使用 publishArtifact 键控制在发布中包含哪些配置.请参阅工件.

You can control which configurations to include in publishing using publishArtifact key. See Artifacts.

有没有办法列出可用的配置?

Is there a way to list the available configuration?

> show ivyConfigurations
[info] List(compile, runtime, test, provided, optional, compile-internal, runtime-internal, test-internal, plugin, sources, docs, pom, scala-tool)

另请参阅 Scopes 以了解按配置轴划分范围的说明和全局.

See also Scopes for the explanation of scoping by configuration axis and Global.

这篇关于sbt 配置 vs 常春藤配置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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