guardian / sbt-jasmine-plugin

An SBT plugin for running jasmine tests in your build.
23 stars 28 forks source link

Include sbt-jasmine-plugin on my PlayFramework project #2

Open ThiagoMiranda opened 12 years ago

ThiagoMiranda commented 12 years ago

Hi.. I'm having a hard time to put the jasmine plugin on my project. This is my current Build.scala: import sbt. import Keys. import PlayProject._

object ApplicationBuild extends Build {

val appName         = "liquidplatform"
val appVersion      = "1.0-SNAPSHOT"

val appDependencies = Seq(
  "mysql" % "mysql-connector-java" % "5.1.18",
  "org.hibernate" % "hibernate-entitymanager" % "4.1.4.Final",
  "net.sf.dozer" % "dozer" % "5.3.2"
)

//object Resolvers {
  //val archivaSamba    = "Archiva Sambatech" at "http://192.168.0.15:8081/archiva"
//}

 val main = PlayProject(appName, appVersion, appDependencies, mainLang = JAVA).settings(
     // Add your own project settings here   
      ebeanEnabled := false   
    )

}

And my plugins.sbt:

// Comment to get more information during initialization
logLevel := Level.Warn

// The Typesafe repository
resolvers += "Typesafe repository" at "http://repo.typesafe.com/typesafe/releases/"

// Use the Play sbt plugin for Play projects
addSbtPlugin("play" % "sbt-plugin" % "2.0.1")

I'm a little new on Play Framework and when I add the " lazy val plugins = Project("plugins", file(".")) .dependsOn(uri("git://github.com/guardian/sbt-jasmine-plugin.git#1.0"))" or seq(jasmineSettings : _*)

It gives me a sintax error. Note: I'm using play 2.0.1

eriktoyra commented 11 years ago

I'm having the same problem.

Play! Framework: 2.0.4

I successfully added the line below to the Build.scala file.

lazy val plugins = Project("plugins", file("."))
.dependsOn(uri("git://github.com/guardian/sbt-jasmine-plugin.git#0.7"))"

But sbt generates an error on this line when including it int the plugins.sbt file. I'm not able to compile the project.

seq(jasmineSettings : _*)

The error says: "error: not found: value jasmineSettings".

Any ideas how to solve this?

theefer commented 11 years ago

Could you give the exact full paths for all the files in question (Build.scala, build.sbt, etc) ? In my experience, those problems are caused by putting stuff in the wrong "depths" of project/, project/project/, etc.

baldwinp commented 11 years ago

Hello,

I am seeing the same problem when I attempt to build the "sbt-jasmine-example" project. This error is produced:

C:\Users\pbaldwin\Documents\GitHub\sbt-jasmine-example\build.sbt:3: error: not f ound: value jasmineSettings seq(jasmineSettings : _*) ^ [error] Type error in expression

I am attempting to build (i.e. run "sbt" in the CMD console) the "sbt-jasmine-example" project in the "C:\Users\pbaldwin\Documents\GitHub\sbt-jasmine-example" folder - which is the root folder of my cloned instance of the "sbt-jasmine-example" project.

For info, the "seq(jasmineSettings : _*)" line is in "C:\Users\pbaldwin\Documents\GitHub\sbt-jasmine-example\build.sbt". The plug-in's dependency information - ie.

import sbt._

object Plugins extends Build { lazy val plugins = Project("root", file(".")) .dependsOn(uri("git://github.com/guardian/sbt-jasmine-plugin.git#0.7")) }

is found in "C:\Users\pbaldwin\Documents\GitHub\sbt-jasmine-example\project\project\Plugins.scala". In general, I have exactly the same folder + file structure as is found in GitHub.

Regards, Peter

theefer commented 11 years ago

What version of sbt are you using? The example project works here with 0.11.3-2 on Ubuntu.

baldwinp commented 11 years ago

Using the "sbt sbt-version" command, the version returned is "0.12.0". NOTE: I am unable to run this command in my "sbt-jasmine-example" folder because of the above problem. I created a new SBT project in order to run the 'version' command.

baldwinp commented 11 years ago

I have found a solution to this problem - in my environment. I delete the "\project\build.properties" file. If anyone can see any drawback to using this solution, could they please let me know.

orlybg commented 10 years ago

baldwinp I am facing the same issue following http://perevillega.com/post/2013/01/26/26/executing-jasmine-tests-in-play-204/

did you found any drawback to your solution?