【问题标题】:Supply provided dependencies with build flag in sbt在 sbt 中使用构建标志提供提供的依赖项
【发布时间】:2013-11-07 13:23:36
【问题描述】:

我有一个项目,主要目的是为客户提供一组算法。但是,它次要处理这些算法的 HTTP 接口。因为我不希望我的客户固有 HTTP 库(unfiltereddispatch),所以我在 sbt 中将它们限定为 provided。如何设置我的项目,以便当我 sbt assembly 时,这些依赖项(以及日志实现)被编译,但当我 sbt packagesbt publish 时它们不是?

【问题讨论】:

    标签: scala sbt


    【解决方案1】:

    我认为答案就像告诉程序集插件使用 jar 的 compile 配置而不是运行时依赖项一样简单(因为提供的不在运行时类路径上)。

    sbt 0.13 语法:

    fullClasspath in assembly := (fullClasspath in Compile).value
    

    【讨论】:

      猜你喜欢
      • 2013-05-22
      • 1970-01-01
      • 2015-07-11
      • 1970-01-01
      • 2011-09-02
      • 2016-10-16
      • 1970-01-01
      • 1970-01-01
      • 2016-07-26
      相关资源
      最近更新 更多