如何使用sbt构建自定义引导WebJar?
我想构建一个WebJar,其中包含一个品牌定制版本的Bootstrap,源代码更少。我在如何使用sbt构建自定义引导WebJar?,sbt,webjars,Sbt,Webjars,我想构建一个WebJar,其中包含一个品牌定制版本的Bootstrap,源代码更少。我在project/build.properties中有sbt.version=0.13.5-M4,在project/plugins.sbt中有addSbtPlugin(“com.typesafe.sbt”%“sbt-less”%“1.0.0-M2a”)。我的build.sbt如下所示: import com.typesafe.web.sbt.WebPlugin import com.typesafe.jse.s
project/build.properties
中有sbt.version=0.13.5-M4
,在project/plugins.sbt
中有addSbtPlugin(“com.typesafe.sbt”%“sbt-less”%“1.0.0-M2a”)
。我的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
我遗漏了什么?到目前为止,我不理解您的问题,您应该在plugin.sbt中添加以下行:
resolvers += Resolver.typesafeRepo("releases")
在