0
votes

I have a project where I want to compile twitter bootstrap as well as to prevent tests to be executed in parallel

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) : _* )

Edit:

To build twitter bootstrap, one should only compile bootstrap.less and responsive.less which import all the other files. in Compile everything works fine, when running in Test this does not work anymore, the compiler tries to compile all the .less files

This is what I see on the play console

[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] $
1

1 Answers

2
votes

Parallel execution of tests is set to false by default. You shouldn't have to include it in the configuration.

Documentation here: https://github.com/playframework/Play20/wiki/SBTSettings

In your setup, Play must be compiling all the less files in app/assets/stylesheets in production as well. Is this what you don't want? Or is it compiling everything in app/assets/stylesheets/bootstrap/ ?