【问题标题】:Mill: How to add additional Resources to a moduleMill:如何向模块添加额外的资源
【发布时间】:2021-12-14 00:09:30
【问题描述】:

我的模块外面有一些文件,我需要在我的类路径中进行测试。

列出所有可能性 (mill resolve tests._) 我认为扩展 resources 是要走的路。

我尝试了很多 - 这是我的最后一次尝试:

object test extends Tests {

  override def resources =
    new Sources({
      super.resources.self.map(_ :+ (millSourcePath / up / 'data / 'global / 'bpmn))
    }, 
      super.resources.ctx
    )
 ...
}
  • 覆盖resources 是否可行?
  • 如何正确完成?

【问题讨论】:

    标签: scala resources mill


    【解决方案1】:

    resources 是“源任务”as defined here。因此,为了在资源路径中添加一些内容,您可以这样做

    override def resources = T.sources {
      super.resources() :+ PathRef(millSourcePath / up / 'data / 'global / 'bpm)
    }
    

    【讨论】:

      猜你喜欢
      • 2017-06-04
      • 1970-01-01
      • 1970-01-01
      • 2013-10-25
      • 2010-12-16
      • 2013-07-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多