我有一个项目,我想编译 twitter bootstrap 并防止并行执行测试
def twitterBootstrapEntryPoints(base:File):PathFinder = {
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "bootstrap.less") +++
(base / "app" / "assets" / "stylesheets" / "bootstrap" * "responsive.less") +++
(base / "app" / "assets" / "stylesheets" * "*.less")
}
val common = PlayProject(appName, appVersion,appDependencies, mainLang = SCALA).settings(
organization := appOrganization,
lessEntryPoints <<= baseDirectory(twitterBootstrapEntryPoints),
resolvers ++= commonResolvers).settings( inConfig(Test)(parallelExecution := false) : _* )
编辑:
要构建 twitter 引导程序,应该只编译 bootstrap.less 和 responsive.less ,它们会导入所有其他文件。在编译一切正常,在测试中运行时,这不再起作用,编译器尝试编译所有 .less 文件
这是我在游戏控制台上看到的
[GottwareWeb] $ clean
[success] Total time: 0 s, completed 26 sept. 2012 17:44:07
[GottwareWeb] $ compile
[info] Updating {file:/G:/GottwareWeb/}GottwareWeb...
[info] Resolving org.hibernate.javax.persistence#hibernate-jpa-2.0-api;1.0.1.Fin
[info] Done updating.
[info] Compiling 34 Scala sources and 1 Java source to G:\GottwareWeb\target\sca
la-2.9.1\classes...
[success] Total time: 9 s, completed 26 sept. 2012 17:44:17
[GottwareWeb] $ test
[error] {file:/G:/GottwareWeb/}GottwareWeb/*:play-copy-assets: in G:\GottwareWeb
\app\assets\stylesheets\accordion.less - PlayException: Compilation error [varia
ble @baseLineHeight is undefined]
[error] {file:/G:/GottwareWeb/}GottwareWeb/compile:resources: in G:\GottwareWeb\
app\assets\stylesheets\accordion.less - PlayException: Compilation error [variab
le @baseLineHeight is undefined]
[error] Total time: 0 s, completed 26 sept. 2012 17:44:32
[GottwareWeb] $