2

我想构建一个 WebJar,其中包含来自 LESS 源的品牌定制版 Bootstrap。我有sbt.version=0.13.5-M4inproject/build.propertiesaddSbtPlugin("com.typesafe.sbt" % "sbt-less" % "1.0.0-M2a")in project/plugins.sbt。我的build.sbt样子是这样的:

import com.typesafe.web.sbt.WebPlugin
import com.typesafe.jse.sbt.JsEnginePlugin
import com.typesafe.web.sbt.WebPlugin.WebKeys

name := "brand-assets"

organization := "com.example"

version := "0.0.1-SNAPSHOT"

WebPlugin.webSettings

JsEnginePlugin.jsEngineSettings

lazy val root = (project in file(".")).addPlugins(SbtWeb)

excludeFilter in Assets := new PatternFilter("""[^_].*\.less""".r.pattern)

我得到的错误是:

build.sbt:1: error: object web is not a member of package com.typesafe
import com.typesafe.web.sbt.WebPlugin
                    ^
build.sbt:2: error: object sbt is not a member of package com.typesafe.jse
import com.typesafe.jse.sbt.JsEnginePlugin
                        ^
build.sbt:15: error: value addPlugins is not a member of sbt.Project
lazy val root = (project in file(".")).addPlugins(SbtWeb)
                                       ^
sbt.compiler.EvalException: Type error in expression

我错过了什么?

4

1 回答 1

0

到目前为止,我不了解您的问题,您应该将以下行添加到plugin.sbt

resolvers += Resolver.typesafeRepo("releases")

正如在https://github.com/sbt/sbt-less/issues/31中所使用的那样

于 2014-09-13T22:20:30.790 回答